aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-24 22:37:18 -0500
committerTed Gould <ted@gould.cx>2010-03-24 22:37:18 -0500
commit53575832c2a50e6eca2dba63d2d2b33ac2bbf591 (patch)
tree404d6f244a153c020756c8e1c5929a583fd97f48
parent9c0dd994e45546871b39ad007d549b95e1a93d1c (diff)
downloadayatana-indicator-messages-53575832c2a50e6eca2dba63d2d2b33ac2bbf591.tar.gz
ayatana-indicator-messages-53575832c2a50e6eca2dba63d2d2b33ac2bbf591.tar.bz2
ayatana-indicator-messages-53575832c2a50e6eca2dba63d2d2b33ac2bbf591.zip
When we're being reshown eval the label
-rw-r--r--src/launcher-menu-item.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c
index 4247738..5d9de12 100644
--- a/src/launcher-menu-item.c
+++ b/src/launcher-menu-item.c
@@ -321,6 +321,24 @@ launcher_menu_item_set_eclipsed (LauncherMenuItem * li, gboolean eclipsed)
dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(li), DBUSMENU_MENUITEM_PROP_VISIBLE, !eclipsed);
g_list_foreach(priv->shortcuts, eclipse_shortcuts_cb, GINT_TO_POINTER(eclipsed));
+
+ /* If we're being reshown let's re-evaluate how we should be
+ showing the label */
+ if (!eclipsed) {
+ const gchar * default_name = NULL;
+
+ if (seen_db_seen(priv->desktop)) {
+ default_name = get_default_name(priv->desktop);
+ } else {
+ default_name = get_default_setup(priv->desktop);
+ }
+
+ if (default_name == NULL) {
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(li), DBUSMENU_MENUITEM_PROP_LABEL, launcher_menu_item_get_name(li));
+ } else {
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(li), DBUSMENU_MENUITEM_PROP_LABEL, _(default_name));
+ }
+ }
return;
}