aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-03-29 22:58:11 +0800
committerChristian Persch <chpe@src.gnome.org>2004-03-29 22:58:11 +0800
commitce36f153ce6796e5ebd815bc6bd041cb99c4f580 (patch)
treecf50f38625ada047f27f4aeab6f471e0c1c7d0fb
parente54121840953aa05639d361bad6a9da187cdcc1c (diff)
downloadgsoc2013-epiphany-ce36f153ce6796e5ebd815bc6bd041cb99c4f580.tar
gsoc2013-epiphany-ce36f153ce6796e5ebd815bc6bd041cb99c4f580.tar.gz
gsoc2013-epiphany-ce36f153ce6796e5ebd815bc6bd041cb99c4f580.tar.bz2
gsoc2013-epiphany-ce36f153ce6796e5ebd815bc6bd041cb99c4f580.tar.lz
gsoc2013-epiphany-ce36f153ce6796e5ebd815bc6bd041cb99c4f580.tar.xz
gsoc2013-epiphany-ce36f153ce6796e5ebd815bc6bd041cb99c4f580.tar.zst
gsoc2013-epiphany-ce36f153ce6796e5ebd815bc6bd041cb99c4f580.zip
Fix opening in new tabs when there is no existing window. Fixes bug
2004-03-29 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmarks-editor.c: (cmd_open_bookmarks_in_tabs): Fix opening in new tabs when there is no existing window. Fixes bug #138343.
-rw-r--r--ChangeLog8
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c15
2 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 40d83f044..0ae96ac2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-03-29 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/bookmarks/ephy-bookmarks-editor.c:
+ (cmd_open_bookmarks_in_tabs):
+
+ Fix opening in new tabs when there is no existing window.
+ Fixes bug #138343.
+
2004-03-23 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-go-action.c: (connect_proxy), (disconnect_proxy),
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 732467a0a..b96432ad8 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -379,13 +379,24 @@ cmd_open_bookmarks_in_tabs (GtkAction *action,
for (l = selection; l; l = l->next)
{
EphyNode *node = l->data;
+ EphyTab *new_tab;
const char *location;
location = ephy_node_get_property_string (node,
EPHY_NODE_BMK_PROP_LOCATION);
- ephy_shell_new_tab (ephy_shell, window, NULL, location,
- EPHY_NEW_TAB_OPEN_PAGE | EPHY_NEW_TAB_IN_EXISTING_WINDOW);
+ new_tab = ephy_shell_new_tab (ephy_shell, window, NULL, location,
+ EPHY_NEW_TAB_OPEN_PAGE |
+ EPHY_NEW_TAB_IN_EXISTING_WINDOW);
+ /* if there was no target window, a new one was opened. Get it
+ * from the new tab so we open the remaining links in the
+ * same window. See bug 138343.
+ */
+ if (window == NULL)
+ {
+ window = EPHY_WINDOW
+ (gtk_widget_get_toplevel (GTK_WIDGET (new_tab)));
+ }
}
g_list_free (selection);