diff options
author | Xan Lopez <xlopez@igalia.com> | 2011-06-28 03:48:44 +0800 |
---|---|---|
committer | Xan Lopez <xlopez@igalia.com> | 2011-06-28 03:48:44 +0800 |
commit | 7b740a66f80864abf24c2e8eddcfd624ef434ae7 (patch) | |
tree | 185635b7d28ad54191d3f4527f6cf30c58db4db8 /src/window-commands.c | |
parent | 972de8b227165ed15f65c6401698501bdcd34565 (diff) | |
download | gsoc2013-epiphany-7b740a66f80864abf24c2e8eddcfd624ef434ae7.tar gsoc2013-epiphany-7b740a66f80864abf24c2e8eddcfd624ef434ae7.tar.gz gsoc2013-epiphany-7b740a66f80864abf24c2e8eddcfd624ef434ae7.tar.bz2 gsoc2013-epiphany-7b740a66f80864abf24c2e8eddcfd624ef434ae7.tar.lz gsoc2013-epiphany-7b740a66f80864abf24c2e8eddcfd624ef434ae7.tar.xz gsoc2013-epiphany-7b740a66f80864abf24c2e8eddcfd624ef434ae7.tar.zst gsoc2013-epiphany-7b740a66f80864abf24c2e8eddcfd624ef434ae7.zip |
Respect gtk-keynav-wrap-around in the global change-page handler
We have a global-handler for Ctrl+Page{Up,Down} that is used in some
situations (basically, when the notebook is not focused). It does not
respect the wrap-around GtkSetting though, so the final experience can
be inconsistent.
Diffstat (limited to 'src/window-commands.c')
-rw-r--r-- | src/window-commands.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index 61d6080a9..a67ad6d39 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -1091,18 +1091,12 @@ window_cmd_tabs_next (GtkAction *action, EphyWindow *window) { GtkNotebook *nb; - gint page; + gboolean handled; nb = GTK_NOTEBOOK (ephy_window_get_notebook (window)); g_return_if_fail (nb != NULL); - page = gtk_notebook_get_current_page (nb); - g_return_if_fail (page != -1); - - if (page < gtk_notebook_get_n_pages (nb) - 1) - { - gtk_notebook_set_current_page (nb, page + 1); - } + g_signal_emit_by_name (nb, "change-current-page", 1, &handled); } void @@ -1110,18 +1104,12 @@ window_cmd_tabs_previous (GtkAction *action, EphyWindow *window) { GtkNotebook *nb; - gint page; + gboolean handled; nb = GTK_NOTEBOOK (ephy_window_get_notebook (window)); g_return_if_fail (nb != NULL); - page = gtk_notebook_get_current_page (nb); - g_return_if_fail (page != -1); - - if (page > 0) - { - gtk_notebook_set_current_page (nb, page - 1); - } + g_signal_emit_by_name (nb, "change-current-page", -1, &handled); } void |