Changeset 6402


Ignore:
Timestamp:
Jul 25, 2008, 2:56:28 PM (13 years ago)
Author:
charles
Message:

(gtk) #1108: transmission includes several unlocalized strings

Location:
trunk/gtk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r6358 r6402  
    790790        gtk_label_set_text( GTK_LABEL( l ), never );
    791791    else {
    792         char * str = rfc822date( t );
     792        char * str = gtr_localtime( t );
    793793        gtk_label_set_text( GTK_LABEL( l ), str );
    794794        g_free( str );
  • trunk/gtk/msgwin.c

    r5922 r6402  
    9898                                COL_TR_MSG, &node,
    9999                                -1 );
    100             date = rfc822date( node->when );
     100            date = gtr_localtime( node->when );
    101101            switch( node->level ) {
    102102                case TR_MSG_DBG: levelStr = "debug"; break;
     
    104104                default:         levelStr = "     "; break;
    105105            }
    106             fprintf( fp, "%s\t%s\t%s\t%s\n", date, levelStr, node->name, node->message );
     106            fprintf( fp, "%s\t%s\t%s\t%s\n", date, levelStr,
     107                     ( node->name ? node->name : "" ),
     108                     ( node->message ? node->message : "" ) );
    107109
    108110            g_free( date );
  • trunk/gtk/util.c

    r6301 r6402  
    160160}
    161161
    162 
    163162char *
    164 rfc822date( time_t time )
     163gtr_localtime( time_t time )
    165164{
    166165    const struct tm tm = *localtime( &time );
    167     char buf[128];
    168     strftime( buf, sizeof(buf), "%a, %d %b %Y %T %Z", &tm );
     166    char buf[256], *eoln;
     167
     168    g_strlcpy( buf, asctime( &tm ), sizeof( buf ) );
     169    if(( eoln = strchr( buf, '\n' )))
     170        *eoln = '\0';
     171
    169172    return g_locale_to_utf8( buf, -1, NULL, NULL, NULL );
    170173}
  • trunk/gtk/util.h

    r6301 r6402  
    5252char* tr_strltime( char * buf, int secs, size_t buflen );
    5353
    54 char* rfc822date( time_t epoch_sec );
     54char* gtr_localtime( time_t time );
    5555
    5656/* create a directory and any missing parent directories */
Note: See TracChangeset for help on using the changeset viewer.