Enable Open pages in and Enable eveloper extras conditionally
This commit is contained in:
parent
8da012bac1
commit
cb5f646cf5
2 changed files with 40 additions and 22 deletions
|
@ -425,13 +425,9 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
||||||
button = katze_property_proxy (settings, "enable-plugins", NULL);
|
button = katze_property_proxy (settings, "enable-plugins", NULL);
|
||||||
gtk_button_set_label (GTK_BUTTON (button), _("Enable plugins"));
|
gtk_button_set_label (GTK_BUTTON (button), _("Enable plugins"));
|
||||||
SPANNED_ADD (button, 1, 2, 2, 3);
|
SPANNED_ADD (button, 1, 2, 2, 3);
|
||||||
#ifdef WEBKIT_CHECK_VERSION
|
|
||||||
#if WEBKIT_CHECK_VERSION (1, 0, 3)
|
|
||||||
button = katze_property_proxy (settings, "enable-developer-extras", NULL);
|
button = katze_property_proxy (settings, "enable-developer-extras", NULL);
|
||||||
gtk_button_set_label (GTK_BUTTON (button), _("Enable developer tools"));
|
gtk_button_set_label (GTK_BUTTON (button), _("Enable developer tools"));
|
||||||
SPANNED_ADD (button, 0, 1, 3, 4);
|
SPANNED_ADD (button, 0, 1, 3, 4);
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
label = katze_property_label (settings, "location-entry-search");
|
label = katze_property_label (settings, "location-entry-search");
|
||||||
INDENTED_ADD (label, 0, 1, 4, 5);
|
INDENTED_ADD (label, 0, 1, 4, 5);
|
||||||
entry = katze_property_proxy (settings, "location-entry-search", NULL);
|
entry = katze_property_proxy (settings, "location-entry-search", NULL);
|
||||||
|
@ -455,29 +451,29 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
||||||
"</span>");
|
"</span>");
|
||||||
FILLED_ADD (button, 0, 2, 2, 3);
|
FILLED_ADD (button, 0, 2, 2, 3);
|
||||||
FRAME_NEW (_("Browsing"));
|
FRAME_NEW (_("Browsing"));
|
||||||
TABLE_NEW (4, 2);
|
TABLE_NEW (5, 2);
|
||||||
label = katze_property_label (settings, "open-external-pages-in");
|
label = katze_property_label (settings, "open-new-pages-in");
|
||||||
INDENTED_ADD (label, 0, 1, 0, 1);
|
|
||||||
button = katze_property_proxy (settings, "open-external-pages-in", NULL);
|
|
||||||
FILLED_ADD (button, 1, 2, 0, 1);
|
|
||||||
/* label = katze_property_label (settings, "open-new-pages-in");
|
|
||||||
INDENTED_ADD (label, 0, 1, 0, 1);
|
INDENTED_ADD (label, 0, 1, 0, 1);
|
||||||
button = katze_property_proxy (settings, "open-new-pages-in", NULL);
|
button = katze_property_proxy (settings, "open-new-pages-in", NULL);
|
||||||
FILLED_ADD (button, 1, 2, 0, 1); */
|
FILLED_ADD (button, 1, 2, 0, 1);
|
||||||
|
label = katze_property_label (settings, "open-external-pages-in");
|
||||||
|
INDENTED_ADD (label, 0, 1, 1, 2);
|
||||||
|
button = katze_property_proxy (settings, "open-external-pages-in", NULL);
|
||||||
|
FILLED_ADD (button, 1, 2, 1, 2);
|
||||||
button = katze_property_proxy (settings, "always-show-tabbar", NULL);
|
button = katze_property_proxy (settings, "always-show-tabbar", NULL);
|
||||||
INDENTED_ADD (button, 0, 1, 1, 2);
|
|
||||||
button = katze_property_proxy (settings, "compact-sidepanel", NULL);
|
|
||||||
INDENTED_ADD (button, 1, 2, 1, 2);
|
|
||||||
button = katze_property_proxy (settings, "middle-click-opens-selection", NULL);
|
|
||||||
INDENTED_ADD (button, 0, 1, 2, 3);
|
INDENTED_ADD (button, 0, 1, 2, 3);
|
||||||
|
button = katze_property_proxy (settings, "compact-sidepanel", NULL);
|
||||||
|
INDENTED_ADD (button, 1, 2, 2, 3);
|
||||||
|
button = katze_property_proxy (settings, "middle-click-opens-selection", NULL);
|
||||||
|
INDENTED_ADD (button, 0, 1, 3, 4);
|
||||||
button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL);
|
button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL);
|
||||||
WIDGET_ADD (button, 1, 2, 2, 3);
|
|
||||||
/* button = katze_property_proxy (settings, "open-popups-in-tabs", NULL);
|
|
||||||
SPANNED_ADD (button, 0, 1, 2, 3);*/
|
|
||||||
button = katze_property_proxy (settings, "open-tabs-next-to-current", NULL);
|
|
||||||
WIDGET_ADD (button, 0, 1, 3, 4);
|
|
||||||
button = katze_property_proxy (settings, "close-buttons-on-tabs", NULL);
|
|
||||||
WIDGET_ADD (button, 1, 2, 3, 4);
|
WIDGET_ADD (button, 1, 2, 3, 4);
|
||||||
|
/* button = katze_property_proxy (settings, "open-popups-in-tabs", NULL);
|
||||||
|
SPANNED_ADD (button, 0, 1, 4, 5);*/
|
||||||
|
button = katze_property_proxy (settings, "open-tabs-next-to-current", NULL);
|
||||||
|
WIDGET_ADD (button, 0, 1, 5, 6);
|
||||||
|
button = katze_property_proxy (settings, "close-buttons-on-tabs", NULL);
|
||||||
|
WIDGET_ADD (button, 1, 2, 5, 6);
|
||||||
|
|
||||||
/* Page "Network" */
|
/* Page "Network" */
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -107,6 +107,7 @@ enum
|
||||||
PROP_OPEN_TABS_NEXT_TO_CURRENT,
|
PROP_OPEN_TABS_NEXT_TO_CURRENT,
|
||||||
PROP_OPEN_POPUPS_IN_TABS,
|
PROP_OPEN_POPUPS_IN_TABS,
|
||||||
|
|
||||||
|
PROP_ENABLE_DEVELOPER_EXTRAS,
|
||||||
PROP_ACCEPT_COOKIES,
|
PROP_ACCEPT_COOKIES,
|
||||||
PROP_ORIGINAL_COOKIES_ONLY,
|
PROP_ORIGINAL_COOKIES_ONLY,
|
||||||
PROP_MAXIMUM_COOKIE_AGE,
|
PROP_MAXIMUM_COOKIE_AGE,
|
||||||
|
@ -453,6 +454,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
|
||||||
TRUE,
|
TRUE,
|
||||||
flags));
|
flags));
|
||||||
|
|
||||||
|
g_type_class_ref (WEBKIT_TYPE_WEB_VIEW);
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_OPEN_NEW_PAGES_IN,
|
PROP_OPEN_NEW_PAGES_IN,
|
||||||
g_param_spec_enum (
|
g_param_spec_enum (
|
||||||
|
@ -461,7 +463,8 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
|
||||||
_("Where to open new pages"),
|
_("Where to open new pages"),
|
||||||
MIDORI_TYPE_NEW_PAGE,
|
MIDORI_TYPE_NEW_PAGE,
|
||||||
MIDORI_NEW_PAGE_TAB,
|
MIDORI_NEW_PAGE_TAB,
|
||||||
G_PARAM_READABLE));
|
g_signal_lookup ("create-web-view", WEBKIT_TYPE_WEB_VIEW)
|
||||||
|
? G_PARAM_READWRITE : G_PARAM_READABLE));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_OPEN_EXTERNAL_PAGES_IN,
|
PROP_OPEN_EXTERNAL_PAGES_IN,
|
||||||
|
@ -510,6 +513,22 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
|
|
||||||
|
if (!g_object_class_find_property (gobject_class, "enable-developer-extras"))
|
||||||
|
/**
|
||||||
|
* MidoriWebSettings:enable-developer-extras:
|
||||||
|
*
|
||||||
|
* Whether to enable extra developer tools.
|
||||||
|
*
|
||||||
|
* Since: 0.1.2
|
||||||
|
*/
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_ENABLE_DEVELOPER_EXTRAS,
|
||||||
|
g_param_spec_boolean (
|
||||||
|
"enable-developer-extras",
|
||||||
|
"Enable Developer Extras",
|
||||||
|
"Whether to enable extra developer tools",
|
||||||
|
FALSE,
|
||||||
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_ACCEPT_COOKIES,
|
PROP_ACCEPT_COOKIES,
|
||||||
|
@ -899,6 +918,9 @@ midori_web_settings_get_property (GObject* object,
|
||||||
g_value_set_boolean (value, web_settings->open_popups_in_tabs);
|
g_value_set_boolean (value, web_settings->open_popups_in_tabs);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PROP_ENABLE_DEVELOPER_EXTRAS:
|
||||||
|
g_value_set_boolean (value, FALSE);
|
||||||
|
break;
|
||||||
case PROP_ACCEPT_COOKIES:
|
case PROP_ACCEPT_COOKIES:
|
||||||
g_value_set_enum (value, web_settings->accept_cookies);
|
g_value_set_enum (value, web_settings->accept_cookies);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue