223
223
DbusmenuMenuitem * mi = NULL;
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");
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");
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");
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");
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");