diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-03-29 14:50:17 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-03-29 14:50:17 +0000 |
commit | 243568a52f7147ee36570aa32a292200ad51fc0a (patch) | |
tree | 6a65ec2df2af371bde813ba67f57080a23669eed /src | |
parent | d6b3f1c57606aace080b9c30202905d56d05af94 (diff) | |
download | epiphany-243568a52f7147ee36570aa32a292200ad51fc0a.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-editor.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index 46c83ddae..fab8237a6 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); |