From 1f47c9e8827165634149f6e21a4588fe577479d8 Mon Sep 17 00:00:00 2001 From: Christoph Korn Date: Wed, 2 Sep 2009 17:10:20 +0200 Subject: Added files which were missing in the previous commit. --- data/indicator-session.schemas.in | 17 +++++++++++++++++ src/gtk-dialog/gconf-helper.c | 32 ++++++++++++++++++++++++++++++++ src/gtk-dialog/gconf-helper.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 data/indicator-session.schemas.in create mode 100644 src/gtk-dialog/gconf-helper.c create mode 100644 src/gtk-dialog/gconf-helper.h diff --git a/data/indicator-session.schemas.in b/data/indicator-session.schemas.in new file mode 100644 index 0000000..1db9226 --- /dev/null +++ b/data/indicator-session.schemas.in @@ -0,0 +1,17 @@ + + + + + /schemas/apps/indicator-session/suppress_logout_restart_shutdown + /apps/indicator-session/suppress_logout_restart_shutdown + indicator-session + bool + FALSE + + Suppress the dialog to confirm logout, restart and shutdown action + Whether or not to show confirmation dialogs for logout, + restart and shutdown actions. + + + + diff --git a/src/gtk-dialog/gconf-helper.c b/src/gtk-dialog/gconf-helper.c new file mode 100644 index 0000000..0bd21ad --- /dev/null +++ b/src/gtk-dialog/gconf-helper.c @@ -0,0 +1,32 @@ +/* +A small wrapper utility to load indicators and put them as menu items +into the gnome-panel using it's applet interface. + +Copyright 2009 Canonical Ltd. + +Authors: + Christoph Korn + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + + +#include + +#include "gconf-helper.h" + +gboolean +supress_confirmations (void) { + GConfClient *client = gconf_client_get_default (); + return gconf_client_get_bool (client, SUPPRESS_KEY, NULL) ; +} diff --git a/src/gtk-dialog/gconf-helper.h b/src/gtk-dialog/gconf-helper.h new file mode 100644 index 0000000..1d78fd8 --- /dev/null +++ b/src/gtk-dialog/gconf-helper.h @@ -0,0 +1,33 @@ +/* +A small wrapper utility to load indicators and put them as menu items +into the gnome-panel using it's applet interface. + +Copyright 2009 Canonical Ltd. + +Authors: + Christoph Korn + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + + +#ifndef __GCONF_HELPER_H__ +#define __GCONF_HELPER_H__ 1 + +#include + +#define SUPPRESS_KEY "/apps/indicator-session/suppress_logout_restart_shutdown" + +gboolean supress_confirmations (void); + +#endif /* __GCONF_HELPER__ */ -- cgit v1.2.3