32
32
#include "dbus-shared-names.h"
34
#include "gtk-dialog/gconf-helper.h"
34
36
#define DKP_ADDRESS "org.freedesktop.DeviceKit.Power"
35
37
#define DKP_OBJECT "/org/freedesktop/DeviceKit/Power"
36
38
#define DKP_INTERFACE "org.freedesktop.DeviceKit.Power"
223
225
DbusmenuMenuitem * mi = NULL;
225
227
mi = dbusmenu_menuitem_new();
226
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out"));
228
if (supress_confirmations()) {
229
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out"));
231
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out ..."));
227
233
dbusmenu_menuitem_child_append(root, mi);
228
234
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "logout");
240
246
g_signal_connect(G_OBJECT(hibernate_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Hibernate");
242
248
mi = dbusmenu_menuitem_new();
243
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart"));
249
if (supress_confirmations()) {
250
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart"));
252
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart ..."));
244
254
dbusmenu_menuitem_child_append(root, mi);
245
255
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "restart");
247
257
mi = dbusmenu_menuitem_new();
248
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown"));
258
if (supress_confirmations()) {
259
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown"));
261
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown ..."));
249
263
dbusmenu_menuitem_child_append(root, mi);
250
264
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "shutdown");