diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-03-31 16:24:35 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-03-31 16:24:35 +0200 |
commit | 6c66f3c0bfc6c655c53e552ba8ef487700a6e0bc (patch) | |
tree | ec0da0d6be6e02f3e237ec35743f213df218f7d2 /src/ka-settings.c | |
parent | New upstream version 3.2.1 (diff) | |
download | krb5-auth-dialog-6c66f3c0bfc6c655c53e552ba8ef487700a6e0bc.tar.gz krb5-auth-dialog-6c66f3c0bfc6c655c53e552ba8ef487700a6e0bc.tar.bz2 krb5-auth-dialog-6c66f3c0bfc6c655c53e552ba8ef487700a6e0bc.zip |
New upstream version 3.8.0
Diffstat (limited to 'src/ka-settings.c')
-rw-r--r-- | src/ka-settings.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/ka-settings.c b/src/ka-settings.c new file mode 100644 index 0000000..a2baab4 --- /dev/null +++ b/src/ka-settings.c @@ -0,0 +1,59 @@ +/* Krb5 Auth Applet -- Acquire and release kerberos tickets + * + * (C) 2008,2009,2013 Guido Guenther <agx@sigxcpu.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ +#include "config.h" + +#include <string.h> + +#include "ka-applet-priv.h" +#include "ka-settings.h" + +#define do_binding(NAME) \ + g_settings_bind(settings, \ + KA_SETTING_KEY_##NAME,\ + applet, \ + KA_PROP_NAME_##NAME, \ + G_SETTINGS_BIND_DEFAULT) + +static void +ka_setup_bindings(KaApplet* applet, + GSettings* settings) +{ + do_binding(PRINCIPAL); + do_binding(PK_USERID); + do_binding(PK_ANCHORS); + do_binding(PW_PROMPT_MINS); + do_binding(TGT_FORWARDABLE); + do_binding(TGT_PROXIABLE); + do_binding(TGT_RENEWABLE); + do_binding(CONF_TICKETS); +} + +#undef do_binding + +GSettings* +ka_settings_init (KaApplet* applet) +{ + GSettings *settings; + + settings = g_settings_new (KA_SETTING_SCHEMA); + + ka_setup_bindings(applet, settings); + return settings; +} |