Changeset 2304


Ignore:
Timestamp:
Jul 8, 2007, 5:51:55 AM (16 years ago)
Author:
charles
Message:

minor tweaks to make the gtk+ client resemble the os x one more closely

Location:
trunk/gtk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/actions.c

    r2149 r2304  
    6060  { "help-menu", NULL, N_("_Help"), NULL, NULL, NULL },
    6161  { "priority-menu", NULL, N_("_Priority"), NULL, NULL, NULL },
    62   { "add-torrent", GTK_STOCK_ADD,
    63     N_("_Add"), "<control>A", NULL, G_CALLBACK(action_cb) },
     62  { "add-torrent", GTK_STOCK_OPEN, NULL, NULL,  NULL, G_CALLBACK(action_cb) },
    6463  { "start-torrent", GTK_STOCK_EXECUTE,
    6564    N_("_Start"), "<control>S", NULL, G_CALLBACK(action_cb) },
  • trunk/gtk/tr_torrent.c

    r2247 r2304  
    625625            else {
    626626                char * timestr = readabletime(eta);
    627                 top = g_strdup_printf( _("Finishing in %s (%.1f%%)"), timestr, prog );
     627                top = g_strdup_printf( _("%s remaining (%.1f%%)"), timestr, prog );
    628628                g_free(timestr);
    629629            }
     
    639639        case TR_STATUS_SEED:
    640640            top = g_strdup_printf(
    641                 ngettext( "Seeding, uploading to %d of %d peer",
    642                           "Seeding, uploading to %d of %d peers", tpeers ),
     641                ngettext( "Seeding to %d of %d peer",
     642                          "Seeding to %d of %d peers", tpeers ),
    643643                          upeers, tpeers );
    644644            break;
  • trunk/gtk/tr_window.c

    r2256 r2304  
    4343    GtkWidget * view;
    4444    GtkWidget * status;
     45    GtkWidget * ul_lb;
     46    GtkWidget * dl_lb;
    4547    GtkTreeSelection * selection;
    4648    GtkCellRenderer * namerend;
     
    111113    }
    112114
    113     str = g_markup_printf_escaped( "<big>%s (%s)</big>\n<small>%s\n%s</small>",
     115    str = g_markup_printf_escaped( "<b>%s (%s)</b>\n<small>%s\n%s</small>",
    114116                                   name, mb, top,
    115117                                   ( NULL == bottom ? "" : bottom ) );
     
    246248{
    247249    PrivateData * p = g_new( PrivateData, 1 );
    248     GtkWidget *vbox, *w, *self;
     250    GtkWidget *vbox, *w, *self, *h;
    249251
    250252    /* make the window */
     
    276278    gtk_container_set_focus_child( GTK_CONTAINER( vbox ), w );
    277279
     280    /* spacer */
     281    w = gtk_alignment_new (0.0f, 0.0f, 0.0f, 0.0f);
     282    gtk_widget_set_usize (w, 0u, 6u);
     283    gtk_box_pack_start( GTK_BOX(vbox), w, FALSE, FALSE, 0 );
     284
     285
    278286    /* statusbar */
    279     w = p->status = gtk_statusbar_new ();
    280     gtk_statusbar_push( GTK_STATUSBAR(w), 0, "" );
    281     gtk_box_pack_start( GTK_BOX(vbox), w, FALSE, FALSE, 0 );
     287    h = gtk_hbox_new( FALSE, 0 );
     288    w = p->ul_lb = gtk_label_new( NULL );
     289    gtk_box_pack_end( GTK_BOX(h), w, FALSE, FALSE, GUI_PAD );
     290    w = gtk_vseparator_new( );
     291    gtk_box_pack_end( GTK_BOX(h), w, FALSE, FALSE, GUI_PAD );
     292    w = p->dl_lb = gtk_label_new( NULL );
     293    gtk_box_pack_end( GTK_BOX(h), w, FALSE, FALSE, GUI_PAD );
     294    gtk_box_pack_start( GTK_BOX(vbox), h, FALSE, FALSE, 0 );
    282295
    283296    /* show all but the window */
     
    291304{
    292305    PrivateData * p = get_private_data( self );
    293     GtkStatusbar * status = GTK_STATUSBAR( p->status );
    294 
    295     /* update the status bar */
    296     char * downstr = readablespeed ( downspeed );
    297     char * upstr   = readablespeed ( upspeed );
    298     char * str     = g_strdup_printf( _("     Total DL: %s     Total UL: %s"),
    299                                       downstr, upstr );
    300     g_free( downstr );
    301     g_free( upstr );
    302     gtk_statusbar_pop( status, 0 );
    303     gtk_statusbar_push( status, 0, str );
    304     g_free( str );
     306    char *tmp1, *tmp2;
     307
     308    tmp1 = readablespeed( downspeed );
     309    tmp2 = g_strdup_printf( _("Total DL: %s"), tmp1 );
     310    gtk_label_set_text( GTK_LABEL(p->dl_lb), tmp2 );
     311    g_free( tmp2 );
     312    g_free( tmp1 );
     313
     314    tmp1 = readablespeed( upspeed );
     315    tmp2 = g_strdup_printf( _("Total UL: %s"), tmp1 );
     316    gtk_label_set_text( GTK_LABEL(p->ul_lb), tmp2 );
     317    g_free( tmp2 );
     318    g_free( tmp1 );
    305319}
    306320
  • trunk/gtk/util.c

    r2298 r2304  
    110110#define HOURS(s)                ((s) / 60 / 60 % 24)
    111111#define DAYS(s)                 ((s) / 60 / 60 / 24 % 7)
    112 #define WEEKS(s)                ((s) / 60 / 60 / 24 / 7)
    113112
    114113char *
     
    116115  if(60 > secs)
    117116    return g_strdup_printf(_("%i %s"),
    118       SECONDS(secs), ngettext("second", "seconds", SECONDS(secs)));
     117      SECONDS(secs), ngettext("sec", "secs", SECONDS(secs)));
    119118  else if(60 * 60 > secs)
    120119    return g_strdup_printf(_("%i %s %i %s"),
    121       MINUTES(secs), ngettext("minute", "minutes", MINUTES(secs)),
    122       SECONDS(secs), ngettext("second", "seconds", SECONDS(secs)));
     120      MINUTES(secs), ngettext("min", "mins", MINUTES(secs)),
     121      SECONDS(secs), ngettext("sec", "secs", SECONDS(secs)));
    123122  else if(60 * 60 * 24 > secs)
    124123    return g_strdup_printf(_("%i %s %i %s"),
    125       HOURS(secs),   ngettext("hour", "hours", HOURS(secs)),
    126       MINUTES(secs), ngettext("minute", "minutes", MINUTES(secs)));
    127   else if(60 * 60 * 24 * 7 > secs)
     124      HOURS(secs),   ngettext("hr", "hrs", HOURS(secs)),
     125      MINUTES(secs), ngettext("min", "mins", MINUTES(secs)));
     126  else
    128127    return g_strdup_printf(_("%i %s %i %s"),
    129128      DAYS(secs),    ngettext("day", "days", DAYS(secs)),
    130       HOURS(secs),   ngettext("hour", "hours", HOURS(secs)));
    131   else
    132     return g_strdup_printf(_("%i %s %i %s"),
    133       WEEKS(secs),   ngettext("week", "weeks", WEEKS(secs)),
    134       DAYS(secs),    ngettext("hour", "hours", DAYS(secs)));
     129      HOURS(secs),   ngettext("hr", "hrs", HOURS(secs)));
    135130}
    136131
Note: See TracChangeset for help on using the changeset viewer.