~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-08 18:15:03 UTC
  • mto: (13.1.3 lucid)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20090908181503-q1y00nsvk547ta4f
Tags: upstream-0.1.2
ImportĀ upstreamĀ versionĀ 0.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
#include "dbus-shared-names.h"
33
33
 
 
34
#include "gtk-dialog/gconf-helper.h"
 
35
 
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;
224
226
 
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"));
 
230
        } else {
 
231
                dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out ..."));
 
232
        }
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");
229
235
 
240
246
        g_signal_connect(G_OBJECT(hibernate_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Hibernate");
241
247
 
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"));
 
251
        } else {
 
252
                dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart ..."));
 
253
        }
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");
246
256
 
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"));
 
260
        } else {
 
261
                dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown ..."));
 
262
        }
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");
251
265