blob: 6ccb45a9bce4a2b5f237e827f4b15accd5818495 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/* 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, see <http://www.gnu.org/licenses/>.
*
*/
#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;
}
|