more HIG correctness
This commit is contained in:
parent
6a0980dd5a
commit
7280551e2f
|
@ -62,15 +62,15 @@ static GtkToggleActionEntry show_toggle_entries[] =
|
|||
|
||||
static GtkActionEntry entries[] =
|
||||
{
|
||||
{ "file-menu", NULL, N_("_File"), NULL, NULL, NULL },
|
||||
{ "torrent-menu", NULL, N_("_Torrent"), NULL, NULL, NULL },
|
||||
{ "edit-menu", NULL, N_("_Edit"), NULL, NULL, NULL },
|
||||
{ "help-menu", NULL, N_("_Help"), NULL, NULL, NULL },
|
||||
{ "priority-menu", NULL, N_("_Priority"), NULL, NULL, NULL },
|
||||
{ "add-torrent", GTK_STOCK_OPEN, NULL, NULL, NULL, G_CALLBACK(action_cb) },
|
||||
{ "start-torrent", GTK_STOCK_MEDIA_PLAY,
|
||||
N_("_Start"), "<control>S", NULL, G_CALLBACK(action_cb) },
|
||||
{ "recheck-torrent", GTK_STOCK_REFRESH,
|
||||
N_("Re_check"), NULL, NULL, G_CALLBACK(action_cb) },
|
||||
{ "verify-torrent", NULL,
|
||||
N_("_Verify Local Files"), NULL, NULL, G_CALLBACK(action_cb) },
|
||||
{ "pause-torrent", GTK_STOCK_MEDIA_PAUSE,
|
||||
N_("_Pause"), "<control>P", NULL, G_CALLBACK(action_cb) },
|
||||
{ "remove-torrent", GTK_STOCK_REMOVE,
|
||||
|
@ -84,15 +84,15 @@ static GtkActionEntry entries[] =
|
|||
{ "select-all", GTK_STOCK_SELECT_ALL,
|
||||
N_("Select _All"), "<control>A", NULL, G_CALLBACK(action_cb) },
|
||||
{ "unselect-all", NULL,
|
||||
N_("_Deselect All"), "<control>U", NULL, G_CALLBACK(action_cb) },
|
||||
N_("Dese_lect All"), "<shift><control>A", NULL, G_CALLBACK(action_cb) },
|
||||
{ "edit-preferences", GTK_STOCK_PREFERENCES,
|
||||
N_("Edit _Preferences"), NULL, NULL, G_CALLBACK(action_cb) },
|
||||
{ "show-torrent-inspector", GTK_STOCK_INFO,
|
||||
N_("_Torrent Info"), NULL, NULL, G_CALLBACK(action_cb) },
|
||||
NULL, NULL, NULL, G_CALLBACK(action_cb) },
|
||||
{ "show-torrent-properties", GTK_STOCK_PROPERTIES,
|
||||
NULL, "<alt>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_REFRESH,
|
||||
N_("Update Tracker"), NULL, NULL, G_CALLBACK(action_cb) }
|
||||
{ "update-tracker", GTK_STOCK_NETWORK,
|
||||
N_("Ask Tracker for More Peers"), NULL, NULL, G_CALLBACK(action_cb) }
|
||||
};
|
||||
|
||||
static void
|
||||
|
|
|
@ -115,7 +115,7 @@ promptresp( GtkWidget * widget, gint resp, gpointer data );
|
|||
void
|
||||
makeaddwind( GtkWindow * parent, TrCore * core )
|
||||
{
|
||||
GtkWidget *wind = gtk_file_chooser_dialog_new(_("Add a Torrent"), parent,
|
||||
GtkWidget *wind = gtk_file_chooser_dialog_new(_("Open Torrent"), parent,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
|
||||
struct addcb *data = g_new(struct addcb, 1);
|
||||
|
|
|
@ -201,8 +201,8 @@ refreshTorrentActions( GtkTreeSelection * s )
|
|||
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);
|
||||
action_sensitize( "show-torrent-inspector", status != 0);
|
||||
action_sensitize( "verify-torrent", status != 0);
|
||||
action_sensitize( "show-torrent-properties", status != 0);
|
||||
|
||||
status = 0;
|
||||
gtk_tree_selection_selected_foreach( s, accumulateCanUpdateForeach, &status );
|
||||
|
@ -993,13 +993,13 @@ doAction ( const char * action_name, gpointer user_data )
|
|||
gtk_tree_selection_selected_foreach( s, stopTorrentForeach, NULL );
|
||||
changed |= gtk_tree_selection_count_selected_rows( s ) != 0;
|
||||
}
|
||||
else if (!strcmp (action_name, "recheck-torrent"))
|
||||
else if (!strcmp (action_name, "verify-torrent"))
|
||||
{
|
||||
GtkTreeSelection * s = tr_window_get_selection(data->wind);
|
||||
gtk_tree_selection_selected_foreach( s, recheckTorrentForeach, NULL );
|
||||
changed |= gtk_tree_selection_count_selected_rows( s ) != 0;
|
||||
}
|
||||
else if (!strcmp (action_name, "show-torrent-inspector"))
|
||||
else if (!strcmp (action_name, "show-torrent-properties"))
|
||||
{
|
||||
GtkTreeSelection * s = tr_window_get_selection(data->wind);
|
||||
gtk_tree_selection_selected_foreach( s, showInfoForeach, data->wind );
|
||||
|
|
|
@ -250,12 +250,12 @@ make_meta_ui( GtkWindow * parent, tr_handle * handle )
|
|||
|
||||
g_snprintf( name, sizeof(name), "%s:", _("_File"));
|
||||
|
||||
w = gtk_file_chooser_dialog_new (_("File or Directory to Add to the New Torrent"),
|
||||
NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
w = gtk_file_chooser_dialog_new ( NULL,
|
||||
NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
NULL );
|
||||
g_signal_connect( w, "map", G_CALLBACK(file_chooser_shown_cb), rb_dir );
|
||||
w = gtk_file_chooser_button_new_with_dialog( w );
|
||||
g_signal_connect( w, "selection-changed", G_CALLBACK(file_selection_changed_cb), ui );
|
||||
|
|
|
@ -229,7 +229,7 @@ msgwin_create( TrCore * core )
|
|||
int ii, curlevel;
|
||||
|
||||
win = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
||||
gtk_window_set_title( GTK_WINDOW( win ), "Transmission Debug Window" );
|
||||
gtk_window_set_title( GTK_WINDOW( win ), _( "Debug Window" ) );
|
||||
gtk_window_set_default_size( GTK_WINDOW( win ), 600, 400 );
|
||||
gtk_window_set_role( GTK_WINDOW( win ), "debug-window" );
|
||||
vbox = gtk_vbox_new( FALSE, 0 );
|
||||
|
|
|
@ -1597,25 +1597,16 @@ torrent_inspector_new ( GtkWindow * parent, TrTorrent * gtor )
|
|||
const tr_info * info = tr_torrent_info (gtor);
|
||||
|
||||
/* create the dialog */
|
||||
pch = _( "Torrent Info" );
|
||||
size = readablesize( info->totalSize );
|
||||
pch = g_strdup_printf( _( "Properties for %s (%s)" ), info->name, size );
|
||||
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);
|
||||
|
||||
|
||||
/* add label with file name and size */
|
||||
size = readablesize( info->totalSize );
|
||||
pch = g_markup_printf_escaped( "<b><big>%s</big>\n%s</b>", info->name, size );
|
||||
w = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL(w), pch);
|
||||
gtk_label_set_justify (GTK_LABEL(w), GTK_JUSTIFY_CENTER);
|
||||
gtk_misc_set_alignment (GTK_MISC(w), 0.5f, 0.5f);
|
||||
gtk_box_pack_start (GTK_BOX(GTK_DIALOG(d)->vbox), w, 0, 0, GUI_PAD);
|
||||
g_free (pch);
|
||||
g_free (size);
|
||||
g_free( pch );
|
||||
g_free( size );
|
||||
|
||||
/* add the notebook */
|
||||
n = gtk_notebook_new ();
|
||||
|
|
|
@ -559,12 +559,12 @@ tr_torrent_status_str ( TrTorrent * gtor )
|
|||
{
|
||||
case TR_STATUS_CHECK_WAIT:
|
||||
prog = st->recheckProgress * 100.0; /* [0...100] */
|
||||
top = g_strdup_printf( _("Waiting to check existing files (checked %.1f%%)"), prog );
|
||||
top = g_strdup_printf( _("Waiting to verify local files (%.1f%% tested)"), prog );
|
||||
break;
|
||||
|
||||
case TR_STATUS_CHECK:
|
||||
prog = st->recheckProgress * 100.0; /* [0...100] */
|
||||
top = g_strdup_printf( _("Checking existing files (checked %.1f%%)"), prog );
|
||||
top = g_strdup_printf( _("Verifying local files (%.1f%% tested)"), prog );
|
||||
break;
|
||||
|
||||
case TR_STATUS_DOWNLOAD:
|
||||
|
|
|
@ -173,7 +173,7 @@ view_row_activated ( GtkTreeView * tree_view UNUSED,
|
|||
GtkTreeViewColumn * column UNUSED,
|
||||
gpointer user_data UNUSED )
|
||||
{
|
||||
action_activate( "show-torrent-inspector" );
|
||||
action_activate( "show-torrent-properties" );
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
|
|
12
gtk/ui.h
12
gtk/ui.h
|
@ -1,13 +1,14 @@
|
|||
const char * fallback_ui_file =
|
||||
"<ui>\n"
|
||||
" <menubar name='main-window-menu'>\n"
|
||||
" <menu action='file-menu'>\n"
|
||||
" <menu action='torrent-menu'>\n"
|
||||
" <menuitem action='add-torrent'/>\n"
|
||||
" <menuitem action='start-torrent'/>\n"
|
||||
" <menuitem action='update-tracker'/>\n"
|
||||
" <menuitem action='pause-torrent'/>\n"
|
||||
" <menuitem action='recheck-torrent'/>\n"
|
||||
" <menuitem action='verify-torrent'/>\n"
|
||||
" <menuitem action='remove-torrent'/>\n"
|
||||
" <menuitem action='show-torrent-properties'/>\n"
|
||||
" <separator/>\n"
|
||||
" <menuitem action='create-torrent'/>\n"
|
||||
" <separator/>\n"
|
||||
|
@ -18,7 +19,6 @@ const char * fallback_ui_file =
|
|||
" <menuitem action='select-all'/>\n"
|
||||
" <menuitem action='unselect-all'/>\n"
|
||||
" <separator/>\n"
|
||||
" <menuitem action='show-torrent-inspector'/>\n"
|
||||
" <menuitem action='edit-preferences'/>\n"
|
||||
" </menu>\n"
|
||||
" <menu action='help-menu'>\n"
|
||||
|
@ -34,15 +34,15 @@ const char * fallback_ui_file =
|
|||
" <toolitem action='pause-torrent'/>\n"
|
||||
" <toolitem action='remove-torrent'/>\n"
|
||||
" <separator/>\n"
|
||||
" <toolitem action='show-torrent-inspector'/>\n"
|
||||
" <toolitem action='show-torrent-properties'/>\n"
|
||||
" </toolbar>\n"
|
||||
"\n"
|
||||
" <popup name='main-window-popup'>\n"
|
||||
" <menuitem action='show-torrent-inspector'/>\n"
|
||||
" <menuitem action='show-torrent-properties'/>\n"
|
||||
" <separator/>\n"
|
||||
" <menuitem action='start-torrent'/>\n"
|
||||
" <menuitem action='pause-torrent'/>\n"
|
||||
" <menuitem action='recheck-torrent'/>\n"
|
||||
" <menuitem action='verify-torrent'/>\n"
|
||||
" <separator/>\n"
|
||||
" <menuitem action='remove-torrent'/>\n"
|
||||
" </popup>\n"
|
||||
|
|
Loading…
Reference in New Issue