KatzeItem* item,
MidoriBrowser* browser)
{
- gint n = midori_browser_add_item (browser, item);
- midori_browser_set_current_page (browser, n);
+ midori_browser_set_current_uri (browser, katze_item_get_uri (item));
katze_array_remove_item (browser->trash, item);
_midori_browser_update_actions (browser);
}
+static gboolean
+_action_trash_activate_item_alt (GtkAction* action,
+ KatzeItem* item,
+ guint button,
+ MidoriBrowser* 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);
+
+ katze_array_remove_item (browser->trash, item);
+ _midori_browser_update_actions (browser);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void
_action_history_populate_popup (GtkAction* action,
GtkMenu* menu,
}
static gboolean
-_action_bookmarks_activate_item_alt (GtkAction* action,
- KatzeItem* item,
- guint button,
- MidoriBrowser* browser)
+_action_menus_activate_item_alt (GtkAction* action,
+ KatzeItem* item,
+ guint button,
+ MidoriBrowser* browser)
{
if (button == 2)
{
_action_trash_populate_popup, browser,
"signal::activate-item",
_action_trash_activate_item, browser,
+ "signal::activate-item-alt",
+ _action_trash_activate_item_alt, browser,
NULL);
gtk_action_group_add_action_with_accel (browser->action_group, action, "");
g_object_unref (action);
_action_history_populate_popup, browser,
"signal::activate-item",
_action_history_activate_item, browser,
+ "signal::activate-item-alt",
+ _action_menus_activate_item_alt, browser,
NULL);
gtk_action_group_add_action_with_accel (browser->action_group, action, "");
g_object_unref (action);
"signal::activate-item",
_action_bookmarks_activate_item, browser,
"signal::activate-item-alt",
- _action_bookmarks_activate_item_alt, browser,
+ _action_menus_activate_item_alt, browser,
NULL);
gtk_action_group_add_action_with_accel (browser->action_group, action, "");
g_object_unref (action);