aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-12-18 16:49:00 -0600
committerTed Gould <ted@gould.cx>2009-12-18 16:49:00 -0600
commit79bb77adadf9d4e3a1fd5d83caa10a20232faa2e (patch)
tree5750bcf267fa2c91a741b324c925e817fca50dd5
parent29b3d90bd2e55dc6a4041f9765a939b5dcd6ba75 (diff)
downloadayatana-indicator-session-79bb77adadf9d4e3a1fd5d83caa10a20232faa2e.tar.gz
ayatana-indicator-session-79bb77adadf9d4e3a1fd5d83caa10a20232faa2e.tar.bz2
ayatana-indicator-session-79bb77adadf9d4e3a1fd5d83caa10a20232faa2e.zip
Setting booleans and values oh my!
-rw-r--r--src/session-service.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/session-service.c b/src/session-service.c
index a4240be..a91170f 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -105,7 +105,7 @@ suspend_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata)
g_debug("Got Suspend: %s", g_value_get_boolean(&candoit) ? "true" : "false");
if (suspend_mi != NULL) {
- dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false");
+ dbusmenu_menuitem_property_set_value(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, &candoit);
}
return;
@@ -128,7 +128,7 @@ hibernate_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata)
g_debug("Got Hibernate: %s", g_value_get_boolean(&candoit) ? "true" : "false");
if (suspend_mi != NULL) {
- dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false");
+ dbusmenu_menuitem_property_set_value(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, &candoit);
}
return;
@@ -253,13 +253,13 @@ create_items (DbusmenuMenuitem * root) {
g_signal_connect(G_OBJECT(logout_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "logout");
suspend_mi = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
+ dbusmenu_menuitem_property_set_bool(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Suspend"));
dbusmenu_menuitem_child_append(root, suspend_mi);
g_signal_connect(G_OBJECT(suspend_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Suspend");
hibernate_mi = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
+ dbusmenu_menuitem_property_set_bool(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Hibernate"));
dbusmenu_menuitem_child_append(root, hibernate_mi);
g_signal_connect(G_OBJECT(hibernate_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Hibernate");