aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-10 13:40:49 -0500
committerTed Gould <ted@canonical.com>2009-09-10 13:40:49 -0500
commitacdeaff5212ea63681d0f2b6d623d0780b6350ef (patch)
treedff4f28f09391261a42a4b14cdd16dcbd73b54af
parent0952465001fe38e0872e1472739ae7786aa1761a (diff)
downloadayatana-indicator-session-acdeaff5212ea63681d0f2b6d623d0780b6350ef.tar.gz
ayatana-indicator-session-acdeaff5212ea63681d0f2b6d623d0780b6350ef.tar.bz2
ayatana-indicator-session-acdeaff5212ea63681d0f2b6d623d0780b6350ef.zip
Checking the global status on whether the menu items should be sensitive or not.
-rw-r--r--src/status-service.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/status-service.c b/src/status-service.c
index 195529b..d8f60d4 100644
--- a/src/status-service.c
+++ b/src/status-service.c
@@ -234,7 +234,9 @@ build_menu (gpointer data)
dbusmenu_menuitem_property_set(status_menuitems[i], "type", DBUSMENU_CLIENT_TYPES_IMAGE);
dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[i]));
dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_ICON, status_icons[i]);
- dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");
+ if (global_status == STATUS_PROVIDER_STATUS_DISCONNECTED) {
+ dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");
+ }
g_signal_connect(G_OBJECT(status_menuitems[i]), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(status_menu_click), GINT_TO_POINTER(i));
dbusmenu_menuitem_child_append(status_menuitem, status_menuitems[i]);