aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-09-20 22:55:16 +0800
committerXan Lopez <xan@gnome.org>2009-09-20 22:55:16 +0800
commit5c594b0747b1f274b64ecc0fbb866793f6e5ff4a (patch)
treeef40da94e893040ec0319b2a2271d0d597d8a37c /src
parent1fb6a0f831c979a0a76107fc6f0930e0c071ea24 (diff)
downloadgsoc2013-epiphany-5c594b0747b1f274b64ecc0fbb866793f6e5ff4a.tar
gsoc2013-epiphany-5c594b0747b1f274b64ecc0fbb866793f6e5ff4a.tar.gz
gsoc2013-epiphany-5c594b0747b1f274b64ecc0fbb866793f6e5ff4a.tar.bz2
gsoc2013-epiphany-5c594b0747b1f274b64ecc0fbb866793f6e5ff4a.tar.lz
gsoc2013-epiphany-5c594b0747b1f274b64ecc0fbb866793f6e5ff4a.tar.xz
gsoc2013-epiphany-5c594b0747b1f274b64ecc0fbb866793f6e5ff4a.tar.zst
gsoc2013-epiphany-5c594b0747b1f274b64ecc0fbb866793f6e5ff4a.zip
ephy-notebook.c: better yet, get rid of the test completely
Since gtk_notebook_get_nth_page, used just after that, returns NULL for out-of-bounds pages.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-notebook.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index a7a6fa110..9121452b9 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -248,13 +248,6 @@ find_tab_num_at_pos (EphyNotebook *notebook, gint abs_x, gint abs_y)
GtkNotebook *nb = GTK_NOTEBOOK (notebook);
GtkWidget *page;
- tab_pos = gtk_notebook_get_tab_pos (nb);
-
- if (gtk_notebook_get_n_pages (nb) == 0)
- {
- return AFTER_ALL_TABS;
- }
-
/* For some reason unfullscreen + quick click can
cause a wrong click event to be reported to the tab */
if (!is_in_notebook_window (notebook, abs_x, abs_y))
@@ -262,6 +255,8 @@ find_tab_num_at_pos (EphyNotebook *notebook, gint abs_x, gint abs_y)
return NOT_IN_APP_WINDOWS;
}
+ tab_pos = gtk_notebook_get_tab_pos (nb);
+
while ((page = gtk_notebook_get_nth_page (nb, page_num)))
{
GtkWidget *tab;