aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-23 11:48:09 -0500
committerTed Gould <ted@canonical.com>2009-09-23 11:48:09 -0500
commiteddfb1cec5a4a6d5b8674c102a72edbb9fcf37ec (patch)
treec4a2a634e9f811f00332b18e8e568dd80d005432 /src
parent4f1a8334b9f819d24dfed202ef6c7d6da272848d (diff)
downloadayatana-indicator-messages-eddfb1cec5a4a6d5b8674c102a72edbb9fcf37ec.tar.gz
ayatana-indicator-messages-eddfb1cec5a4a6d5b8674c102a72edbb9fcf37ec.tar.bz2
ayatana-indicator-messages-eddfb1cec5a4a6d5b8674c102a72edbb9fcf37ec.zip
If we're not given a valid desktop file we should eclipse ourselves, and if we're eclipsed, we should hide the separator as well.
Diffstat (limited to 'src')
-rw-r--r--src/launcher-menu-item.c4
-rw-r--r--src/messages-service.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c
index 822196b..5afe7a9 100644
--- a/src/launcher-menu-item.c
+++ b/src/launcher-menu-item.c
@@ -137,6 +137,10 @@ launcher_menu_item_new (const gchar * desktop_file)
g_signal_connect(G_OBJECT(self), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), NULL);
+ if (priv->appinfo == NULL) {
+ launcher_menu_item_set_eclipsed(self, TRUE);
+ }
+
return self;
}
diff --git a/src/messages-service.c b/src/messages-service.c
index 1a2fa82..1272355 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -1148,7 +1148,10 @@ build_launcher (gpointer data)
dbusmenu_menuitem_child_append(root_menuitem, DBUSMENU_MENUITEM(ll->separator));
resort_menu(root_menuitem);
- if (blacklist_check(launcher_menu_item_get_desktop(ll->menuitem))) {
+ /* If we're in the black list or we've gotten eclipsed
+ by something else, hide the item and the separator. */
+ if (blacklist_check(launcher_menu_item_get_desktop(ll->menuitem)) ||
+ launcher_menu_item_get_eclipsed(ll->menuitem)) {
launcher_menu_item_set_eclipsed(ll->menuitem, TRUE);
dbusmenu_menuitem_property_set(ll->separator, DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
}