aboutsummaryrefslogtreecommitdiff
path: root/src/krb5-auth-gconf.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2008-10-18 18:17:23 +0200
committerGuido Guenther <agx@sigxcpu.org>2008-10-18 18:17:23 +0200
commitf1bf81e507d3319a6b31f4f679165fb72d58086a (patch)
tree8f6ac6188a950d210f8c3e8fedbf29bc343aa4d5 /src/krb5-auth-gconf.c
parentdocument changes and release 0.7.hit7cc1d84-1 (diff)
parentImported Upstream version 0.7.jit26357da (diff)
downloadkrb5-auth-dialog-f1bf81e507d3319a6b31f4f679165fb72d58086a.tar.gz
krb5-auth-dialog-f1bf81e507d3319a6b31f4f679165fb72d58086a.tar.bz2
krb5-auth-dialog-f1bf81e507d3319a6b31f4f679165fb72d58086a.zip
Merge commit 'upstream/0.7.jit26357da'
Diffstat (limited to 'src/krb5-auth-gconf.c')
-rw-r--r--src/krb5-auth-gconf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/krb5-auth-gconf.c b/src/krb5-auth-gconf.c
index 20d22ce..a11370c 100644
--- a/src/krb5-auth-gconf.c
+++ b/src/krb5-auth-gconf.c
@@ -26,6 +26,7 @@
#define KA_GCONF_PATH "/apps/" PACKAGE
#define KA_GCONF_KEY_PRINCIPAL KA_GCONF_PATH "/principal"
+#define KA_GCONF_KEY_PK_USERID KA_GCONF_PATH "/pk_userid"
#define KA_GCONF_KEY_PROMPT_MINS KA_GCONF_PATH "/prompt_minutes"
#define KA_GCONF_KEY_SHOW_TRAYICON KA_GCONF_PATH "/show_trayicon"
@@ -124,6 +125,18 @@ ka_gconf_set_principal (GConfClient* client, Krb5AuthApplet* applet)
static gboolean
+ka_gconf_set_pk_userid (GConfClient* client, Krb5AuthApplet* applet)
+{
+ g_free (applet->pk_userid);
+ if(!ka_gconf_get_string (client, KA_GCONF_KEY_PK_USERID, &applet->pk_userid)) {
+ applet->pk_userid = NULL;
+ }
+ KA_DEBUG("Setting pk_userid to %s", applet->pk_userid ? applet->pk_userid : "<disabled>");
+ return TRUE;
+}
+
+
+static gboolean
ka_gconf_set_prompt_mins (GConfClient* client, Krb5AuthApplet* applet)
{
if(!ka_gconf_get_int (client, KA_GCONF_KEY_PROMPT_MINS, &applet->pw_prompt_secs)) {
@@ -168,6 +181,8 @@ ka_gconf_key_changed_callback (GConfClient* client,
ka_gconf_set_prompt_mins (client, applet);
} else if (g_strcmp0 (key, KA_GCONF_KEY_SHOW_TRAYICON) == 0) {
ka_gconf_set_show_trayicon (client, applet);
+ } else if (g_strcmp0 (key, KA_GCONF_KEY_PK_USERID) == 0) {
+ ka_gconf_set_pk_userid (client, applet);
} else
g_warning("Received notification for unknown gconf key %s", key);
return;
@@ -195,6 +210,7 @@ ka_gconf_init (Krb5AuthApplet* applet, int argc, char* argv[])
ka_gconf_set_principal (client, applet);
ka_gconf_set_prompt_mins (client, applet);
ka_gconf_set_show_trayicon (client, applet);
+ ka_gconf_set_pk_userid(client, applet);
success = TRUE;
out:
bgstack15