Make AddSpeedDial visible/ hidden instead of sensitive/ grayed

This commit is contained in:
Christian Dywan 2009-05-10 14:57:26 +02:00
parent 64b60d7f94
commit db826d348a
2 changed files with 10 additions and 9 deletions

View file

@ -249,7 +249,7 @@ _midori_browser_update_interface (MidoriBrowser* browser)
_action_set_sensitive (browser, "Forward", _action_set_sensitive (browser, "Forward",
midori_view_can_go_forward (MIDORI_VIEW (view))); midori_view_can_go_forward (MIDORI_VIEW (view)));
_action_set_sensitive (browser, "AddSpeedDial", gtk_action_set_visible (_action_by_name (browser, "AddSpeedDial"),
browser->customized_homepage_in_new_tabs); browser->customized_homepage_in_new_tabs);
/* Currently views that don't support source, don't support /* Currently views that don't support source, don't support
saving either. If that changes, we need to think of something. */ saving either. If that changes, we need to think of something. */

View file

@ -1250,14 +1250,15 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
G_CALLBACK (midori_web_view_menu_action_activate_cb), view); G_CALLBACK (midori_web_view_menu_action_activate_cb), view);
gtk_widget_show (menuitem); gtk_widget_show (menuitem);
if (view->customized_homepage_in_new_tabs)
{
menuitem = gtk_image_menu_item_new_with_mnemonic (_("Add to customized _homepage")); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Add to customized _homepage"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
g_object_set_data (G_OBJECT (menuitem), "action", "AddSpeedDial"); g_object_set_data (G_OBJECT (menuitem), "action", "AddSpeedDial");
g_signal_connect (menuitem, "activate", g_signal_connect (menuitem, "activate",
G_CALLBACK (midori_web_view_menu_action_add_speed_dial_cb), view); G_CALLBACK (midori_web_view_menu_action_add_speed_dial_cb), view);
gtk_widget_show (menuitem); gtk_widget_show (menuitem);
if (!view->customized_homepage_in_new_tabs) }
gtk_widget_set_sensitive (menuitem, FALSE);
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE_AS, NULL); menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE_AS, NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);