_action_set_sensitive (browser, "Forward",
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);
/* Currently views that don't support source, don't support
saving either. If that changes, we need to think of something. */
G_CALLBACK (midori_web_view_menu_action_activate_cb), view);
gtk_widget_show (menuitem);
- menuitem = gtk_image_menu_item_new_with_mnemonic (_("Add to customized _homepage"));
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
- g_object_set_data (G_OBJECT (menuitem), "action", "AddSpeedDial");
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (midori_web_view_menu_action_add_speed_dial_cb), view);
- gtk_widget_show (menuitem);
- if (!view->customized_homepage_in_new_tabs)
- gtk_widget_set_sensitive (menuitem, FALSE);
+ if (view->customized_homepage_in_new_tabs)
+ {
+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("Add to customized _homepage"));
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ g_object_set_data (G_OBJECT (menuitem), "action", "AddSpeedDial");
+ g_signal_connect (menuitem, "activate",
+ G_CALLBACK (midori_web_view_menu_action_add_speed_dial_cb), view);
+ gtk_widget_show (menuitem);
+ }
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE_AS, NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);