~skypce/indicator-session/indicator-session

« back to all changes in this revision

Viewing changes to src/session-service.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-09-04 11:46:25 UTC
  • mto: (13.1.3 lucid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20090904114625-dm551kwmdmy5hu3k
Tags: upstream-0.1.1
ImportĀ upstreamĀ versionĀ 0.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        g_debug("Got Suspend: %s", g_value_get_boolean(&candoit) ? "true" : "false");
83
83
 
84
84
        if (suspend_mi != NULL) {
85
 
                dbusmenu_menuitem_property_set(suspend_mi, "visible", g_value_get_boolean(&candoit) ? "true" : "false");
 
85
                dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false");
86
86
        }
87
87
 
88
88
        return;
105
105
        g_debug("Got Hibernate: %s", g_value_get_boolean(&candoit) ? "true" : "false");
106
106
 
107
107
        if (suspend_mi != NULL) {
108
 
                dbusmenu_menuitem_property_set(hibernate_mi, "visible", g_value_get_boolean(&candoit) ? "true" : "false");
 
108
                dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false");
109
109
        }
110
110
 
111
111
        return;
223
223
        DbusmenuMenuitem * mi = NULL;
224
224
 
225
225
        mi = dbusmenu_menuitem_new();
226
 
        dbusmenu_menuitem_property_set(mi, "label", _("Log Out"));
 
226
        dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out"));
227
227
        dbusmenu_menuitem_child_append(root, mi);
228
228
        g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "logout");
229
229
 
230
230
        suspend_mi = dbusmenu_menuitem_new();
231
 
        dbusmenu_menuitem_property_set(suspend_mi, "visible", "false");
232
 
        dbusmenu_menuitem_property_set(suspend_mi, "label", _("Suspend"));
 
231
        dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
 
232
        dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Suspend"));
233
233
        dbusmenu_menuitem_child_append(root, suspend_mi);
234
234
        g_signal_connect(G_OBJECT(suspend_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Suspend");
235
235
 
236
236
        hibernate_mi = dbusmenu_menuitem_new();
237
 
        dbusmenu_menuitem_property_set(hibernate_mi, "visible", "false");
238
 
        dbusmenu_menuitem_property_set(hibernate_mi, "label", _("Hibernate"));
 
237
        dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
 
238
        dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Hibernate"));
239
239
        dbusmenu_menuitem_child_append(root, hibernate_mi);
240
240
        g_signal_connect(G_OBJECT(hibernate_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Hibernate");
241
241
 
242
242
        mi = dbusmenu_menuitem_new();
243
 
        dbusmenu_menuitem_property_set(mi, "label", _("Restart"));
 
243
        dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart"));
244
244
        dbusmenu_menuitem_child_append(root, mi);
245
245
        g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "restart");
246
246
 
247
247
        mi = dbusmenu_menuitem_new();
248
 
        dbusmenu_menuitem_property_set(mi, "label", _("Shutdown"));
 
248
        dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown"));
249
249
        dbusmenu_menuitem_child_append(root, mi);
250
250
        g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "shutdown");
251
251