~unity8-desktop-session-team/indicator-session/indicator-session-using-upstart

« back to all changes in this revision

Viewing changes to src/session-service.c

  • Committer: Ted Gould
  • Author(s): Christoph Korn
  • Date: 2009-09-08 15:09:45 UTC
  • mfrom: (19.3.2 indicator-session)
  • Revision ID: ted@canonical.com-20090908150945-lzlvrilla7rmuvzc
Adding a GConf key to suppress confirmation dialogs

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