gboolean show_statusbar;
guint maximum_history_age;
gchar* location_entry_search;
+ guint last_web_search;
gchar* news_aggregator;
};
gboolean new_tab,
MidoriBrowser* browser)
{
- guint last_web_search;
KatzeItem* item;
const gchar* url;
gchar* search;
- g_object_get (browser->settings, "last-web-search", &last_web_search, NULL);
- item = katze_array_get_nth_item (browser->search_engines, last_web_search);
+ item = katze_array_get_nth_item (browser->search_engines, browser->last_web_search);
if (item)
url = katze_item_get_uri (item);
else /* The location entry search is our fallback */
idx = 0;
g_object_set (browser->settings, "last-web-search", idx, NULL);
+ browser->last_web_search = idx;
}
static void
gboolean show_panel;
MidoriToolbarStyle toolbar_style;
gchar* toolbar_items;
- gint last_web_search;
gboolean close_buttons_on_tabs;
KatzeItem* item;
"show-statusbar", &browser->show_statusbar,
"toolbar-style", &toolbar_style,
"toolbar-items", &toolbar_items,
- "last-web-search", &last_web_search,
"location-entry-search", &browser->location_entry_search,
"close-buttons-on-tabs", &close_buttons_on_tabs,
"maximum-history-age", &browser->maximum_history_age,
if (browser->search_engines)
{
item = katze_array_get_nth_item (browser->search_engines,
- last_web_search);
+ browser->last_web_search);
if (item)
midori_search_action_set_current_item (MIDORI_SEARCH_ACTION (
_action_by_name (browser, "Search")), item);
GParamSpec* pspec)
{
MidoriBrowser* browser = MIDORI_BROWSER (object);
- guint last_web_search;
KatzeItem* item;
switch (prop_id)
if (browser->search_engines)
{
- g_object_get (browser->settings, "last-web-search", &last_web_search, NULL);
- item = katze_array_get_nth_item (browser->search_engines, last_web_search);
+ g_object_get (browser->settings, "last-web-search", &browser->last_web_search, NULL);
+ item = katze_array_get_nth_item (browser->search_engines, browser->last_web_search);
midori_search_action_set_current_item (MIDORI_SEARCH_ACTION (
_action_by_name (browser, "Search")), item);