browser->show_statusbar = g_value_get_boolean (&value);
else if (name == g_intern_string ("progress-in-location"))
browser->progress_in_location = 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));
case PROP_SEARCH_ENGINES:
/* FIXME: Disconnect handlers */
katze_object_assign (browser->search_engines, g_value_dup_object (value));
- midori_location_action_set_search_engines (MIDORI_LOCATION_ACTION (
- _action_by_name (browser, "Location")), browser->search_engines);
+ if (browser->settings)
+ {
+ 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_search_action_set_search_engines (MIDORI_SEARCH_ACTION (
_action_by_name (browser, "Search")), browser->search_engines);
/* FIXME: Connect to updates */
completion = gtk_entry_get_completion (GTK_ENTRY (child));
i = 0;
+ /* FIXME: Apparently deleting doesn't always work, but why? */
if (location_action->search_engines)
- while ((item = katze_array_get_nth_item (location_action->search_engines, i)))
- gtk_entry_completion_delete_action (completion, i++);
+ while ((item = katze_array_get_nth_item (location_action->search_engines, i++)))
+ gtk_entry_completion_delete_action (completion, i);
midori_location_action_add_actions (completion, search_engines);
}
FILLED_ADD (button, 1, 2, 0, 1);
#endif
button = katze_property_proxy (settings, "progress-in-location", NULL);
+ FILLED_ADD (button, 0, 1, 1, 2);
+ button = katze_property_proxy (settings, "search-engines-in-completion", NULL);
FILLED_ADD (button, 1, 2, 1, 2);
FRAME_NEW (_("Browsing"));
TABLE_NEW (5, 2);
MidoriToolbarStyle toolbar_style;
gboolean progress_in_location;
+ gboolean search_engines_in_completion;
gchar* toolbar_items;
gboolean compact_sidepanel;
gboolean right_align_sidepanel;
PROP_TOOLBAR_STYLE,
PROP_PROGRESS_IN_LOCATION,
+ PROP_SEARCH_ENGINES_IN_COMPLETION,
PROP_TOOLBAR_ITEMS,
PROP_COMPACT_SIDEPANEL,
PROP_RIGHT_ALIGN_SIDEPANEL,
TRUE,
flags));
+ /**
+ * MidoriWebSettings:search-engines-in-completion:
+ *
+ * Whether to show search engines in the location completion.
+ *
+ * Since: 0.1.3
+ */
+ 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 (
case PROP_PROGRESS_IN_LOCATION:
web_settings->progress_in_location = g_value_get_boolean (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_PROGRESS_IN_LOCATION:
g_value_set_boolean (value, web_settings->progress_in_location);
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;