}
}
-static void
-_midori_browser_set_current_page_smartly (MidoriBrowser* browser,
- gint n)
+void
+midori_browser_set_current_page_smartly (MidoriBrowser* browser,
+ gint n)
{
if (!katze_object_get_boolean (browser->settings,
"open-tabs-in-the-background"))
n = midori_browser_add_uri (browser, katze_item_get_uri (item));
- _midori_browser_set_current_page_smartly (browser, n);
+ midori_browser_set_current_page_smartly (browser, n);
katze_array_remove_item (browser->trash, item);
_midori_browser_update_actions (browser);
g_object_get (browser->settings, "homepage", &homepage, NULL);
n = midori_browser_add_uri (browser, homepage);
g_free (homepage);
- _midori_browser_set_current_page_smartly (browser, n);
+ midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}
if ((uri = katze_item_get_uri (child)) && *uri)
{
n = midori_browser_add_item (browser, child);
- _midori_browser_set_current_page_smartly (browser, n);
+ midori_browser_set_current_page_smartly (browser, n);
}
i++;
}
if ((uri = katze_item_get_uri (item)) && *uri)
{
n = midori_browser_add_item (browser, item);
- _midori_browser_set_current_page_smartly (browser, n);
+ midori_browser_set_current_page_smartly (browser, n);
}
}
}
if (katze_item_get_uri (item))
{
n = midori_browser_add_uri (browser, katze_item_get_uri (item));
- _midori_browser_set_current_page_smartly (browser, n);
+ midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}
const gchar*
midori_browser_get_current_uri (MidoriBrowser* browser);
+void
+midori_browser_set_current_page_smartly (MidoriBrowser* browser,
+ gint n);
void
midori_browser_set_current_page (MidoriBrowser* browser,
gint n);
if ((uri = katze_item_get_uri (child)) && *uri)
{
MidoriBrowser* browser;
- MidoriWebSettings* settings;
browser = midori_browser_get_for_widget (GTK_WIDGET (bookmarks));
n = midori_browser_add_item (browser, child);
- settings = katze_object_get_object (browser, "settings");
- if (!katze_object_get_boolean (settings, "open-tabs-in-the-background"))
- midori_browser_set_current_page (browser, n);
- g_object_unref (settings);
+ midori_browser_set_current_page_smartly (browser, n);
}
i++;
}
else if ((uri = katze_item_get_uri (item)) && *uri)
{
MidoriBrowser* browser;
- MidoriWebSettings* settings;
browser = midori_browser_get_for_widget (GTK_WIDGET (bookmarks));
n = midori_browser_add_item (browser, item);
- settings = katze_object_get_object (browser, "settings");
- if (!katze_object_get_boolean (settings, "open-tabs-in-the-background"))
- midori_browser_set_current_page (browser, n);
- g_object_unref (settings);
+ midori_browser_set_current_page_smartly (browser, n);
}
}
if ((uri = katze_item_get_uri (child)) && *uri)
{
MidoriBrowser* browser;
- MidoriWebSettings* settings;
browser = midori_browser_get_for_widget (GTK_WIDGET (history));
n = midori_browser_add_item (browser, child);
- settings = katze_object_get_object (browser, "settings");
- if (!katze_object_get_boolean (settings, "open-tabs-in-the-background"))
- midori_browser_set_current_page (browser, n);
- g_object_unref (settings);
+ midori_browser_set_current_page_smartly (browser, n);
}
}
}
if ((uri = katze_item_get_uri (item)) && *uri)
{
MidoriBrowser* browser;
- MidoriWebSettings* settings;
browser = midori_browser_get_for_widget (GTK_WIDGET (history));
n = midori_browser_add_item (browser, item);
- settings = katze_object_get_object (browser, "settings");
- if (!katze_object_get_boolean (settings, "open-tabs-in-the-background"))
- midori_browser_set_current_page (browser, n);
- g_object_unref (settings);
+ midori_browser_set_current_page_smartly (browser, n);
}
}
}