midori_browser_settings_notify, browser);
}
-static void
-midori_panel_notify_show_controls_cb (MidoriPanel* panel,
- GParamSpec* pspec,
- MidoriBrowser* browser)
-{
- gboolean show_controls = katze_object_get_boolean (panel, "show-controls");
- g_signal_handlers_block_by_func (browser->settings,
- midori_browser_settings_notify, browser);
- g_object_set (browser->settings, "show-panel-controls", show_controls, NULL);
- g_signal_handlers_unblock_by_func (browser->settings,
- midori_browser_settings_notify, browser);
-}
-
static void
midori_panel_notify_right_aligned_cb (MidoriPanel* panel,
GParamSpec* pspec,
midori_panel_notify_page_cb, browser,
"signal::notify::show-titles",
midori_panel_notify_show_titles_cb, browser,
- "signal::notify::show-controls",
- midori_panel_notify_show_controls_cb, browser,
"signal::notify::right-aligned",
midori_panel_notify_right_aligned_cb, browser,
"signal::close",
{
gboolean remember_last_window_size;
MidoriWindowState last_window_state;
- gboolean compact_sidepanel, show_panel_controls;
+ gboolean compact_sidepanel;
gboolean right_align_sidepanel, open_panels_in_windows;
gint last_panel_position, last_panel_page;
gboolean show_menubar, show_bookmarkbar;
"last-window-height", &browser->last_window_height,
"last-window-state", &last_window_state,
"compact-sidepanel", &compact_sidepanel,
- "show-panel-controls", &show_panel_controls,
"right-align-sidepanel", &right_align_sidepanel,
"open-panels-in-windows", &open_panels_in_windows,
"last-panel-position", &last_panel_position,
}
g_object_set (browser->panel, "show-titles", !compact_sidepanel,
- "show-controls", show_panel_controls,
"right-aligned", right_align_sidepanel,
"open-panels-in-windows", open_panels_in_windows, NULL);
gtk_paned_set_position (GTK_PANED (gtk_widget_get_parent (browser->panel)),
g_signal_handlers_unblock_by_func (browser->panel,
midori_panel_notify_show_titles_cb, browser);
}
- else if (name == g_intern_string ("show-panel-controls"))
- {
- g_signal_handlers_block_by_func (browser->panel,
- midori_panel_notify_show_controls_cb, browser);
- g_object_set (browser->panel, "show-controls",
- g_value_get_boolean (&value), NULL);
- g_signal_handlers_unblock_by_func (browser->panel,
- midori_panel_notify_show_controls_cb, browser);
- }
else if (name == g_intern_string ("open-panels-in-windows"))
g_object_set (browser->panel, "open-panels-in-windows",
g_value_get_boolean (&value), NULL);
browser->show_navigationbar = g_value_get_boolean (&value);
else if (name == g_intern_string ("show-statusbar"))
browser->show_statusbar = g_value_get_boolean (&value);
- else if (name == g_intern_string ("search-engines-in-completion"))
- {
- if (g_value_get_boolean (&value))
- midori_location_action_set_search_engines (MIDORI_LOCATION_ACTION (
- _action_by_name (browser, "Location")), browser->search_engines);
- else
- midori_location_action_set_search_engines (MIDORI_LOCATION_ACTION (
- _action_by_name (browser, "Location")), NULL);
- }
else if (name == g_intern_string ("location-entry-search"))
{
katze_assign (browser->location_entry_search, g_value_dup_string (&value));
{
/* FIXME: Disconnect handlers */
katze_object_assign (browser->search_engines, g_value_dup_object (value));
- if (katze_object_get_boolean (browser->settings,
- "search-engines-in-completion"))
- midori_location_action_set_search_engines (MIDORI_LOCATION_ACTION (
- _action_by_name (browser, "Location")), browser->search_engines);
- else
- midori_location_action_set_search_engines (MIDORI_LOCATION_ACTION (
- _action_by_name (browser, "Location")), NULL);
+ midori_location_action_set_search_engines (MIDORI_LOCATION_ACTION (
+ _action_by_name (browser, "Location")), browser->search_engines);
midori_search_action_set_search_engines (MIDORI_SEARCH_ACTION (
_action_by_name (browser, "Search")), browser->search_engines);
/* FIXME: Connect to updates */
gboolean show_navigationbar : 1;
gboolean show_bookmarkbar : 1;
gboolean show_panel : 1;
- gboolean show_transferbar : 1;
gboolean show_statusbar : 1;
MidoriToolbarStyle toolbar_style : 3;
- gboolean search_engines_in_completion : 1;
gboolean compact_sidepanel : 1;
- gboolean show_panel_controls : 1;
gboolean right_align_sidepanel : 1;
gboolean open_panels_in_windows : 1;
MidoriStartup load_on_startup : 2;
gboolean show_crash_dialog : 1;
- gboolean speed_dial_in_new_tabs : 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;
- MidoriNewPage open_external_pages_in : 2;
gboolean middle_click_opens_selection : 1;
gboolean open_tabs_in_the_background : 1;
gboolean open_tabs_next_to_current : 1;
gboolean zoom_text_and_images : 1;
gboolean find_while_typing : 1;
gboolean kinetic_scrolling : 1;
- MidoriAcceptCookies accept_cookies : 2;
gboolean original_cookies_only : 1;
gboolean remember_last_visited_pages : 1;
- gboolean remember_last_downloaded_files : 1;
MidoriProxy proxy_type : 2;
MidoriIdentity identify_as : 3;
gchar* toolbar_items;
gchar* homepage;
gchar* download_folder;
- gchar* download_manager;
gchar* text_editor;
gchar* news_aggregator;
gchar* location_entry_search;
PROP_SHOW_NAVIGATIONBAR,
PROP_SHOW_BOOKMARKBAR,
PROP_SHOW_PANEL,
- PROP_SHOW_TRANSFERBAR,
PROP_SHOW_STATUSBAR,
PROP_TOOLBAR_STYLE,
- PROP_SEARCH_ENGINES_IN_COMPLETION,
PROP_TOOLBAR_ITEMS,
PROP_COMPACT_SIDEPANEL,
- PROP_SHOW_PANEL_CONTROLS,
PROP_RIGHT_ALIGN_SIDEPANEL,
PROP_OPEN_PANELS_IN_WINDOWS,
PROP_LOAD_ON_STARTUP,
PROP_HOMEPAGE,
PROP_SHOW_CRASH_DIALOG,
- PROP_SPEED_DIAL_IN_NEW_TABS,
PROP_DOWNLOAD_FOLDER,
- PROP_DOWNLOAD_MANAGER,
PROP_TEXT_EDITOR,
PROP_NEWS_AGGREGATOR,
PROP_LOCATION_ENTRY_SEARCH,
PROP_CLOSE_BUTTONS_ON_TABS,
PROP_CLOSE_BUTTONS_LEFT,
PROP_OPEN_NEW_PAGES_IN,
- PROP_OPEN_EXTERNAL_PAGES_IN,
PROP_MIDDLE_CLICK_OPENS_SELECTION,
PROP_OPEN_TABS_IN_THE_BACKGROUND,
PROP_OPEN_TABS_NEXT_TO_CURRENT,
PROP_ZOOM_TEXT_AND_IMAGES,
PROP_FIND_WHILE_TYPING,
PROP_KINETIC_SCROLLING,
- PROP_ACCEPT_COOKIES,
PROP_MAXIMUM_COOKIE_AGE,
PROP_MAXIMUM_HISTORY_AGE,
- PROP_REMEMBER_LAST_DOWNLOADED_FILES,
PROP_PROXY_TYPE,
PROP_HTTP_PROXY,
return type;
}
-GType
-midori_accept_cookies_get_type (void)
-{
- static GType type = 0;
- if (!type)
- {
- static const GEnumValue values[] = {
- { MIDORI_ACCEPT_COOKIES_ALL, "MIDORI_ACCEPT_COOKIES_ALL", N_("All cookies") },
- { MIDORI_ACCEPT_COOKIES_SESSION, "MIDORI_ACCEPT_COOKIES_SESSION", N_("Session cookies") },
- { MIDORI_ACCEPT_COOKIES_NONE, "MIDORI_ACCEPT_COOKIES_NONE", N_("None") },
- { 0, NULL, NULL }
- };
- type = g_enum_register_static ("MidoriAcceptCookies", values);
- }
- return type;
-}
-
GType
midori_identity_get_type (void)
{
FALSE,
flags));
- /**
- * MidoriWebSettings:show-transferbar:
- *
- * Whether to show the transferbar.
- *
- * Since: 0.1.5
- *
- * Deprecated: 0.3.1
- */
- g_object_class_install_property (gobject_class,
- PROP_SHOW_TRANSFERBAR,
- g_param_spec_boolean (
- "show-transferbar",
- _("Show Transferbar"),
- _("Whether to show the transferbar"),
- TRUE,
- flags));
-
g_object_class_install_property (gobject_class,
PROP_SHOW_STATUSBAR,
g_param_spec_boolean (
MIDORI_TOOLBAR_DEFAULT,
flags));
- /**
- * MidoriWebSettings:search-engines-in-completion:
- *
- * Whether to show search engines in the location completion.
- *
- * Since: 0.1.6
- *
- * Deprecated: 0.3.1
- */
- g_object_class_install_property (gobject_class,
- PROP_SEARCH_ENGINES_IN_COMPLETION,
- g_param_spec_boolean (
- "search-engines-in-completion",
- _("Search engines in location completion"),
- _("Whether to show search engines in the location completion"),
- TRUE,
- flags));
-
g_object_class_install_property (gobject_class,
PROP_TOOLBAR_ITEMS,
g_param_spec_string (
FALSE,
flags));
- /**
- * MidoriWebSettings:show-panel-controls:
- *
- * Whether to show the operating controls of the panel.
- *
- * Since: 0.1.9
- *
- * Deprecated: 0.3.0
- */
- g_object_class_install_property (gobject_class,
- PROP_SHOW_PANEL_CONTROLS,
- g_param_spec_boolean (
- "show-panel-controls",
- _("Show operating controls of the panel"),
- _("Whether to show the operating controls of the panel"),
- TRUE,
- flags));
-
/**
* MidoriWebSettings:right-sidepanel:
*
TRUE,
flags));
- /**
- * MidoriWebSettings:speed-dial-in-new-tabs:
- *
- * Show spee dial in newly opened tabs.
- *
- * Since: 0.1.7
- *
- * Deprecated: 0.3.4
- */
- g_object_class_install_property (gobject_class,
- PROP_SPEED_DIAL_IN_NEW_TABS,
- g_param_spec_boolean (
- "speed-dial-in-new-tabs",
- /* i18n: Speed dial, webpage shortcuts, named for the phone function */
- _("Show speed dial in new tabs"),
- _("Show speed dial in newly opened tabs"),
- TRUE,
- flags));
-
g_object_class_install_property (gobject_class,
PROP_DOWNLOAD_FOLDER,
g_param_spec_string (
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
#endif
- /**
- * MidoriWebSettings:download-manager:
- *
- * An external download manager that shows up in context menus.
- *
- * Deprecated: 0.3.4
- */
- g_object_class_install_property (gobject_class,
- PROP_DOWNLOAD_MANAGER,
- g_param_spec_string (
- "download-manager",
- _("Download Manager"),
- _("An external download manager"),
- NULL,
- flags));
-
g_object_class_install_property (gobject_class,
PROP_TEXT_EDITOR,
g_param_spec_string (
MIDORI_NEW_PAGE_TAB,
flags));
- /**
- * MidoriWebSettings:open-external-pages-in:
- *
- * Where to open externally opened pages.
- *
- * Deprecated: 0.3.4
- */
- g_object_class_install_property (gobject_class,
- PROP_OPEN_EXTERNAL_PAGES_IN,
- g_param_spec_enum (
- "open-external-pages-in",
- _("Open external pages in:"),
- _("Where to open externally opened 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 (
TRUE,
flags));
- /**
- * MidoriWebSettings:accept-cookies:
- *
- * What type of cookies to accept.
- *
- * Deprecated: 0.3.4
- **/
- g_object_class_install_property (gobject_class,
- PROP_ACCEPT_COOKIES,
- g_param_spec_enum (
- "accept-cookies",
- _("Accept cookies"),
- _("What type of cookies to accept"),
- MIDORI_TYPE_ACCEPT_COOKIES,
- MIDORI_ACCEPT_COOKIES_ALL,
- flags));
-
g_object_class_install_property (gobject_class,
PROP_MAXIMUM_COOKIE_AGE,
g_param_spec_int (
0, G_MAXINT, 30,
flags));
- /**
- * MidoriWebSettings:remember-last-downloaded-files:
- *
- * Whether the last downloaded files are saved.
- *
- * Deprecated: 0.2.9
- **/
- g_object_class_install_property (gobject_class,
- PROP_REMEMBER_LAST_DOWNLOADED_FILES,
- g_param_spec_boolean (
- "remember-last-downloaded-files",
- _("Remember last downloaded files"),
- _("Whether the last downloaded files are saved"),
- TRUE,
- flags));
-
-
-
/**
* MidoriWebSettings:proxy-type:
*
{
web_settings->download_folder = g_strdup (midori_get_download_dir ());
web_settings->http_proxy = NULL;
- web_settings->show_panel_controls = TRUE;
web_settings->open_popups_in_tabs = TRUE;
- web_settings->remember_last_downloaded_files = TRUE;
web_settings->kinetic_scrolling = TRUE;
g_signal_connect (web_settings, "notify::default-encoding",
katze_assign (web_settings->toolbar_items, NULL);
katze_assign (web_settings->homepage, NULL);
katze_assign (web_settings->download_folder, NULL);
- katze_assign (web_settings->download_manager, NULL);
katze_assign (web_settings->text_editor, NULL);
katze_assign (web_settings->news_aggregator, NULL);
katze_assign (web_settings->location_entry_search, NULL);
case PROP_SHOW_PANEL:
web_settings->show_panel = g_value_get_boolean (value);
break;
- case PROP_SHOW_TRANSFERBAR:
- web_settings->show_transferbar = 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_SEARCH_ENGINES_IN_COMPLETION:
- web_settings->search_engines_in_completion = g_value_get_boolean (value);
- break;
case PROP_TOOLBAR_ITEMS:
katze_assign (web_settings->toolbar_items, g_value_dup_string (value));
break;
case PROP_COMPACT_SIDEPANEL:
web_settings->compact_sidepanel = g_value_get_boolean (value);
break;
- case PROP_SHOW_PANEL_CONTROLS:
- web_settings->show_panel_controls = g_value_get_boolean (value);
- break;
case PROP_RIGHT_ALIGN_SIDEPANEL:
web_settings->right_align_sidepanel = g_value_get_boolean (value);
break;
case PROP_SHOW_CRASH_DIALOG:
web_settings->show_crash_dialog = g_value_get_boolean (value);
break;
- case PROP_SPEED_DIAL_IN_NEW_TABS:
- web_settings->speed_dial_in_new_tabs = g_value_get_boolean (value);
- break;
case PROP_DOWNLOAD_FOLDER:
katze_assign (web_settings->download_folder, g_value_dup_string (value));
break;
- case PROP_DOWNLOAD_MANAGER:
- katze_assign (web_settings->download_manager, g_value_dup_string (value));
- break;
case PROP_TEXT_EDITOR:
katze_assign (web_settings->text_editor, g_value_dup_string (value));
break;
case PROP_OPEN_NEW_PAGES_IN:
web_settings->open_new_pages_in = g_value_get_enum (value);
break;
- case PROP_OPEN_EXTERNAL_PAGES_IN:
- web_settings->open_external_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_KINETIC_SCROLLING:
web_settings->kinetic_scrolling = g_value_get_boolean (value);
break;
- case PROP_ACCEPT_COOKIES:
- web_settings->accept_cookies = g_value_get_enum (value);
- break;
case PROP_MAXIMUM_COOKIE_AGE:
web_settings->maximum_cookie_age = g_value_get_int (value);
break;
case PROP_MAXIMUM_HISTORY_AGE:
web_settings->maximum_history_age = g_value_get_int (value);
break;
- case PROP_REMEMBER_LAST_DOWNLOADED_FILES:
- web_settings->remember_last_downloaded_files = g_value_get_boolean (value);
- break;
case PROP_PROXY_TYPE:
web_settings->proxy_type = g_value_get_enum (value);
case PROP_SHOW_PANEL:
g_value_set_boolean (value, web_settings->show_panel);
break;
- case PROP_SHOW_TRANSFERBAR:
- g_value_set_boolean (value, web_settings->show_transferbar);
- 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_SEARCH_ENGINES_IN_COMPLETION:
- g_value_set_boolean (value, web_settings->search_engines_in_completion);
- break;
case PROP_TOOLBAR_ITEMS:
g_value_set_string (value, web_settings->toolbar_items);
break;
case PROP_COMPACT_SIDEPANEL:
g_value_set_boolean (value, web_settings->compact_sidepanel);
break;
- case PROP_SHOW_PANEL_CONTROLS:
- g_value_set_boolean (value, web_settings->show_panel_controls);
- break;
case PROP_RIGHT_ALIGN_SIDEPANEL:
g_value_set_boolean (value, web_settings->right_align_sidepanel);
break;
case PROP_SHOW_CRASH_DIALOG:
g_value_set_boolean (value, web_settings->show_crash_dialog);
break;
- case PROP_SPEED_DIAL_IN_NEW_TABS:
- g_value_set_boolean (value, web_settings->speed_dial_in_new_tabs);
- break;
case PROP_DOWNLOAD_FOLDER:
g_value_set_string (value, web_settings->download_folder);
break;
- case PROP_DOWNLOAD_MANAGER:
- g_value_set_string (value, web_settings->download_manager);
- break;
case PROP_TEXT_EDITOR:
g_value_set_string (value, web_settings->text_editor);
break;
case PROP_OPEN_NEW_PAGES_IN:
g_value_set_enum (value, web_settings->open_new_pages_in);
break;
- case PROP_OPEN_EXTERNAL_PAGES_IN:
- g_value_set_enum (value, web_settings->open_external_pages_in);
- break;
case PROP_MIDDLE_CLICK_OPENS_SELECTION:
g_value_set_boolean (value, web_settings->middle_click_opens_selection);
break;
case PROP_KINETIC_SCROLLING:
g_value_set_boolean (value, web_settings->kinetic_scrolling);
break;
- case PROP_ACCEPT_COOKIES:
- g_value_set_enum (value, web_settings->accept_cookies);
- break;
case PROP_MAXIMUM_COOKIE_AGE:
g_value_set_int (value, web_settings->maximum_cookie_age);
break;
case PROP_MAXIMUM_HISTORY_AGE:
g_value_set_int (value, web_settings->maximum_history_age);
break;
- case PROP_REMEMBER_LAST_DOWNLOADED_FILES:
- g_value_set_boolean (value, web_settings->remember_last_downloaded_files);
- break;
case PROP_PROXY_TYPE:
g_value_set_enum (value, web_settings->proxy_type);