mirror of
https://github.com/transmission/transmission
synced 2025-03-12 07:03:44 +00:00
Better GNOME Integration (#338): (1) follow HIG recommendation that dialog titles be the name of the command that opened the dialog (2) rename stop-torrent as pause-torrent in the underlying gtk code
This commit is contained in:
parent
cbaf1b8faa
commit
8e840f871c
6 changed files with 9 additions and 12 deletions
|
@ -71,7 +71,7 @@ static GtkActionEntry entries[] =
|
|||
N_("_Start"), "<control>S", NULL, G_CALLBACK(action_cb) },
|
||||
{ "recheck-torrent", GTK_STOCK_REFRESH,
|
||||
N_("Re_check"), NULL, NULL, G_CALLBACK(action_cb) },
|
||||
{ "stop-torrent", GTK_STOCK_MEDIA_PAUSE,
|
||||
{ "pause-torrent", GTK_STOCK_MEDIA_PAUSE,
|
||||
N_("_Pause"), "<control>P", NULL, G_CALLBACK(action_cb) },
|
||||
{ "remove-torrent", GTK_STOCK_REMOVE,
|
||||
N_("_Remove"), "<control>R", NULL, G_CALLBACK(action_cb) },
|
||||
|
|
|
@ -198,7 +198,7 @@ refreshTorrentActions( GtkTreeSelection * s )
|
|||
{
|
||||
int status = 0;
|
||||
gtk_tree_selection_selected_foreach( s, accumulateStatusForeach, &status );
|
||||
action_sensitize( "stop-torrent", (status & TR_STATUS_ACTIVE) != 0);
|
||||
action_sensitize( "pause-torrent", (status & TR_STATUS_ACTIVE) != 0);
|
||||
action_sensitize( "start-torrent", (status & TR_STATUS_INACTIVE) != 0);
|
||||
action_sensitize( "remove-torrent", status != 0);
|
||||
action_sensitize( "recheck-torrent", status != 0);
|
||||
|
@ -987,7 +987,7 @@ doAction ( const char * action_name, gpointer user_data )
|
|||
gtk_tree_selection_selected_foreach( s, startTorrentForeach, NULL );
|
||||
changed |= gtk_tree_selection_count_selected_rows( s ) != 0;
|
||||
}
|
||||
else if (!strcmp (action_name, "stop-torrent"))
|
||||
else if (!strcmp (action_name, "pause-torrent"))
|
||||
{
|
||||
GtkTreeSelection * s = tr_window_get_selection(data->wind);
|
||||
gtk_tree_selection_selected_foreach( s, stopTorrentForeach, NULL );
|
||||
|
|
|
@ -225,7 +225,7 @@ make_meta_ui( GtkWindow * parent, tr_handle * handle )
|
|||
MakeMetaUI * ui = g_new0 ( MakeMetaUI, 1 );
|
||||
ui->handle = handle;
|
||||
|
||||
d = gtk_dialog_new_with_buttons( _("Make a New Torrent"),
|
||||
d = gtk_dialog_new_with_buttons( _("Create New Torrent"),
|
||||
parent,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
|
|
|
@ -1597,16 +1597,13 @@ torrent_inspector_new ( GtkWindow * parent, TrTorrent * gtor )
|
|||
const tr_info * info = tr_torrent_info (gtor);
|
||||
|
||||
/* create the dialog */
|
||||
pch = g_strdup_printf ("%s: %s",
|
||||
g_get_application_name(),
|
||||
_("Torrent Inspector"));
|
||||
pch = _( "Torrent Info" );
|
||||
d = gtk_dialog_new_with_buttons (pch, parent, 0,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
NULL);
|
||||
gtk_window_set_role (GTK_WINDOW(d), "tr-info" );
|
||||
g_signal_connect (d, "response", G_CALLBACK (response_cb), gtor);
|
||||
g_object_weak_ref (G_OBJECT(gtor), torrent_destroyed, d);
|
||||
g_free (pch);
|
||||
|
||||
|
||||
/* add label with file name and size */
|
||||
|
|
|
@ -197,7 +197,7 @@ tr_prefs_dialog_new( GObject * core, GtkWindow * parent )
|
|||
GtkWidget * l;
|
||||
GtkWidget * d;
|
||||
|
||||
d = gtk_dialog_new_with_buttons( _("Transmission: Preferences"), parent,
|
||||
d = gtk_dialog_new_with_buttons( _("Preferences"), parent,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
|
||||
NULL );
|
||||
|
|
6
gtk/ui.h
6
gtk/ui.h
|
@ -5,7 +5,7 @@ const char * fallback_ui_file =
|
|||
" <menuitem action='add-torrent'/>\n"
|
||||
" <menuitem action='start-torrent'/>\n"
|
||||
" <menuitem action='update-tracker'/>\n"
|
||||
" <menuitem action='stop-torrent'/>\n"
|
||||
" <menuitem action='pause-torrent'/>\n"
|
||||
" <menuitem action='recheck-torrent'/>\n"
|
||||
" <menuitem action='remove-torrent'/>\n"
|
||||
" <separator/>\n"
|
||||
|
@ -31,7 +31,7 @@ const char * fallback_ui_file =
|
|||
" <toolbar name='main-window-toolbar'>\n"
|
||||
" <toolitem action='add-torrent'/>\n"
|
||||
" <toolitem action='start-torrent'/>\n"
|
||||
" <toolitem action='stop-torrent'/>\n"
|
||||
" <toolitem action='pause-torrent'/>\n"
|
||||
" <toolitem action='remove-torrent'/>\n"
|
||||
" <separator/>\n"
|
||||
" <toolitem action='show-torrent-inspector'/>\n"
|
||||
|
@ -41,7 +41,7 @@ const char * fallback_ui_file =
|
|||
" <menuitem action='show-torrent-inspector'/>\n"
|
||||
" <separator/>\n"
|
||||
" <menuitem action='start-torrent'/>\n"
|
||||
" <menuitem action='stop-torrent'/>\n"
|
||||
" <menuitem action='pause-torrent'/>\n"
|
||||
" <menuitem action='recheck-torrent'/>\n"
|
||||
" <separator/>\n"
|
||||
" <menuitem action='remove-torrent'/>\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue