Hide panel if a panel was activated that's already shown

Also default hotkeys for History And Transfers.
This commit is contained in:
Christian Dywan 2010-06-21 22:47:52 +02:00
parent 00f417b710
commit e200f2cb3e
2 changed files with 7 additions and 2 deletions

View file

@ -712,6 +712,11 @@ midori_panel_action_activate_cb (GtkRadioAction* action,
&& gtk_radio_action_get_current_value (action) && gtk_radio_action_get_current_value (action)
== katze_object_get_int (action, "value")) == katze_object_get_int (action, "value"))
midori_panel_detach_page (panel, n); midori_panel_detach_page (panel, n);
else if (gtk_radio_action_get_current_value (action)
== katze_object_get_int (action, "value")
&& gtk_widget_get_visible (GTK_WIDGET (panel))
&& midori_panel_get_current_page (panel) == n)
gtk_widget_hide (GTK_WIDGET (panel));
else else
{ {
midori_panel_set_current_page (panel, n); midori_panel_set_current_page (panel, n);

View file

@ -1289,11 +1289,11 @@ sokoke_register_stock_items (void)
{ STOCK_BOOKMARK_ADD, N_("Add Boo_kmark"), 0, 0, GTK_STOCK_ADD }, { STOCK_BOOKMARK_ADD, N_("Add Boo_kmark"), 0, 0, GTK_STOCK_ADD },
{ STOCK_CONSOLE, N_("_Console"), 0, 0, GTK_STOCK_DIALOG_WARNING }, { STOCK_CONSOLE, N_("_Console"), 0, 0, GTK_STOCK_DIALOG_WARNING },
{ STOCK_EXTENSIONS, N_("_Extensions"), 0, 0, GTK_STOCK_CONVERT }, { STOCK_EXTENSIONS, N_("_Extensions"), 0, 0, GTK_STOCK_CONVERT },
{ STOCK_HISTORY, N_("_History"), 0, 0, GTK_STOCK_SORT_ASCENDING }, { STOCK_HISTORY, N_("_History"), 0, GDK_H, GTK_STOCK_SORT_ASCENDING },
{ STOCK_HOMEPAGE, N_("_Homepage"), 0, 0, GTK_STOCK_HOME }, { STOCK_HOMEPAGE, N_("_Homepage"), 0, 0, GTK_STOCK_HOME },
{ STOCK_SCRIPTS, N_("_Userscripts"), 0, 0, GTK_STOCK_EXECUTE }, { STOCK_SCRIPTS, N_("_Userscripts"), 0, 0, GTK_STOCK_EXECUTE },
{ STOCK_TAB_NEW, N_("New _Tab"), 0, 0, GTK_STOCK_ADD }, { STOCK_TAB_NEW, N_("New _Tab"), 0, 0, GTK_STOCK_ADD },
{ STOCK_TRANSFERS, N_("_Transfers"), 0, 0, GTK_STOCK_SAVE }, { STOCK_TRANSFERS, N_("_Transfers"), 0, GDK_J, GTK_STOCK_SAVE },
{ STOCK_PLUGINS, N_("Netscape p_lugins"), 0, 0, GTK_STOCK_CONVERT }, { STOCK_PLUGINS, N_("Netscape p_lugins"), 0, 0, GTK_STOCK_CONVERT },
{ STOCK_USER_TRASH, N_("_Closed Tabs"), 0, 0, "gtk-undo-ltr" }, { STOCK_USER_TRASH, N_("_Closed Tabs"), 0, 0, "gtk-undo-ltr" },
{ STOCK_WINDOW_NEW, N_("New _Window"), 0, 0, GTK_STOCK_ADD }, { STOCK_WINDOW_NEW, N_("New _Window"), 0, 0, GTK_STOCK_ADD },