Diff of /trunk/src/info.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 161 by harbaum, Sat Apr 11 11:28:56 2009 UTC revision 163 by harbaum, Tue Apr 14 19:26:18 2009 UTC
# Line 413  gboolean info_dialog(GtkWidget *parent, Line 413  gboolean info_dialog(GtkWidget *parent,
413    
414    /* making the dialog a little wider makes it less "crowded" */    /* making the dialog a little wider makes it less "crowded" */
415  #ifdef USE_HILDON  #ifdef USE_HILDON
416    gtk_window_set_default_size(GTK_WINDOW(context->dialog), 500, 400);    gtk_window_set_default_size(GTK_WINDOW(context->dialog), 440, 400);
417  #else  #else
418    // Conversely, desktop builds should display a little narrower    // Conversely, desktop builds should display a little narrower
419    gtk_window_set_default_size(GTK_WINDOW(context->dialog), 400, 300);    gtk_window_set_default_size(GTK_WINDOW(context->dialog), 400, 300);
# Line 423  gboolean info_dialog(GtkWidget *parent, Line 423  gboolean info_dialog(GtkWidget *parent,
423    GtkWidget *table = gtk_table_new(2, 2, FALSE);  // x, y    GtkWidget *table = gtk_table_new(2, 2, FALSE);  // x, y
424    
425    /* ------------ user ----------------- */    /* ------------ user ----------------- */
426    char *u_str = NULL;    if(user) {
427    if(user) u_str = g_strdup_printf(_("User: %s"), user->name);      label = gtk_label_new(user->name);
428    else     u_str = g_strdup_printf(_("User: ---"));      gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
429    label = gtk_label_new(u_str);      gtk_table_attach_defaults(GTK_TABLE(table),  label, 0, 1, 0, 1);
430    gtk_table_attach_defaults(GTK_TABLE(table),  label, 0, 1, 0, 1);    }
   g_free(u_str);  
431    
432    /* ------------ time ----------------- */    /* ------------ time ----------------- */
433    
434    struct tm *loctime = localtime(&stime);    struct tm *loctime = localtime(&stime);
435    char time_str[32];    char time_str[32];
436    strftime(time_str, sizeof(time_str), "%x %X", loctime);    strftime(time_str, sizeof(time_str), "%x %X", loctime);
437    char *t_str = g_strdup_printf(_("Time: %s"), time_str);    label = gtk_label_new(time_str);
   label = gtk_label_new(t_str);  
   g_free(t_str);  
438    gtk_table_attach_defaults(GTK_TABLE(table),  label, 1, 2, 0, 1);    gtk_table_attach_defaults(GTK_TABLE(table),  label, 1, 2, 0, 1);
439    
440    /* ------------ coordinate (only for nodes) ----------------- */    /* ------------ coordinate (only for nodes) ----------------- */

Legend:
Removed from v.161  
changed lines
  Added in v.163