diff options
author | Ted Gould <ted@canonical.com> | 2009-09-03 13:46:44 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-03 13:46:44 -0500 |
commit | 4edd517ba3f85051cd4cecda211a86a97f6ddea3 (patch) | |
tree | 5c07a9168fdf4f00c41e9a5d1472174dabc53211 | |
parent | 974d47305444df724a9c6a5b93666fbd69d4fc5e (diff) | |
download | ayatana-indicator-session-4edd517ba3f85051cd4cecda211a86a97f6ddea3.tar.gz ayatana-indicator-session-4edd517ba3f85051cd4cecda211a86a97f6ddea3.tar.bz2 ayatana-indicator-session-4edd517ba3f85051cd4cecda211a86a97f6ddea3.zip |
Switching to using the defines for all of the properties.
-rw-r--r-- | src/session-service.c | 18 | ||||
-rw-r--r-- | src/users-service.c | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/session-service.c b/src/session-service.c index ad160e9..bea26ba 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -82,7 +82,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, "visible", g_value_get_boolean(&candoit) ? "true" : "false"); + dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false"); } return; @@ -105,7 +105,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, "visible", g_value_get_boolean(&candoit) ? "true" : "false"); + dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false"); } return; @@ -223,29 +223,29 @@ create_items (DbusmenuMenuitem * root) { DbusmenuMenuitem * mi = NULL; mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Log Out")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "logout"); suspend_mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(suspend_mi, "visible", "false"); - dbusmenu_menuitem_property_set(suspend_mi, "label", _("Suspend")); + dbusmenu_menuitem_property_set(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, "visible", "false"); - dbusmenu_menuitem_property_set(hibernate_mi, "label", _("Hibernate")); + dbusmenu_menuitem_property_set(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"); mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Restart")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "restart"); mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Shutdown")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "shutdown"); diff --git a/src/users-service.c b/src/users-service.c index 9ada91f..5db832b 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -113,14 +113,14 @@ create_items (DbusmenuMenuitem * root) { if (check_guest_session()) { mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("Guest Session")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Guest Session")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_guest_session), NULL); } if (check_new_session()) { mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, "label", _("New Session...")); + dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("New Session...")); dbusmenu_menuitem_child_append(root, mi); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_new_session), NULL); } |