INDENTED_ADD (label);
button = katze_property_proxy (settings, "load-on-startup", NULL);
SPANNED_ADD (button);
- label = katze_property_label (settings, "homepage");
+ label = gtk_label_new (_("Homepage:"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "homepage", "address");
SPANNED_ADD (entry);
FRAME_NEW (NULL);
#if !HAVE_HILDON
button = katze_property_proxy (settings, "auto-load-images", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Load images automatically"));
INDENTED_ADD (button);
button = katze_property_proxy (settings, "enable-spell-checking", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Enable Spell Checking"));
SPANNED_ADD (button);
/* Disable spell check option if there are no enchant modules */
{
g_free (enchant_path);
}
button = katze_property_proxy (settings, "enable-scripts", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Enable scripts"));
INDENTED_ADD (button);
button = katze_property_proxy (settings, "enable-plugins", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Enable Netscape plugins"));
+ gtk_widget_set_sensitive (button, midori_web_settings_has_plugin_support ());
SPANNED_ADD (button);
#endif
button = katze_property_proxy (settings, "zoom-text-and-images", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Zoom Text and Images"));
INDENTED_ADD (button);
button = katze_property_proxy (settings, "javascript-can-open-windows-automatically", NULL);
gtk_button_set_label (GTK_BUTTON (button), _("Allow scripts to open popups"));
SPANNED_ADD (button);
if (katze_widget_has_touchscreen_mode (parent ?
GTK_WIDGET (parent) : GTK_WIDGET (preferences)))
+ {
button = katze_property_proxy (settings, "kinetic-scrolling", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Kinetic scrolling"));
+ gtk_widget_set_tooltip_text (button, _("Whether scrolling should kinetically move according to speed"));
+ }
else
+ {
button = katze_property_proxy (settings, "middle-click-opens-selection", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Middle click opens Selection"));
+ gtk_widget_set_tooltip_text (button, _("Load an address from the selection via middle click"));
+ }
INDENTED_ADD (button);
if (katze_object_has_property (settings, "enable-webgl"))
{
button = katze_property_proxy (settings, "enable-webgl", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Enable WebGL support"));
SPANNED_ADD (button);
}
#ifndef G_OS_WIN32
button = katze_property_proxy (settings, "flash-window-on-new-bg-tabs", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Flash window on background tabs"));
INDENTED_ADD (button);
#endif
INDENTED_ADD (button);
entry = katze_property_proxy (settings, "preferred-languages", "languages");
SPANNED_ADD (entry);
- #if !HAVE_HILDON
- label = katze_property_label (settings, "download-folder");
+ label = gtk_label_new (_("Save downloaded files to:"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
button = katze_property_proxy (settings, "download-folder", "folder");
SPANNED_ADD (button);
- #endif
/* Page "Interface" */
PAGE_NEW (GTK_STOCK_CONVERT, _("Browsing"));
INDENTED_ADD (label);
button = katze_property_proxy (settings, "open-new-pages-in", NULL);
SPANNED_ADD (button);
- #if !HAVE_HILDON
button = katze_property_proxy (settings, "close-buttons-on-tabs", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Close Buttons on Tabs"));
INDENTED_ADD (button);
#ifndef HAVE_GRANITE
button = katze_property_proxy (settings, "always-show-tabbar", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Always Show Tabbar"));
SPANNED_ADD (button);
#endif
- #endif
button = katze_property_proxy (settings, "open-tabs-next-to-current", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Open Tabs next to Current"));
+ gtk_widget_set_tooltip_text (button, _("Whether to open new tabs next to the current tab or after the last one"));
INDENTED_ADD (button);
button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL);
+ gtk_button_set_label (GTK_BUTTON (button), _("Open tabs in the background"));
SPANNED_ADD (button);
- #if !HAVE_HILDON
+
INDENTED_ADD (gtk_label_new (NULL));
- label = katze_property_label (settings, "text-editor");
+ label = gtk_label_new (_("Text Editor"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "text-editor", "application-text/plain");
SPANNED_ADD (entry);
- label = katze_property_label (settings, "news-aggregator");
+ label = gtk_label_new (_("News Aggregator"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "news-aggregator", "application-News");
SPANNED_ADD (entry);
- #endif
/* Page "Network" */
PAGE_NEW (GTK_STOCK_NETWORK, _("Network"));
FRAME_NEW (NULL);
- #if !HAVE_HILDON
- label = katze_property_label (settings, "proxy-type");
+ label = gtk_label_new (_("Proxy server"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
button = katze_property_proxy (settings, "proxy-type", NULL);
SPANNED_ADD (button);
g_signal_connect (settings, "notify::proxy-type",
G_CALLBACK (midori_preferences_notify_proxy_type_cb), entry);
midori_preferences_notify_proxy_type_cb (settings, NULL, entry);
- label = katze_property_label (settings, "http-proxy-port");
+ label = gtk_label_new (_("Port"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "http-proxy-port", NULL);
g_signal_connect (settings, "notify::proxy-type",
G_CALLBACK (midori_preferences_notify_proxy_type_cb), entry);
midori_preferences_notify_proxy_type_cb (settings, NULL, entry);
- #endif
#if WEBKIT_CHECK_VERSION (1, 3, 11)
if (soup_session_get_feature (webkit_get_default_session (), SOUP_TYPE_CACHE))
{
- label = katze_property_label (settings, "maximum-cache-size");
+ label = gtk_label_new (_("Web Cache"));
+ gtk_widget_set_tooltip_text (label, _("The maximum size of cached pages on disk"));
INDENTED_ADD (label);
button = katze_property_proxy (settings, "maximum-cache-size", NULL);
+ gtk_widget_set_tooltip_text (button, _("The maximum size of cached pages on disk"));
SPANNED_ADD (button);
label = gtk_label_new (_("MB"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
{
MidoriSettings parent_instance;
- gboolean show_menubar : 1;
- gboolean show_navigationbar : 1;
- gboolean show_bookmarkbar : 1;
- gboolean show_panel : 1;
- gboolean show_statusbar : 1;
MidoriToolbarStyle toolbar_style : 3;
- gboolean compact_sidepanel : 1;
- gboolean right_align_sidepanel : 1;
- gboolean open_panels_in_windows : 1;
MidoriStartup load_on_startup : 2;
- gboolean show_crash_dialog : 1;
MidoriPreferredEncoding preferred_encoding : 3;
- gboolean always_show_tabbar : 1;
- gboolean close_buttons_on_tabs : 1;
gint close_buttons_left;
MidoriNewPage open_new_pages_in : 2;
- gboolean middle_click_opens_selection : 1;
- gboolean open_tabs_in_the_background : 1;
- gboolean open_tabs_next_to_current : 1;
- gboolean open_popups_in_tabs : 1;
- gboolean zoom_text_and_images : 1;
- gboolean find_while_typing : 1;
- gboolean kinetic_scrolling : 1;
gboolean first_party_cookies_only : 1;
- gboolean remember_last_visited_pages : 1;
MidoriProxy proxy_type : 2;
MidoriIdentity identify_as : 3;
- gint maximum_cookie_age;
- gint maximum_history_age;
- gint search_width;
-
- gchar* homepage;
- gchar* download_folder;
- gchar* text_editor;
- gchar* news_aggregator;
- gchar* http_proxy;
- gint http_proxy_port;
- #if WEBKIT_CHECK_VERSION (1, 3, 11)
- gint maximum_cache_size;
- #endif
gchar* http_accept_language;
gchar* accept;
gchar* ident_string;
#if !WEBKIT_CHECK_VERSION (1, 3, 13)
gboolean enable_dns_prefetching;
#endif
- gboolean strip_referer;
gboolean enforce_font_family;
- gboolean flash_window_on_bg_tabs;
gchar* user_stylesheet_uri;
gchar* user_stylesheet_uri_cached;
GHashTable* user_stylesheets;
{
PROP_0,
- PROP_SHOW_MENUBAR,
- PROP_SHOW_NAVIGATIONBAR,
- PROP_SHOW_BOOKMARKBAR,
- PROP_SHOW_PANEL,
- PROP_SHOW_STATUSBAR,
-
PROP_TOOLBAR_STYLE,
- PROP_RIGHT_ALIGN_SIDEPANEL,
PROP_LOAD_ON_STARTUP,
- PROP_HOMEPAGE,
- PROP_SHOW_CRASH_DIALOG,
- PROP_DOWNLOAD_FOLDER,
- PROP_TEXT_EDITOR,
- PROP_NEWS_AGGREGATOR,
PROP_PREFERRED_ENCODING,
- PROP_ALWAYS_SHOW_TABBAR,
- PROP_CLOSE_BUTTONS_ON_TABS,
PROP_CLOSE_BUTTONS_LEFT,
PROP_OPEN_NEW_PAGES_IN,
- PROP_MIDDLE_CLICK_OPENS_SELECTION,
- PROP_OPEN_TABS_IN_THE_BACKGROUND,
- PROP_OPEN_TABS_NEXT_TO_CURRENT,
- PROP_OPEN_POPUPS_IN_TABS,
- PROP_FLASH_WINDOW_ON_BG_TABS,
- PROP_ENABLE_WEBGL,
PROP_ENABLE_FULLSCREEN,
- PROP_AUTO_LOAD_IMAGES,
- PROP_ENABLE_SCRIPTS,
PROP_ENABLE_PLUGINS,
- PROP_ENABLE_DEVELOPER_EXTRAS,
- PROP_ENABLE_SPELL_CHECKING,
- PROP_ENABLE_HTML5_DATABASE,
- PROP_ENABLE_HTML5_LOCAL_STORAGE,
- PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE,
PROP_ENABLE_PAGE_CACHE,
- PROP_ZOOM_TEXT_AND_IMAGES,
- PROP_KINETIC_SCROLLING,
- PROP_MAXIMUM_COOKIE_AGE,
- PROP_FIRST_PARTY_COOKIES_ONLY,
-
- PROP_MAXIMUM_HISTORY_AGE,
PROP_PROXY_TYPE,
- PROP_HTTP_PROXY,
- PROP_HTTP_PROXY_PORT,
- PROP_MAXIMUM_CACHE_SIZE,
PROP_IDENTIFY_AS,
PROP_USER_AGENT,
PROP_PREFERRED_LANGUAGES,
PROP_SITE_DATA_RULES,
PROP_ENABLE_DNS_PREFETCHING,
- PROP_STRIP_REFERER,
PROP_ENFORCE_FONT_FAMILY,
PROP_USER_STYLESHEET_URI,
};
GValue* value,
GParamSpec* pspec);
-static const gchar*
-midori_get_download_dir (void)
-{
- const gchar* dir = g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD);
- if (dir)
- {
- katze_mkdir_with_parents (dir, 0700);
- return dir;
- }
- return g_get_home_dir ();
-}
static gboolean
midori_web_settings_low_memory_profile ()
{
flags = G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS;
- g_object_class_install_property (gobject_class,
- PROP_SHOW_MENUBAR,
- g_param_spec_boolean (
- "show-menubar",
- _("Show Menubar"),
- _("Whether to show the menubar"),
- FALSE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_SHOW_NAVIGATIONBAR,
- g_param_spec_boolean (
- "show-navigationbar",
- _("Show Navigationbar"),
- _("Whether to show the navigationbar"),
- TRUE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_SHOW_BOOKMARKBAR,
- g_param_spec_boolean (
- "show-bookmarkbar",
- _("Show Bookmarkbar"),
- _("Whether to show the bookmarkbar"),
- FALSE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_SHOW_PANEL,
- g_param_spec_boolean (
- "show-panel",
- _("Show Panel"),
- _("Whether to show the panel"),
- FALSE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_SHOW_STATUSBAR,
- g_param_spec_boolean (
- "show-statusbar",
- _("Show Statusbar"),
- _("Whether to show the statusbar"),
- TRUE,
- flags));
-
-
g_object_class_install_property (gobject_class,
PROP_TOOLBAR_STYLE,
g_param_spec_enum (
MIDORI_TOOLBAR_DEFAULT,
flags));
- /**
- * MidoriWebSettings:right-sidepanel:
- *
- * Whether to align the sidepanel on the right.
- *
- * Since: 0.1.3
- */
- g_object_class_install_property (gobject_class,
- PROP_RIGHT_ALIGN_SIDEPANEL,
- g_param_spec_boolean (
- "right-align-sidepanel",
- _("Align sidepanel on the right"),
- _("Whether to align the sidepanel on the right"),
- FALSE,
- flags));
-
g_object_class_install_property (gobject_class,
PROP_LOAD_ON_STARTUP,
g_param_spec_enum (
"load-on-startup",
_("When Midori starts:"),
- _("What to do when Midori starts"),
+ "What to do when Midori starts",
MIDORI_TYPE_STARTUP,
MIDORI_STARTUP_LAST_OPEN_PAGES,
flags));
- g_object_class_install_property (gobject_class,
- PROP_HOMEPAGE,
- g_param_spec_string (
- "homepage",
- _("Homepage:"),
- _("The homepage"),
- "http://www.google.com",
- flags));
-
- /**
- * MidoriWebSettings:show-crash-dialog:
- *
- * Show a dialog after Midori crashed.
- *
- * Since: 0.1.2
- */
- g_object_class_install_property (gobject_class,
- PROP_SHOW_CRASH_DIALOG,
- g_param_spec_boolean (
- "show-crash-dialog",
- _("Show crash dialog"),
- _("Show a dialog after Midori crashed"),
- TRUE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_DOWNLOAD_FOLDER,
- g_param_spec_string (
- "download-folder",
- _("Save downloaded files to:"),
- _("The folder downloaded files are saved to"),
- midori_get_download_dir (),
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_TEXT_EDITOR,
- g_param_spec_string (
- "text-editor",
- _("Text Editor"),
- _("An external text editor"),
- NULL,
- flags));
-
- /**
- * MidoriWebSettings:news-aggregator:
- *
- * An external news aggregator.
- *
- * Since: 0.1.6
- */
- g_object_class_install_property (gobject_class,
- PROP_NEWS_AGGREGATOR,
- g_param_spec_string (
- "news-aggregator",
- _("News Aggregator"),
- _("An external news aggregator"),
- NULL,
- flags));
-
g_object_class_install_property (gobject_class,
PROP_PREFERRED_ENCODING,
g_param_spec_enum (
"preferred-encoding",
_("Preferred Encoding"),
- _("The preferred character encoding"),
+ "The preferred character encoding",
MIDORI_TYPE_PREFERRED_ENCODING,
MIDORI_ENCODING_WESTERN,
flags));
-
- g_object_class_install_property (gobject_class,
- PROP_ALWAYS_SHOW_TABBAR,
- g_param_spec_boolean (
- "always-show-tabbar",
- _("Always Show Tabbar"),
- _("Always show the tabbar"),
- TRUE,
- #ifdef HAVE_GRANITE
- G_PARAM_READABLE
- #else
- flags
- #endif
- ));
-
- g_object_class_install_property (gobject_class,
- PROP_CLOSE_BUTTONS_ON_TABS,
- g_param_spec_boolean (
- "close-buttons-on-tabs",
- _("Close Buttons on Tabs"),
- _("Whether tabs have close buttons"),
- TRUE,
- flags));
-
/**
* MidoriWebSettings:close-buttons-left:
*
g_param_spec_enum (
"open-new-pages-in",
_("Open new pages in:"),
- _("Where to open new pages"),
+ "Where to open new pages",
MIDORI_TYPE_NEW_PAGE,
MIDORI_NEW_PAGE_TAB,
flags));
- g_object_class_install_property (gobject_class,
- PROP_MIDDLE_CLICK_OPENS_SELECTION,
- g_param_spec_boolean (
- "middle-click-opens-selection",
- _("Middle click opens Selection"),
- _("Load an address from the selection via middle click"),
- TRUE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_OPEN_TABS_IN_THE_BACKGROUND,
- g_param_spec_boolean (
- "open-tabs-in-the-background",
- _("Open tabs in the background"),
- _("Whether to open new tabs in the background"),
- FALSE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_OPEN_TABS_NEXT_TO_CURRENT,
- g_param_spec_boolean (
- "open-tabs-next-to-current",
- _("Open Tabs next to Current"),
- _("Whether to open new tabs next to the current tab or after the last one"),
- TRUE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_OPEN_POPUPS_IN_TABS,
- g_param_spec_boolean (
- "open-popups-in-tabs",
- _("Open popups in tabs"),
- _("Whether to open popup windows in tabs"),
- TRUE,
- flags));
-
-
- /* Override properties to localize them for preference proxies */
- g_object_class_install_property (gobject_class,
- PROP_AUTO_LOAD_IMAGES,
- g_param_spec_boolean (
- "auto-load-images",
- _("Load images automatically"),
- _("Load and display images automatically"),
- TRUE,
- flags));
- g_object_class_install_property (gobject_class,
- PROP_ENABLE_SCRIPTS,
- g_param_spec_boolean (
- "enable-scripts",
- _("Enable scripts"),
- _("Enable embedded scripting languages"),
- TRUE,
- flags));
g_object_class_install_property (gobject_class,
PROP_ENABLE_PLUGINS,
g_param_spec_boolean (
"enable-plugins",
- _("Enable Netscape plugins"),
- _("Enable embedded Netscape plugin objects"),
- midori_web_settings_has_plugin_support (),
- midori_web_settings_has_plugin_support () ? flags : G_PARAM_READABLE));
- /* Override properties to override defaults */
- g_object_class_install_property (gobject_class,
- PROP_ENABLE_DEVELOPER_EXTRAS,
- g_param_spec_boolean (
- "enable-developer-extras",
- "Enable developer tools",
- "Enable special extensions for developers",
+ "Enable Netscape plugins",
+ "Enable embedded Netscape plugin objects",
TRUE,
flags));
- g_object_class_install_property (gobject_class,
- PROP_ENABLE_SPELL_CHECKING,
- g_param_spec_boolean ("enable-spell-checking",
- _("Enable Spell Checking"),
- _("Enable spell checking while typing"),
- TRUE,
- flags));
- g_object_class_install_property (gobject_class,
- PROP_ENABLE_HTML5_DATABASE,
- g_param_spec_boolean ("enable-html5-database",
- _("Enable HTML5 database support"),
- _("Whether to enable HTML5 database support"),
- FALSE,
- flags));
- g_object_class_install_property (gobject_class,
- PROP_ENABLE_HTML5_LOCAL_STORAGE,
- g_param_spec_boolean ("enable-html5-local-storage",
- _("Enable HTML5 local storage support"),
- _("Whether to enable HTML5 local storage support"),
- FALSE,
- flags));
- g_object_class_install_property (gobject_class,
- PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE,
- g_param_spec_boolean ("enable-offline-web-application-cache",
- _("Enable offline web application cache"),
- _("Whether to enable offline web application cache"),
- FALSE,
- flags));
+
#if WEBKIT_CHECK_VERSION (1, 1, 18)
g_object_class_install_property (gobject_class,
PROP_ENABLE_PAGE_CACHE,
!midori_web_settings_low_memory_profile (),
flags));
#endif
- /**
- * MidoriWebSettings::flash-window-on-new-bg-tabs
- *
- * Uses opacity to attract attention. Nothing on Windows.
- */
- g_object_class_install_property (gobject_class,
- PROP_FLASH_WINDOW_ON_BG_TABS,
- g_param_spec_boolean (
- "flash-window-on-new-bg-tabs",
- _("Flash window on background tabs"),
- _("Flash the browser window if a new tab was opened in the background"),
- FALSE,
- flags));
- if (g_object_class_find_property (gobject_class, "enable-webgl"))
- g_object_class_install_property (gobject_class,
- PROP_ENABLE_WEBGL,
- g_param_spec_boolean (
- "enable-webgl",
- _("Enable WebGL support"),
- _("Allow websites to use OpenGL rendering"),
- /* Enable by default for git builds */
- !g_str_equal (PACKAGE_VERSION, MIDORI_VERSION),
- flags));
if (g_object_class_find_property (gobject_class, "enable-fullscreen"))
g_object_class_install_property (gobject_class,
PROP_ENABLE_FULLSCREEN,
TRUE,
flags));
-
- /**
- * MidoriWebSettings:zoom-text-and-images:
- *
- * Whether to zoom text and images.
- *
- * Since: 0.1.3
- */
- g_object_class_install_property (gobject_class,
- PROP_ZOOM_TEXT_AND_IMAGES,
- g_param_spec_boolean (
- "zoom-text-and-images",
- _("Zoom Text and Images"),
- _("Whether to zoom text and images"),
- TRUE,
- flags));
-
- /**
- * MidoriWebSettings:kinetic-scrolling:
- *
- * Whether scrolling should kinetically move according to speed.
- *
- * Since: 0.2.0
- */
- g_object_class_install_property (gobject_class,
- PROP_KINETIC_SCROLLING,
- g_param_spec_boolean (
- "kinetic-scrolling",
- _("Kinetic scrolling"),
- _("Whether scrolling should kinetically move according to speed"),
- TRUE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_MAXIMUM_COOKIE_AGE,
- g_param_spec_int (
- "maximum-cookie-age",
- _("Delete old Cookies after:"),
- _("The maximum number of days to save cookies for"),
- 0, G_MAXINT, 30,
- flags));
-
- /**
- * MidoriWebSettings:first-party-cookies-only:
- *
- * Whether only first party cookies should be accepted.
- * WebKitGTK+ 1.1.21 is required for this to work.
- *
- * Since: 0.4.2
- */
- g_object_class_install_property (gobject_class,
- PROP_FIRST_PARTY_COOKIES_ONLY,
- g_param_spec_boolean (
- "first-party-cookies-only",
- _("Only accept Cookies from sites you visit"),
- _("Block cookies sent by third-party websites"),
- #ifdef HAVE_LIBSOUP_2_29_91
- TRUE,
- g_object_class_find_property (gobject_class, /* WebKitGTK+ >= 1.1.21 */
- "enable-file-access-from-file-uris") ? flags : G_PARAM_READABLE));
- #else
- FALSE,
- G_PARAM_READABLE));
- #endif
-
- g_object_class_install_property (gobject_class,
- PROP_MAXIMUM_HISTORY_AGE,
- g_param_spec_int (
- "maximum-history-age",
- _("Delete pages from history after:"),
- _("The maximum number of days to save the history for"),
- 0, G_MAXINT, 30,
- flags));
-
/**
* MidoriWebSettings:proxy-type:
*
PROP_PROXY_TYPE,
g_param_spec_enum (
"proxy-type",
- _("Proxy server"),
- _("The type of proxy server to use"),
+ "Proxy server",
+ "The type of proxy server to use",
MIDORI_TYPE_PROXY,
MIDORI_PROXY_AUTOMATIC,
flags));
- g_object_class_install_property (gobject_class,
- PROP_HTTP_PROXY,
- g_param_spec_string (
- "http-proxy",
- _("HTTP Proxy Server"),
- _("The proxy server used for HTTP connections"),
- NULL,
- flags));
-
- /**
- * MidoriWebSettings:http-proxy-port:
- *
- * The proxy server port used for HTTP connections
- *
- * Since: 0.4.2
- */
- g_object_class_install_property (gobject_class,
- PROP_HTTP_PROXY_PORT,
- g_param_spec_int (
- "http-proxy-port",
- _("Port"),
- _("The proxy server port used for HTTP connections"),
- 1, 65535, 8080,
- flags
- ));
-
- #if WEBKIT_CHECK_VERSION (1, 3, 11)
- /**
- * MidoriWebSettings:maximum-cache-size:
- *
- * The maximum size of cached pages on disk.
- *
- * Since: 0.3.4
- */
- g_object_class_install_property (gobject_class,
- PROP_MAXIMUM_CACHE_SIZE,
- g_param_spec_int (
- "maximum-cache-size",
- _("Web Cache"),
- _("The maximum size of cached pages on disk"),
- 0, G_MAXINT, 100,
- flags));
- #endif
-
/**
* MidoriWebSettings:identify-as:
*
flags));
#endif
- /**
- * MidoriWebSettings:strip-referer:
- *
- * Whether to strip referrer details sent to external sites.
- *
- * Since: 0.3.4
- */
- g_object_class_install_property (gobject_class,
- PROP_STRIP_REFERER,
- g_param_spec_boolean (
- "strip-referer",
- /* i18n: Reworded: Shorten details propagated when going to another page */
- _("Strip referrer details sent to websites"),
- /* i18n: Referer here is not a typo but a technical term */
- _("Whether the \"Referer\" header should be shortened to the hostname"),
- FALSE,
- flags));
/**
* MidoriWebSettings:enforc-font-family:
*
"User stylesheet URI",
"Load stylesheets from a local URI",
NULL,
- flags | MIDORI_PARAM_DELAY_SAVING));
+ flags));
}
static void
static void
midori_web_settings_init (MidoriWebSettings* web_settings)
{
- web_settings->download_folder = g_strdup (midori_get_download_dir ());
- web_settings->http_proxy = NULL;
- web_settings->open_popups_in_tabs = TRUE;
- web_settings->kinetic_scrolling = TRUE;
web_settings->user_stylesheet_uri = web_settings->user_stylesheet_uri_cached = NULL;
web_settings->user_stylesheets = NULL;
web_settings = MIDORI_WEB_SETTINGS (object);
- katze_assign (web_settings->homepage, NULL);
- katze_assign (web_settings->download_folder, NULL);
- katze_assign (web_settings->text_editor, NULL);
- katze_assign (web_settings->news_aggregator, NULL);
- katze_assign (web_settings->http_proxy, NULL);
katze_assign (web_settings->http_accept_language, NULL);
katze_assign (web_settings->accept, NULL);
katze_assign (web_settings->ident_string, NULL);
switch (prop_id)
{
- case PROP_SHOW_MENUBAR:
- web_settings->show_menubar = g_value_get_boolean (value);
- break;
- case PROP_SHOW_NAVIGATIONBAR:
- web_settings->show_navigationbar = g_value_get_boolean (value);
- break;
- case PROP_SHOW_BOOKMARKBAR:
- web_settings->show_bookmarkbar = g_value_get_boolean (value);
- break;
- case PROP_SHOW_PANEL:
- web_settings->show_panel = g_value_get_boolean (value);
- break;
- case PROP_SHOW_STATUSBAR:
- web_settings->show_statusbar = g_value_get_boolean (value);
- break;
-
case PROP_TOOLBAR_STYLE:
web_settings->toolbar_style = g_value_get_enum (value);
break;
- case PROP_RIGHT_ALIGN_SIDEPANEL:
- web_settings->right_align_sidepanel = g_value_get_boolean (value);
- break;
case PROP_LOAD_ON_STARTUP:
web_settings->load_on_startup = g_value_get_enum (value);
break;
- case PROP_HOMEPAGE:
- katze_assign (web_settings->homepage, g_value_dup_string (value));
- break;
- case PROP_SHOW_CRASH_DIALOG:
- web_settings->show_crash_dialog = g_value_get_boolean (value);
- break;
- case PROP_DOWNLOAD_FOLDER:
- katze_assign (web_settings->download_folder, g_value_dup_string (value));
- break;
- case PROP_TEXT_EDITOR:
- katze_assign (web_settings->text_editor, g_value_dup_string (value));
- break;
- case PROP_NEWS_AGGREGATOR:
- katze_assign (web_settings->news_aggregator, g_value_dup_string (value));
- break;
case PROP_PREFERRED_ENCODING:
web_settings->preferred_encoding = g_value_get_enum (value);
switch (web_settings->preferred_encoding)
}
break;
- case PROP_ALWAYS_SHOW_TABBAR:
- web_settings->always_show_tabbar = g_value_get_boolean (value);
- break;
- case PROP_CLOSE_BUTTONS_ON_TABS:
- web_settings->close_buttons_on_tabs = g_value_get_boolean (value);
- break;
case PROP_OPEN_NEW_PAGES_IN:
web_settings->open_new_pages_in = g_value_get_enum (value);
break;
- case PROP_MIDDLE_CLICK_OPENS_SELECTION:
- web_settings->middle_click_opens_selection = g_value_get_boolean (value);
- break;
- case PROP_OPEN_TABS_IN_THE_BACKGROUND:
- web_settings->open_tabs_in_the_background = g_value_get_boolean (value);
- break;
- case PROP_OPEN_TABS_NEXT_TO_CURRENT:
- web_settings->open_tabs_next_to_current = g_value_get_boolean (value);
- break;
- case PROP_OPEN_POPUPS_IN_TABS:
- web_settings->open_popups_in_tabs = g_value_get_boolean (value);
- break;
- case PROP_AUTO_LOAD_IMAGES:
- g_object_set (web_settings, "WebKitWebSettings::auto-load-images",
- g_value_get_boolean (value), NULL);
- break;
- case PROP_ENABLE_SCRIPTS:
- g_object_set (web_settings, "WebKitWebSettings::enable-scripts",
- g_value_get_boolean (value), NULL);
- break;
case PROP_ENABLE_PLUGINS:
g_object_set (web_settings,
"WebKitWebSettings::enable-plugins", g_value_get_boolean (value),
#endif
NULL);
break;
- case PROP_ENABLE_DEVELOPER_EXTRAS:
- g_object_set (web_settings, "WebKitWebSettings::enable-developer-extras",
- g_value_get_boolean (value), NULL);
- break;
- case PROP_ENABLE_SPELL_CHECKING:
- g_object_set (web_settings, "WebKitWebSettings::enable-spell-checking",
- g_value_get_boolean (value), NULL);
- break;
- case PROP_ENABLE_HTML5_DATABASE:
- g_object_set (web_settings, "WebKitWebSettings::enable-html5-database",
- g_value_get_boolean (value), NULL);
- break;
- case PROP_ENABLE_HTML5_LOCAL_STORAGE:
- g_object_set (web_settings, "WebKitWebSettings::enable-html5-local-storage",
- g_value_get_boolean (value), NULL);
- break;
- case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE:
- g_object_set (web_settings, "WebKitWebSettings::enable-offline-web-application-cache",
- g_value_get_boolean (value), NULL);
- break;
#if WEBKIT_CHECK_VERSION (1, 1, 18)
case PROP_ENABLE_PAGE_CACHE:
g_object_set (web_settings, "WebKitWebSettings::enable-page-cache",
g_value_get_boolean (value), NULL);
break;
#endif
- case PROP_ZOOM_TEXT_AND_IMAGES:
- web_settings->zoom_text_and_images = g_value_get_boolean (value);
- break;
- case PROP_KINETIC_SCROLLING:
- web_settings->kinetic_scrolling = g_value_get_boolean (value);
- break;
- case PROP_MAXIMUM_COOKIE_AGE:
- web_settings->maximum_cookie_age = g_value_get_int (value);
- break;
- case PROP_FIRST_PARTY_COOKIES_ONLY:
- web_settings->first_party_cookies_only = g_value_get_boolean (value);
- break;
-
- case PROP_MAXIMUM_HISTORY_AGE:
- web_settings->maximum_history_age = g_value_get_int (value);
- break;
case PROP_PROXY_TYPE:
web_settings->proxy_type = g_value_get_enum (value);
break;
- case PROP_HTTP_PROXY:
- katze_assign (web_settings->http_proxy, g_value_dup_string (value));
- break;
- case PROP_HTTP_PROXY_PORT:
- web_settings->http_proxy_port = g_value_get_int (value);
- break;
- #if WEBKIT_CHECK_VERSION (1, 3, 11)
- case PROP_MAXIMUM_CACHE_SIZE:
- web_settings->maximum_cache_size = g_value_get_int (value);
- break;
- #endif
case PROP_IDENTIFY_AS:
web_settings->identify_as = g_value_get_enum (value);
if (web_settings->identify_as != MIDORI_IDENT_CUSTOM)
web_settings->enable_dns_prefetching = g_value_get_boolean (value);
break;
#endif
- case PROP_STRIP_REFERER:
- web_settings->strip_referer = g_value_get_boolean (value);
- break;
case PROP_ENFORCE_FONT_FAMILY:
if ((web_settings->enforce_font_family = g_value_get_boolean (value)))
{
else
midori_web_settings_remove_style (web_settings, "enforce-font-family");
break;
- case PROP_FLASH_WINDOW_ON_BG_TABS:
- web_settings->flash_window_on_bg_tabs = g_value_get_boolean (value);
- break;
- case PROP_ENABLE_WEBGL:
- g_object_set (web_settings, "WebKitWebSettings::enable-webgl",
- g_value_get_boolean (value), NULL);
- break;
case PROP_ENABLE_FULLSCREEN:
g_object_set (web_settings, "WebKitWebSettings::enable-fullscreen",
g_value_get_boolean (value), NULL);
switch (prop_id)
{
- case PROP_SHOW_MENUBAR:
- g_value_set_boolean (value, web_settings->show_menubar);
- break;
- case PROP_SHOW_NAVIGATIONBAR:
- g_value_set_boolean (value, web_settings->show_navigationbar);
- break;
- case PROP_SHOW_BOOKMARKBAR:
- g_value_set_boolean (value, web_settings->show_bookmarkbar);
- break;
- case PROP_SHOW_PANEL:
- g_value_set_boolean (value, web_settings->show_panel);
- break;
- case PROP_SHOW_STATUSBAR:
- g_value_set_boolean (value, web_settings->show_statusbar);
- break;
-
case PROP_TOOLBAR_STYLE:
g_value_set_enum (value, web_settings->toolbar_style);
break;
- case PROP_RIGHT_ALIGN_SIDEPANEL:
- g_value_set_boolean (value, web_settings->right_align_sidepanel);
- break;
case PROP_LOAD_ON_STARTUP:
g_value_set_enum (value, web_settings->load_on_startup);
break;
- case PROP_HOMEPAGE:
- g_value_set_string (value, web_settings->homepage);
- break;
- case PROP_SHOW_CRASH_DIALOG:
- g_value_set_boolean (value, web_settings->show_crash_dialog);
- break;
- case PROP_DOWNLOAD_FOLDER:
- g_value_set_string (value, web_settings->download_folder);
- break;
- case PROP_TEXT_EDITOR:
- g_value_set_string (value, web_settings->text_editor);
- break;
- case PROP_NEWS_AGGREGATOR:
- g_value_set_string (value, web_settings->news_aggregator);
- break;
case PROP_PREFERRED_ENCODING:
g_value_set_enum (value, web_settings->preferred_encoding);
break;
- case PROP_ALWAYS_SHOW_TABBAR:
- g_value_set_boolean (value, web_settings->always_show_tabbar);
- break;
- case PROP_CLOSE_BUTTONS_ON_TABS:
- g_value_set_boolean (value, web_settings->close_buttons_on_tabs);
- break;
case PROP_CLOSE_BUTTONS_LEFT:
#if HAVE_OSX
g_value_set_boolean (value, TRUE);
case PROP_OPEN_NEW_PAGES_IN:
g_value_set_enum (value, web_settings->open_new_pages_in);
break;
- case PROP_MIDDLE_CLICK_OPENS_SELECTION:
- g_value_set_boolean (value, web_settings->middle_click_opens_selection);
- break;
- case PROP_OPEN_TABS_IN_THE_BACKGROUND:
- g_value_set_boolean (value, web_settings->open_tabs_in_the_background);
- break;
- case PROP_OPEN_TABS_NEXT_TO_CURRENT:
- g_value_set_boolean (value, web_settings->open_tabs_next_to_current);
- break;
- case PROP_OPEN_POPUPS_IN_TABS:
- g_value_set_boolean (value, web_settings->open_popups_in_tabs);
- break;
- case PROP_AUTO_LOAD_IMAGES:
- g_value_set_boolean (value, katze_object_get_boolean (web_settings,
- "WebKitWebSettings::auto-load-images"));
- break;
- case PROP_ENABLE_SCRIPTS:
- g_value_set_boolean (value, katze_object_get_boolean (web_settings,
- "WebKitWebSettings::enable-scripts"));
- break;
case PROP_ENABLE_PLUGINS:
g_value_set_boolean (value, katze_object_get_boolean (web_settings,
"WebKitWebSettings::enable-plugins"));
break;
- case PROP_ENABLE_DEVELOPER_EXTRAS:
- g_value_set_boolean (value, katze_object_get_boolean (web_settings,
- "WebKitWebSettings::enable-developer-extras"));
- break;
- case PROP_ENABLE_SPELL_CHECKING:
- g_value_set_boolean (value, katze_object_get_boolean (web_settings,
- "WebKitWebSettings::enable-spell-checking"));
- break;
- case PROP_ENABLE_HTML5_DATABASE:
- g_value_set_boolean (value, katze_object_get_boolean (web_settings,
- "WebKitWebSettings::enable-html5-database"));
- break;
- case PROP_ENABLE_HTML5_LOCAL_STORAGE:
- g_value_set_boolean (value, katze_object_get_boolean (web_settings,
- "WebKitWebSettings::enable-html5-local-storage"));
- break;
- case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE:
- g_value_set_boolean (value, katze_object_get_boolean (web_settings,
- "WebKitWebSettings::enable-offline-web-application-cache"));
- break;
#if WEBKIT_CHECK_VERSION (1, 1, 18)
case PROP_ENABLE_PAGE_CACHE:
g_value_set_boolean (value, katze_object_get_boolean (web_settings,
"WebKitWebSettings::enable-page-cache"));
break;
#endif
- case PROP_ZOOM_TEXT_AND_IMAGES:
- g_value_set_boolean (value, web_settings->zoom_text_and_images);
- break;
- case PROP_KINETIC_SCROLLING:
- g_value_set_boolean (value, web_settings->kinetic_scrolling);
- break;
- case PROP_MAXIMUM_COOKIE_AGE:
- g_value_set_int (value, web_settings->maximum_cookie_age);
- break;
- case PROP_FIRST_PARTY_COOKIES_ONLY:
- g_value_set_boolean (value, web_settings->first_party_cookies_only);
- break;
-
- case PROP_MAXIMUM_HISTORY_AGE:
- g_value_set_int (value, web_settings->maximum_history_age);
- break;
case PROP_PROXY_TYPE:
g_value_set_enum (value, web_settings->proxy_type);
break;
- case PROP_HTTP_PROXY:
- g_value_set_string (value, web_settings->http_proxy);
- break;
- case PROP_HTTP_PROXY_PORT:
- g_value_set_int (value, web_settings->http_proxy_port);
- break;
- #if WEBKIT_CHECK_VERSION (1, 3, 11)
- case PROP_MAXIMUM_CACHE_SIZE:
- g_value_set_int (value, web_settings->maximum_cache_size);
- break;
- #endif
case PROP_IDENTIFY_AS:
g_value_set_enum (value, web_settings->identify_as);
break;
g_value_set_boolean (value, web_settings->enable_dns_prefetching);
break;
#endif
- case PROP_STRIP_REFERER:
- g_value_set_boolean (value, web_settings->strip_referer);
- break;
case PROP_ENFORCE_FONT_FAMILY:
g_value_set_boolean (value, web_settings->enforce_font_family);
break;
- case PROP_FLASH_WINDOW_ON_BG_TABS:
- g_value_set_boolean (value, web_settings->flash_window_on_bg_tabs);
- break;
- case PROP_ENABLE_WEBGL:
- g_value_set_boolean (value, katze_object_get_boolean (web_settings,
- "WebKitWebSettings::enable-webgl"));
- break;
case PROP_ENABLE_FULLSCREEN:
g_value_set_boolean (value, katze_object_get_boolean (web_settings,
"WebKitWebSettings::enable-fullscreen"));