diff options
author | Ted Gould <ted@gould.cx> | 2010-02-17 12:45:44 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-17 12:45:44 -0600 |
commit | 05436b2d6a483ea791b5a1ec396493ed08830b25 (patch) | |
tree | ede62b1e3247b5dd5432b63fc8f78c7cc00c469c /src | |
parent | ca4026eca162910c907fb3224658491335bd98cf (diff) | |
download | ayatana-indicator-messages-05436b2d6a483ea791b5a1ec396493ed08830b25.tar.gz ayatana-indicator-messages-05436b2d6a483ea791b5a1ec396493ed08830b25.tar.bz2 ayatana-indicator-messages-05436b2d6a483ea791b5a1ec396493ed08830b25.zip |
Making visible use boolean properties.
Diffstat (limited to 'src')
-rw-r--r-- | src/launcher-menu-item.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c index f24dfa9..a65aed0 100644 --- a/src/launcher-menu-item.c +++ b/src/launcher-menu-item.c @@ -263,22 +263,16 @@ void launcher_menu_item_set_eclipsed (LauncherMenuItem * li, gboolean eclipsed) { g_debug("Laucher '%s' is %s", launcher_menu_item_get_name(li), eclipsed ? "now eclipsed" : "shown again"); - dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(li), DBUSMENU_MENUITEM_PROP_VISIBLE, eclipsed ? "false" : "true"); + dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(li), DBUSMENU_MENUITEM_PROP_VISIBLE, !eclipsed); return; } gboolean launcher_menu_item_get_eclipsed (LauncherMenuItem * li) { - const gchar * show = dbusmenu_menuitem_property_get(DBUSMENU_MENUITEM(li), DBUSMENU_MENUITEM_PROP_VISIBLE); - if (show == NULL) { - return FALSE; - } - g_debug("Launcher check eclipse: %s", show); - if (!g_strcmp0(show, "false")) { - return TRUE; - } - return FALSE; + gboolean show = dbusmenu_menuitem_property_get_bool(DBUSMENU_MENUITEM(li), DBUSMENU_MENUITEM_PROP_VISIBLE); + g_debug("Launcher check eclipse: %s", show ? "false" : "true"); + return !show; } GList * |