diff options
author | mrhappypants <aaron.j.brown@hotmail.com> | 2010-03-17 06:30:16 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-17 17:19:03 +0800 |
commit | 7cd5db58862b57db5a1a67b6e2f5e61746e9fb07 (patch) | |
tree | 82a2a8b29aec2b4ea1594764a418eb4258b582e5 | |
parent | 1d082229cc10c2fcf53f304b38780b125fd98c79 (diff) | |
download | gsoc2013-empathy-7cd5db58862b57db5a1a67b6e2f5e61746e9fb07.tar gsoc2013-empathy-7cd5db58862b57db5a1a67b6e2f5e61746e9fb07.tar.gz gsoc2013-empathy-7cd5db58862b57db5a1a67b6e2f5e61746e9fb07.tar.bz2 gsoc2013-empathy-7cd5db58862b57db5a1a67b6e2f5e61746e9fb07.tar.lz gsoc2013-empathy-7cd5db58862b57db5a1a67b6e2f5e61746e9fb07.tar.xz gsoc2013-empathy-7cd5db58862b57db5a1a67b6e2f5e61746e9fb07.tar.zst gsoc2013-empathy-7cd5db58862b57db5a1a67b6e2f5e61746e9fb07.zip |
Added gtk-keynav-wrap-around check before cycling tabs
-rw-r--r-- | src/empathy-chat-window.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 29d574a3e..282c40e24 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -1027,14 +1027,18 @@ chat_window_tabs_next_activate_cb (GtkAction *action, EmpathyChatWindowPriv *priv; EmpathyChat *chat; gint index_, numPages; + gboolean wrap_around; priv = GET_PRIV (window); + g_object_get (gtk_settings_get_default (), "gtk-keynav-wrap-around", + &wrap_around, NULL); + chat = priv->current_chat; index_ = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook)); numPages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (priv->notebook)); - if (index_ == (numPages - 1)) { + if (index_ == (numPages - 1) && wrap_around) { gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), 0); return; } @@ -1049,14 +1053,18 @@ chat_window_tabs_previous_activate_cb (GtkAction *action, EmpathyChatWindowPriv *priv; EmpathyChat *chat; gint index_, numPages; + gboolean wrap_around; priv = GET_PRIV (window); + g_object_get (gtk_settings_get_default (), "gtk-keynav-wrap-around", + &wrap_around, NULL); + chat = priv->current_chat; index_ = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook)); numPages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (priv->notebook)); - if (index_ <= 0) { + if (index_ <= 0 && wrap_around) { gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), numPages - 1); return; } |