From 0daff3381427b894aa1b8c8cc9233ccc07d161e4 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 10 Oct 2007 18:52:08 +0000 Subject: [PATCH] minor tweaks: (1) list `None' instead of `0 b' for zero bytes, such as in UL speed or the "corrupted" field. (2) the properties icon is too horrible to keep -- use `torrent details' instead. (3) list active maintainers first in credits. (4) tweak the "about" dialog's client description a bit to better match the style of other gtk+ apps. --- AUTHORS | 6 +++--- NEWS | 2 ++ gtk/actions.c | 4 ++-- gtk/main.c | 12 ++++++------ gtk/torrent-inspector.c | 2 +- gtk/tr_window.c | 2 +- gtk/ui.h | 6 +++--- gtk/util.c | 5 ++++- 8 files changed, 22 insertions(+), 17 deletions(-) diff --git a/AUTHORS b/AUTHORS index f927ebc23..462c3723b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,10 +2,10 @@ The Transmission Project http://transmission.m0k.org/ Lead Developers + Mitchell Livingston (Mac OS X interface, Backend) + Charles Kerr (Backend, GTK+ client) Eric Petit (Creator) - Josh Elsasser (Back-end, GTK+ interface, Daemon interface) - Mitchell Livingston (Mac OS X interface, Back-end) - Charles Kerr (Back-end, GTK+, wxWidgets) + Josh Elsasser (Daemon, Backend, GTK+ interface) Bryan Varner (BeOS interface) Project Contributors diff --git a/NEWS b/NEWS index bfcec5771..b4140e241 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ NEWS file for Transmission + Inspector can be resized vertically in Peers and Files tabs + Optimizations to decrease memory usage + Various smaller interface additions and improvements + - GTK: + + Various smaller interface improvements 0.82 (2007/09/09) - Fixed bug that could limit transfer speeds diff --git a/gtk/actions.c b/gtk/actions.c index 2a4dd765f..e49e9a152 100644 --- a/gtk/actions.c +++ b/gtk/actions.c @@ -87,8 +87,8 @@ static GtkActionEntry entries[] = N_("Dese_lect All"), "A", NULL, G_CALLBACK(action_cb) }, { "edit-preferences", GTK_STOCK_PREFERENCES, NULL, NULL, NULL, G_CALLBACK(action_cb) }, - { "show-torrent-properties", GTK_STOCK_PROPERTIES, - NULL, "Return", NULL, G_CALLBACK(action_cb) }, + { "show-torrent-details", GTK_STOCK_INFO, + N_("_Details"), "Return", NULL, G_CALLBACK(action_cb) }, { "show-about-dialog", GTK_STOCK_ABOUT, N_("_About Transmission"), NULL, NULL, G_CALLBACK(action_cb) }, { "update-tracker", GTK_STOCK_NETWORK, diff --git a/gtk/main.c b/gtk/main.c index 41ec41ae6..5ab62ae47 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -202,7 +202,7 @@ refreshTorrentActions( GtkTreeSelection * s ) action_sensitize( "start-torrent", (status & TR_STATUS_INACTIVE) != 0); action_sensitize( "remove-torrent", status != 0); action_sensitize( "verify-torrent", status != 0); - action_sensitize( "show-torrent-properties", status != 0); + action_sensitize( "show-torrent-details", status != 0); status = 0; gtk_tree_selection_selected_foreach( s, accumulateCanUpdateForeach, &status ); @@ -881,10 +881,10 @@ about ( void ) { GtkWidget * w = gtk_about_dialog_new (); GtkAboutDialog * a = GTK_ABOUT_DIALOG (w); - const char *authors[] = { "Eric Petit (Back-end; OS X)", - "Josh Elsasser (Back-end; GTK+)", + const char *authors[] = { "Charles Kerr (Back-end; GTK+)", "Mitchell Livingston (Back-end; OS X)", - "Charles Kerr (Back-end; GTK+)", + "Eric Petit (Back-end; OS X)", + "Josh Elsasser (Daemon; Back-end; GTK+)", "Bryan Varner (BeOS)", NULL }; gtk_about_dialog_set_version (a, LONG_VERSION_STRING ); @@ -893,7 +893,7 @@ about ( void ) gtk_about_dialog_set_wrap_license (a, TRUE); #endif gtk_about_dialog_set_logo_icon_name( a, "transmission-logo" ); - gtk_about_dialog_set_comments( a, _("A GTK+ BitTorrent Client.") ); + gtk_about_dialog_set_comments( a, _("A simple yet powerful BitTorrent Client") ); gtk_about_dialog_set_website( a, "http://transmission.m0k.org/" ); gtk_about_dialog_set_copyright( a, _("Copyright 2005-2007 The Transmission Project") ); gtk_about_dialog_set_authors( a, authors ); @@ -999,7 +999,7 @@ doAction ( const char * action_name, gpointer user_data ) gtk_tree_selection_selected_foreach( s, recheckTorrentForeach, NULL ); changed |= gtk_tree_selection_count_selected_rows( s ) != 0; } - else if (!strcmp (action_name, "show-torrent-properties")) + else if (!strcmp (action_name, "show-torrent-details")) { GtkTreeSelection * s = tr_window_get_selection(data->wind); gtk_tree_selection_selected_foreach( s, showInfoForeach, data->wind ); diff --git a/gtk/torrent-inspector.c b/gtk/torrent-inspector.c index fc31920d4..5e4496416 100644 --- a/gtk/torrent-inspector.c +++ b/gtk/torrent-inspector.c @@ -1598,7 +1598,7 @@ torrent_inspector_new ( GtkWindow * parent, TrTorrent * gtor ) /* create the dialog */ size = readablesize( info->totalSize ); - pch = g_strdup_printf( _( "Properties for %s (%s)" ), info->name, size ); + pch = g_strdup_printf( _( "Details for %s (%s)" ), info->name, size ); d = gtk_dialog_new_with_buttons (pch, parent, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); diff --git a/gtk/tr_window.c b/gtk/tr_window.c index d86794782..e7a79a685 100644 --- a/gtk/tr_window.c +++ b/gtk/tr_window.c @@ -173,7 +173,7 @@ view_row_activated ( GtkTreeView * tree_view UNUSED, GtkTreeViewColumn * column UNUSED, gpointer user_data UNUSED ) { - action_activate( "show-torrent-properties" ); + action_activate( "show-torrent-details" ); } static GtkWidget* diff --git a/gtk/ui.h b/gtk/ui.h index b8fa41b86..ca843bf24 100644 --- a/gtk/ui.h +++ b/gtk/ui.h @@ -8,7 +8,7 @@ const char * fallback_ui_file = " \n" " \n" " \n" -" \n" +" \n" " \n" " \n" " \n" @@ -34,11 +34,11 @@ const char * fallback_ui_file = " \n" " \n" " \n" -" \n" +" \n" " \n" "\n" " \n" -" \n" +" \n" " \n" " \n" " \n" diff --git a/gtk/util.c b/gtk/util.c index 01bc220dd..be1fa2b6a 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -61,6 +61,9 @@ readablesize(guint64 size) { int ii; double small = size; + if( !size ) + return g_strdup_printf( _("None") ); + for(ii = 0; ii + 1 < ALEN(sizestrs) && 1024.0 <= small / 1024.0; ii++) small /= 1024.0; @@ -78,7 +81,7 @@ readablespeed (double KiBps) { const guint64 bps = KiBps * 1024; char * str = readablesize (bps); - char * ret = g_strdup_printf ("%s/s", str); + char * ret = bps ? g_strdup_printf ("%s/s", str) : g_strdup( str ); g_free (str); return ret; }