Ticket #339: transmission-show.diff

File transmission-show.diff, 1.3 KB (added by infernux, 15 years ago)

The patch

  • gtk/actions.c

     
    5252  set_selected_file_priority ( priority );
    5353}
    5454
     55static GtkToggleActionEntry show_toggle_entries[] =
     56{
     57  { "toggle-main-window", NULL,
     58    N_("Show _Transmission"), NULL, NULL, G_CALLBACK(action_cb), TRUE }
     59};
    5560
    5661static GtkActionEntry entries[] =
    5762{
     
    8691    N_("_About Transmission"), NULL, NULL, G_CALLBACK(action_cb) },
    8792  { "show-debug-window", NULL,
    8893    N_("Show _Debug Window"), NULL, NULL, G_CALLBACK(action_cb) },
    89   { "toggle-main-window", "ICON_TRANSMISSION",
    90     N_("Show / Hide _Transmission"), NULL, NULL, G_CALLBACK(action_cb) },
    9194  { "update-tracker", GTK_STOCK_REFRESH,
    9295    N_("Update Tracker"), NULL, NULL, G_CALLBACK(action_cb) }
    9396};
     
    174177                                      TR_PRI_NORMAL,
    175178                                      G_CALLBACK(priority_changed_cb), NULL);
    176179
     180  gtk_action_group_add_toggle_actions ( action_group,
     181                                        show_toggle_entries,
     182                                        G_N_ELEMENTS(show_toggle_entries),
     183                                        callback_user_data );
     184
    177185  gtk_action_group_add_actions( action_group,
    178186                                entries, n_entries,
    179187                                callback_user_data );