Changeset 3993


Ignore:
Timestamp:
Nov 27, 2007, 3:29:51 AM (15 years ago)
Author:
charles
Message:

add stats dialog to the gtk+ client

Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/Makefile.am

    r3731 r3993  
    2020    makemeta-ui.h \
    2121    msgwin.h \
     22    stats.h \
    2223    torrent-inspector.h \
    2324    tr_cell_renderer_progress.h \
     
    4243    makemeta-ui.c \
    4344    msgwin.c \
     45    stats.c \
    4446    torrent-inspector.c \
    4547    tr_cell_renderer_progress.c \
  • trunk/gtk/actions.c

    r3870 r3993  
    7171  { "start-torrent", GTK_STOCK_MEDIA_PLAY,
    7272    N_("_Start"), "<control>S", NULL, G_CALLBACK(action_cb) },
     73  { "show-stats", NULL, N_("_Statistics"), NULL, NULL, G_CALLBACK(action_cb) },
    7374  { "verify-torrent", NULL,
    7475    N_("_Verify Local Data"), NULL, NULL, G_CALLBACK(action_cb) },
  • trunk/gtk/main.c

    r3942 r3993  
    4242#include "makemeta-ui.h"
    4343#include "msgwin.h"
     44#include "stats.h"
    4445#include "torrent-inspector.h"
    4546#include "tr_cell_renderer_progress.h"
     
    698699setpex( tr_torrent * tor, void * arg )
    699700{
    700     gboolean * val;
    701 
    702     val = arg;
    703     tr_torrentDisablePex( tor, !(*val) );
     701    const gboolean * val = arg;
     702    tr_torrentDisablePex( tor, !*val );
    704703}
    705704
     
    861860        makeaddwind( data->wind, data->core );
    862861    }
     862    else if (!strcmp (action_name, "show-stats"))
     863    {
     864        GtkWidget * dialog = stats_dialog_create( data->wind,
     865                                                  data->core );
     866        gtk_widget_show( dialog );
     867    }
    863868    else if (!strcmp (action_name, "start-torrent"))
    864869    {
  • trunk/gtk/torrent-inspector.c

    r3896 r3993  
    665665    gtk_box_pack_start (GTK_BOX(vbox), w, FALSE, FALSE, 0);
    666666
    667     g_snprintf (name, sizeof(name), "<b>%s</b>", _("Peers"));
     667    g_snprintf (name, sizeof(name), "<b>%s</b>", _("Connected Peers"));
    668668    l = gtk_label_new (NULL);
    669669    gtk_misc_set_alignment (GTK_MISC(l), 0.0f, 0.5f);
  • trunk/gtk/tr_window.c

    r3821 r3993  
    9393    else if( TR_STATUS_DOWNLOAD & status )
    9494    {
    95         bottom = g_strdup_printf( ngettext( "Downloading from %i of %i peer",
    96                                             "Downloading from %i of %i peers",
     95        bottom = g_strdup_printf( ngettext( "Downloading from %i of %i connections",
     96                                            "Downloading from %i of %i connections",
    9797                                            tpeers ), dpeers, tpeers );
    9898    }
  • trunk/gtk/ui.h

    r3867 r3993  
    2424"    <menu action='help-menu'>\n"
    2525"      <menuitem action='toggle-message-log'/>\n"
     26"      <menuitem action='show-stats'/>\n"
    2627"      <separator/>\n"
    2728"      <menuitem action='show-about-dialog'/>\n"
  • trunk/po/POTFILES.in

    r3328 r3993  
    1010gtk/makemeta-ui.c
    1111gtk/msgwin.c
     12gtk/stats.c
    1213gtk/torrent-inspector.c
    1314gtk/tr_cell_renderer_progress.c
Note: See TracChangeset for help on using the changeset viewer.