From 6e2dd16aab99579360000ff1d2c66ece64dc3af3 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 26 Aug 2004 18:50:46 +0000 Subject: Get the position of the new tab after the tab_added signal was emitted, to 2004-08-26 Christian Persch * src/ephy-notebook.c: (ephy_notebook_add_tab): Get the position of the new tab after the tab_added signal was emitted, to get it right in the case the signal handler reorders the tabs. Patch by Justin Wake. --- src/ephy-notebook.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ephy-notebook.c') diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 475c2f9ae..5651b2e98 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -959,6 +959,9 @@ ephy_notebook_add_tab (EphyNotebook *nb, if (jump_to) { + /* The signal handler may have reordered the tabs */ + position = gtk_notebook_page_num (GTK_NOTEBOOK (nb), GTK_WIDGET(tab)); + gtk_notebook_set_current_page (GTK_NOTEBOOK (nb), position); g_object_set_data (G_OBJECT (tab), "jump_to", -- cgit v1.2.3