Show script, image and plugin options and views source in app menu
This commit is contained in:
parent
8cf6f4fa6c
commit
552c99cd56
3 changed files with 28 additions and 13 deletions
|
@ -2920,8 +2920,9 @@ _action_compact_menu_populate_popup (GtkAction* action,
|
|||
#if HAVE_HILDON
|
||||
{ "Find" },
|
||||
{ "Homepage" },
|
||||
{ "ManageSearchEngines" },
|
||||
{ "SourceView" },
|
||||
#else
|
||||
{ "ManageSearchEngines" },
|
||||
{ "Print" },
|
||||
{ "PrivateBrowsing" },
|
||||
{ NULL },
|
||||
|
@ -2930,12 +2931,15 @@ _action_compact_menu_populate_popup (GtkAction* action,
|
|||
{ "Statusbar" },
|
||||
{ NULL },
|
||||
{ "-" },
|
||||
#endif
|
||||
{ "ClearPrivateData" },
|
||||
#if !HAVE_HILDON
|
||||
{ "Fullscreen" },
|
||||
#endif
|
||||
{ "Preferences" },
|
||||
#if HAVE_HILDON
|
||||
{ "auto-load-images" },
|
||||
{ "enable-scripts" },
|
||||
{ "enable-plugins" },
|
||||
#endif
|
||||
};
|
||||
guint i;
|
||||
|
||||
|
@ -2954,14 +2958,19 @@ _action_compact_menu_populate_popup (GtkAction* action,
|
|||
if (!actions[i].name)
|
||||
continue;
|
||||
_action = _action_by_name (browser, actions[i].name);
|
||||
label = katze_object_get_string (_action, "label");
|
||||
button = hildon_gtk_button_new (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
|
||||
if (_action)
|
||||
{
|
||||
label = katze_object_get_string (_action, "label");
|
||||
button = hildon_gtk_button_new (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
|
||||
gtk_button_set_label (GTK_BUTTON (button), label);
|
||||
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
|
||||
g_free (label);
|
||||
g_signal_connect_swapped (button, "clicked",
|
||||
G_CALLBACK (gtk_action_activate), _action);
|
||||
}
|
||||
else
|
||||
button = katze_property_proxy (browser->settings, actions[i].name, NULL);
|
||||
gtk_widget_show (button);
|
||||
gtk_button_set_label (GTK_BUTTON (button), label);
|
||||
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
|
||||
g_free (label);
|
||||
g_signal_connect_swapped (button, "clicked",
|
||||
G_CALLBACK (gtk_action_activate), _action);
|
||||
hildon_app_menu_append (HILDON_APP_MENU (menu), GTK_BUTTON (button));
|
||||
#else
|
||||
GtkWidget* menuitem;
|
||||
|
|
|
@ -371,10 +371,12 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
|||
/* Page "Behavior" */
|
||||
PAGE_NEW (GTK_STOCK_SELECT_COLOR, _("Behavior"));
|
||||
FRAME_NEW (_("Features"));
|
||||
#if !HAVE_HILDON
|
||||
button = katze_property_proxy (settings, "auto-load-images", NULL);
|
||||
gtk_button_set_label (GTK_BUTTON (button), _("Load images automatically"));
|
||||
gtk_widget_set_tooltip_text (button, _("Load and display images automatically"));
|
||||
INDENTED_ADD (button);
|
||||
#endif
|
||||
#if WEBKIT_CHECK_VERSION (1, 1, 15) || HAVE_HILDON
|
||||
if (katze_object_get_boolean (gtk_settings, "gtk-touchscreen-mode"))
|
||||
button = katze_property_proxy (settings, "kinetic-scrolling", NULL);
|
||||
|
@ -388,6 +390,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
|||
button = katze_property_proxy (settings, "middle-click-opens-selection", NULL);
|
||||
#endif
|
||||
SPANNED_ADD (button);
|
||||
#if !HAVE_HILDON
|
||||
button = katze_property_proxy (settings, "enable-scripts", NULL);
|
||||
gtk_button_set_label (GTK_BUTTON (button), _("Enable scripts"));
|
||||
gtk_widget_set_tooltip_text (button, _("Enable embedded scripting languages"));
|
||||
|
@ -396,7 +399,6 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
|||
gtk_button_set_label (GTK_BUTTON (button), _("Enable Netscape plugins"));
|
||||
gtk_widget_set_tooltip_text (button, _("Enable embedded Netscape plugin objects"));
|
||||
SPANNED_ADD (button);
|
||||
#if !HAVE_HILDON
|
||||
button = katze_property_proxy (settings, "enforce-96-dpi", NULL);
|
||||
gtk_button_set_label (GTK_BUTTON (button), _("Enforce 96 dots per inch"));
|
||||
gtk_widget_set_tooltip_text (button, _("Enforce a video dot density of 96 DPI"));
|
||||
|
@ -443,13 +445,15 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
|||
INDENTED_ADD (label);
|
||||
button = katze_property_proxy (settings, "open-external-pages-in", NULL);
|
||||
SPANNED_ADD (button);
|
||||
#if !HAVE_HILDON
|
||||
button = katze_property_proxy (settings, "always-show-tabbar", NULL);
|
||||
INDENTED_ADD (button);
|
||||
button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL);
|
||||
button = katze_property_proxy (settings, "close-buttons-on-tabs", NULL);
|
||||
SPANNED_ADD (button);
|
||||
#endif
|
||||
button = katze_property_proxy (settings, "open-tabs-next-to-current", NULL);
|
||||
INDENTED_ADD (button);
|
||||
button = katze_property_proxy (settings, "close-buttons-on-tabs", NULL);
|
||||
button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL);
|
||||
SPANNED_ADD (button);
|
||||
|
||||
#if !HAVE_HILDON
|
||||
|
|
|
@ -2017,6 +2017,7 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
|
|||
menuitem = sokoke_action_create_popup_menu_item (
|
||||
gtk_action_group_get_action (actions, "SaveAs"));
|
||||
gtk_menu_shell_append (menu_shell, menuitem);
|
||||
#if !HAVE_HILDON
|
||||
/* Currently views that don't support source, don't support
|
||||
saving either. If that changes, we need to think of something. */
|
||||
if (!midori_view_can_view_source (view))
|
||||
|
@ -2024,6 +2025,7 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
|
|||
menuitem = sokoke_action_create_popup_menu_item (
|
||||
gtk_action_group_get_action (actions, "SourceView"));
|
||||
gtk_menu_shell_append (menu_shell, menuitem);
|
||||
#endif
|
||||
}
|
||||
|
||||
gtk_widget_show_all (menu);
|
||||
|
|
Loading…
Reference in a new issue