diff options
author | Aaron Brown <aaron.j.brown@hotmail.com> | 2010-03-30 13:33:15 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-30 15:59:34 +0800 |
commit | a7fc06448ff7adffc32be7ee3b4d8232cf3ef5e9 (patch) | |
tree | dcba20f746da366ad13955c44ccdc2bf1e012c8e | |
parent | 9026fc61824658c231847e1f023be6fd1eb673e4 (diff) | |
download | gsoc2013-empathy-a7fc06448ff7adffc32be7ee3b4d8232cf3ef5e9.tar gsoc2013-empathy-a7fc06448ff7adffc32be7ee3b4d8232cf3ef5e9.tar.gz gsoc2013-empathy-a7fc06448ff7adffc32be7ee3b4d8232cf3ef5e9.tar.bz2 gsoc2013-empathy-a7fc06448ff7adffc32be7ee3b4d8232cf3ef5e9.tar.lz gsoc2013-empathy-a7fc06448ff7adffc32be7ee3b4d8232cf3ef5e9.tar.xz gsoc2013-empathy-a7fc06448ff7adffc32be7ee3b4d8232cf3ef5e9.tar.zst gsoc2013-empathy-a7fc06448ff7adffc32be7ee3b4d8232cf3ef5e9.zip |
Sets sensitivity of Previous/Next Tab menu items based on gtk-keynav-wrap-around and tab position (#613382)
-rw-r--r-- | src/empathy-chat-window.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index c9e04b554..302aa3ac3 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -333,16 +333,21 @@ chat_window_menu_context_update (EmpathyChatWindowPriv *priv, { gboolean first_page; gboolean last_page; + gboolean wrap_around; gboolean is_connected; gint page_num; page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook)); first_page = (page_num == 0); last_page = (page_num == (num_pages - 1)); + g_object_get (gtk_settings_get_default (), "gtk-keynav-wrap-around", + &wrap_around, NULL); is_connected = empathy_chat_get_tp_chat (priv->current_chat) != NULL; - gtk_action_set_sensitive (priv->menu_tabs_next, TRUE); - gtk_action_set_sensitive (priv->menu_tabs_prev, TRUE); + gtk_action_set_sensitive (priv->menu_tabs_next, (!last_page || + wrap_around)); + gtk_action_set_sensitive (priv->menu_tabs_prev, (!first_page || + wrap_around)); gtk_action_set_sensitive (priv->menu_tabs_detach, num_pages > 1); gtk_action_set_sensitive (priv->menu_tabs_left, !first_page); gtk_action_set_sensitive (priv->menu_tabs_right, !last_page); |