diff options
author | Ted Gould <ted@gould.cx> | 2010-03-16 14:44:39 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-16 14:44:39 -0500 |
commit | 29e2c7e6daf9362367af0d801da0aa54174bb480 (patch) | |
tree | b6097d12e8aa4a4c1c549829e15c8d3c2a4e1e15 /src/lock-helper.c | |
parent | 39e00ebbbf5a23620a3e8b7a46d759913cc7fcd2 (diff) | |
download | ayatana-indicator-session-29e2c7e6daf9362367af0d801da0aa54174bb480.tar.gz ayatana-indicator-session-29e2c7e6daf9362367af0d801da0aa54174bb480.tar.bz2 ayatana-indicator-session-29e2c7e6daf9362367af0d801da0aa54174bb480.zip |
Add in the key for locking the screen and making that part of will_lock
Diffstat (limited to 'src/lock-helper.c')
-rw-r--r-- | src/lock-helper.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lock-helper.c b/src/lock-helper.c index b38be65..b0340ea 100644 --- a/src/lock-helper.c +++ b/src/lock-helper.c @@ -19,9 +19,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <gconf/gconf-client.h> #include <dbus/dbus-glib.h> #include "lock-helper.h" +#define GCONF_DIR "/apps/gnome-screensaver" +#define GCONF_KEY GCONF_DIR "/lock_enabled" + static DBusGProxy * gss_proxy = NULL; static GMainLoop * gss_mainloop = NULL; static guint cookie = 0; @@ -29,6 +33,8 @@ static DBusGProxyCall * cookie_call = NULL; static gboolean is_guest = FALSE; +static GConfClient * gconf_client = NULL; + void build_gss_proxy (void); /* Checks to see if there is an error and reports @@ -124,7 +130,11 @@ will_lock_screen (void) return FALSE; } - return TRUE; + if (gconf_client == NULL) { + gconf_client = gconf_client_get_default(); + } + + return !gconf_client_get_bool (gconf_client, GCONF_KEY, NULL); } /* When the screensave go active, if we've got a mainloop |