MidoriBrowser* browser)
{
gint n = midori_browser_add_uri (browser, uri);
- if (!background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
}
static void
if (button == 2)
{
gint n;
- gboolean open_in_background;
-
- g_object_get (browser->settings, "open-tabs-in-the-background",
- &open_in_background, NULL);
n = midori_browser_add_uri (browser, katze_item_get_uri (item));
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
katze_array_remove_item (browser->trash, item);
_midori_browser_update_actions (browser);
{
if (button == 2)
{
- gint n;
- gboolean open_in_background;
-
- g_object_get (browser->settings, "open-tabs-in-the-background",
- &open_in_background, NULL);
-
- n = midori_browser_add_uri (browser, katze_item_get_uri (item));
-
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ gint n = midori_browser_add_uri (browser, katze_item_get_uri (item));
+ _midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}
{
GtkAction* action = gtk_widget_get_action (toolitem);
const gchar* name;
- gboolean open_in_background = FALSE;
gchar* homepage;
g_return_val_if_fail (action != NULL, FALSE);
if (!browser->settings)
return FALSE;
- g_object_get (browser->settings, "open-tabs-in-the-background",
- &open_in_background, NULL);
-
g_object_get (browser->settings, "homepage", &homepage, NULL);
name = gtk_action_get_name (action);
n = midori_browser_add_uri (browser, homepage);
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}
n = midori_browser_add_uri (browser, back_uri);
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}
forward_uri = webkit_web_history_item_get_uri (forward_item);
n = midori_browser_add_uri (browser, forward_uri);
-
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}
{
KatzeItem* item;
gint n;
- gboolean open_in_background;
if (event->button == 2)
{
item = (KatzeItem*)g_object_get_data (G_OBJECT (toolitem), "KatzeItem");
if (katze_item_get_uri (item))
{
- g_object_get (browser->settings, "open-tabs-in-the-background",
- &open_in_background, NULL);
n = midori_browser_add_uri (browser, katze_item_get_uri (item));
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
+
return TRUE;
}
}
GtkWidget* parent = gtk_widget_get_parent (toolitem);
GtkAction* action = gtk_widget_get_action (parent);
const gchar* name;
- gboolean open_in_background = FALSE;
gchar* homepage;
g_return_val_if_fail (action != NULL, FALSE);
if (!browser->settings)
return FALSE;
- g_object_get (browser->settings, "open-tabs-in-the-background",
- &open_in_background, NULL);
-
g_object_get (browser->settings, "homepage", &homepage, NULL);
name = gtk_action_get_name (action);
gint n;
n = midori_browser_add_uri (browser, homepage);
-
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}
back_uri = webkit_web_history_item_get_uri (back_item);
n = midori_browser_add_uri (browser, back_uri);
-
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}
forward_uri = webkit_web_history_item_get_uri (forward_item);
n = midori_browser_add_uri (browser, forward_uri);
-
- if (!open_in_background)
- midori_browser_set_current_page (browser, n);
+ _midori_browser_set_current_page_smartly (browser, n);
return TRUE;
}