aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-22 21:12:49 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-22 21:12:49 +0800
commit432d3afbd187bc771a7b5577f3abb64ff39c8693 (patch)
tree259f61df65193b6bb54376c7cebb83a167e03d54
parent555c78e00939cf1ce2a4f410e231b0271b654ed0 (diff)
downloadgsoc2013-empathy-432d3afbd187bc771a7b5577f3abb64ff39c8693.tar
gsoc2013-empathy-432d3afbd187bc771a7b5577f3abb64ff39c8693.tar.gz
gsoc2013-empathy-432d3afbd187bc771a7b5577f3abb64ff39c8693.tar.bz2
gsoc2013-empathy-432d3afbd187bc771a7b5577f3abb64ff39c8693.tar.lz
gsoc2013-empathy-432d3afbd187bc771a7b5577f3abb64ff39c8693.tar.xz
gsoc2013-empathy-432d3afbd187bc771a7b5577f3abb64ff39c8693.tar.zst
gsoc2013-empathy-432d3afbd187bc771a7b5577f3abb64ff39c8693.zip
chat-window: unsensitive the Contact menu if there is no submenu (#637799)
-rw-r--r--src/empathy-chat-window.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 16329ee7b..0e9abcf13 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -423,8 +423,14 @@ chat_window_contact_menu_update (EmpathyChatWindowPriv *priv,
if (orig_submenu == NULL || !gtk_widget_get_visible (orig_submenu)) {
submenu = empathy_chat_get_contact_menu (priv->current_chat);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu), submenu);
- gtk_widget_show (menu);
+ if (submenu != NULL) {
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu), submenu);
+ gtk_widget_show (menu);
+ gtk_widget_set_sensitive (menu, TRUE);
+ }
+ else {
+ gtk_widget_set_sensitive (menu, FALSE);
+ }
} else {
tp_g_signal_connect_object (orig_submenu,
"notify::visible",