aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorChristian Persch <chpe+gnomebugz@stud.uni-saarland.de>2003-05-06 19:59:09 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-06 19:59:09 +0800
commit6f4d431c2ea7384aec032c691cd0743755d364a7 (patch)
tree2272cf616ffd8777129bf8f0b6d573f609c87945 /src/ephy-shell.c
parent468c744c0c5efde0aa7bbc179bd0bba784c908a5 (diff)
downloadgsoc2013-epiphany-6f4d431c2ea7384aec032c691cd0743755d364a7.tar
gsoc2013-epiphany-6f4d431c2ea7384aec032c691cd0743755d364a7.tar.gz
gsoc2013-epiphany-6f4d431c2ea7384aec032c691cd0743755d364a7.tar.bz2
gsoc2013-epiphany-6f4d431c2ea7384aec032c691cd0743755d364a7.tar.lz
gsoc2013-epiphany-6f4d431c2ea7384aec032c691cd0743755d364a7.tar.xz
gsoc2013-epiphany-6f4d431c2ea7384aec032c691cd0743755d364a7.tar.zst
gsoc2013-epiphany-6f4d431c2ea7384aec032c691cd0743755d364a7.zip
Implement the EPHY_NEW_TAB_APPEND_AFTER flag.
2003-05-05 Christian Persch <chpe+gnomebugz@stud.uni-saarland.de> * src/ephy-shell.c: * src/ephy-shell.h: (ephy_shell_new_tab): Implement the EPHY_NEW_TAB_APPEND_AFTER flag. * src/ephy-window.c: * src/ephy-window.h: (ephy_window_add_tab): Changed parameter (gboolean) groupde to (gint) position, to support specifying the position in the notebook to insert the new tab into. * src/ephy-shell.c: (ephy_shell_new_window_cb): * src/ephy-tab.c: (ephy_tab_new_window_cb): Fix callers of ephy_window_add_tab for new parameter. * src/ephy-notebook.c: (notebook_drag_data_received_cb), (ephy_notebook_init), (ephy_notebook_insert_page): Implement drag-and-drop of links to tabs.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index c37aa8b31..56f31799e 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -238,7 +238,7 @@ ephy_shell_new_window_cb (EphyEmbedShell *shell,
}
new_tab = ephy_tab_new ();
- ephy_window_add_tab (window, new_tab, TRUE, FALSE);
+ ephy_window_add_tab (window, new_tab, EPHY_NOTEBOOK_INSERT_GROUPED, FALSE);
*new_embed = ephy_tab_get_embed (new_tab);
}
@@ -491,6 +491,8 @@ ephy_shell_new_tab (EphyShell *shell,
gboolean grouped = FALSE;
gboolean jump_to;
EphyEmbed *previous_embed = NULL;
+ GtkWidget *nb;
+ gint position;
in_new_window = !eel_gconf_get_boolean (CONF_TABS_TABBED);
@@ -525,11 +527,22 @@ ephy_shell_new_tab (EphyShell *shell,
if (flags & EPHY_NEW_TAB_APPEND_GROUPED) grouped = TRUE;
if (flags & EPHY_NEW_TAB_APPEND_LAST) grouped = FALSE;
+ if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_embed != NULL)
+ {
+ nb = ephy_window_get_notebook (window);
+ position = gtk_notebook_page_num (GTK_NOTEBOOK (nb),
+ GTK_WIDGET (previous_embed)) + 1;
+ }
+ else
+ {
+ position = grouped ? EPHY_NOTEBOOK_INSERT_GROUPED : EPHY_NOTEBOOK_INSERT_LAST;
+ }
+
tab = ephy_tab_new ();
embed = ephy_tab_get_embed (tab);
gtk_widget_show (GTK_WIDGET(embed));
ephy_window_add_tab (window, tab,
- grouped,
+ position,
jump_to);
if (flags & EPHY_NEW_TAB_RAISE_WINDOW)