From c646d52761bf59f014b9c385d15309880cc5309c Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Mon, 14 Feb 2011 21:00:53 +0100 Subject: New upstream version 2.91.6 --- cc-panel/Makefile.am | 55 +++ cc-panel/Makefile.in | 723 ++++++++++++++++++++++++++++++++++ cc-panel/cc-ka-panel.c | 784 +++++++++++++++++++++++++++++++++++++ cc-panel/cc-ka-panel.h | 45 +++ cc-panel/gnome-ka-panel.desktop.in | 17 + cc-panel/ka-module.c | 20 + cc-panel/ka-panel.ui | 579 +++++++++++++++++++++++++++ 7 files changed, 2223 insertions(+) create mode 100644 cc-panel/Makefile.am create mode 100644 cc-panel/Makefile.in create mode 100644 cc-panel/cc-ka-panel.c create mode 100644 cc-panel/cc-ka-panel.h create mode 100644 cc-panel/gnome-ka-panel.desktop.in create mode 100644 cc-panel/ka-module.c create mode 100644 cc-panel/ka-panel.ui (limited to 'cc-panel') diff --git a/cc-panel/Makefile.am b/cc-panel/Makefile.am new file mode 100644 index 0000000..d4d412c --- /dev/null +++ b/cc-panel/Makefile.am @@ -0,0 +1,55 @@ +NULL = + +ccpanelsdir = $(PANELS_DIR) +ccpanels_LTLIBRARIES = libka.la + +libka_la_SOURCES = \ + ka-module.c \ + cc-ka-panel.c \ + $(top_srcdir)/src/ka-gconf-tools.c \ + $(top_srcdir)/src/ka-gconf-tools.h \ + $(top_srcdir)/src/ka-tools.c \ + $(top_srcdir)/src/ka-tools.h \ + cc-ka-panel.h + +INCLUDES = \ + -I$(top_srcdir)/src \ + $(GTK_CFLAGS) \ + $(GCONF_CFLAGS) \ + $(CONTROL_CENTER_CFLAGS) \ + $(WARN_CFLAGS) \ + $(AM_CFLAGS) \ + -DKA_DATA_DIR=\""$(pkgdatadir)"\" \ + -DDATA_DIR=\""$(datadir)"\" \ + -DLOCALE_DIR=\""$(localedir)/"\" \ + $(NULL) + +libka_la_LIBADD = \ + $(GCONF_LIBS) \ + $(GTK_LIBS) \ + $(CONTROL_CENTER_LIBS) \ + $(NULL) + +AM_CPPFLAGS = \ + $(DISABLE_DEPRECATED) \ + $(NULL) + +libka_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)' + +desktopdir = $(datadir)/applications +desktop_in_files = gnome-ka-panel.desktop.in +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) + +@INTLTOOL_DESKTOP_RULE@ + +pkgdatadir = $(datadir)/krb5-auth-dialog +pkgdata_DATA = \ + ka-panel.ui \ + $(NULL) + +CLEANFILES = $(desktop_DATA) + +EXTRA_DIST = \ + $(desktop_in_files) \ + $(pkgdata_DATA) \ + $(NULL) diff --git a/cc-panel/Makefile.in b/cc-panel/Makefile.in new file mode 100644 index 0000000..e786c21 --- /dev/null +++ b/cc-panel/Makefile.in @@ -0,0 +1,723 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = cc-panel +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/compiler-flags.m4 \ + $(top_srcdir)/m4/gnome-doc-utils.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(ccpanelsdir)" "$(DESTDIR)$(desktopdir)" \ + "$(DESTDIR)$(pkgdatadir)" +LTLIBRARIES = $(ccpanels_LTLIBRARIES) +am__DEPENDENCIES_1 = +libka_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +am_libka_la_OBJECTS = ka-module.lo cc-ka-panel.lo ka-gconf-tools.lo \ + ka-tools.lo +libka_la_OBJECTS = $(am_libka_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libka_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libka_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libka_la_SOURCES) +DIST_SOURCES = $(libka_la_SOURCES) +DATA = $(desktop_DATA) $(pkgdata_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgdatadir = $(datadir)/krb5-auth-dialog +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILER_FLAGS = @COMPILER_FLAGS@ +CONTROL_CENTER_CFLAGS = @CONTROL_CENTER_CFLAGS@ +CONTROL_CENTER_LIBS = @CONTROL_CENTER_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ +DOC_USER_FORMATS = @DOC_USER_FORMATS@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_CFLAGS = @GCONF_CFLAGS@ +GCONF_LIBS = @GCONF_LIBS@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HELP_DIR = @HELP_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +KA_PLUGINS_DIR = @KA_PLUGINS_DIR@ +KRB5_CFLAGS = @KRB5_CFLAGS@ +KRB5_CONFIG = @KRB5_CONFIG@ +KRB5_LIBS = @KRB5_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBCAP = @LIBCAP@ +LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@ +LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NETWORK_MANAGER_CFLAGS = @NETWORK_MANAGER_CFLAGS@ +NETWORK_MANAGER_LIBS = @NETWORK_MANAGER_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OMF_DIR = @OMF_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_LIBS = @PAM_LIBS@ +PANELS_DIR = @PANELS_DIR@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SC_PKCS11 = @SC_PKCS11@ +SED = @SED@ +SETCAP = @SETCAP@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_PYTHON_CFLAGS = @WARN_PYTHON_CFLAGS@ +XGETTEXT = @XGETTEXT@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +check_interval = @check_interval@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +minimum_lifetime = @minimum_lifetime@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +NULL = +ccpanelsdir = $(PANELS_DIR) +ccpanels_LTLIBRARIES = libka.la +libka_la_SOURCES = \ + ka-module.c \ + cc-ka-panel.c \ + $(top_srcdir)/src/ka-gconf-tools.c \ + $(top_srcdir)/src/ka-gconf-tools.h \ + $(top_srcdir)/src/ka-tools.c \ + $(top_srcdir)/src/ka-tools.h \ + cc-ka-panel.h + +INCLUDES = \ + -I$(top_srcdir)/src \ + $(GTK_CFLAGS) \ + $(GCONF_CFLAGS) \ + $(CONTROL_CENTER_CFLAGS) \ + $(WARN_CFLAGS) \ + $(AM_CFLAGS) \ + -DKA_DATA_DIR=\""$(pkgdatadir)"\" \ + -DDATA_DIR=\""$(datadir)"\" \ + -DLOCALE_DIR=\""$(localedir)/"\" \ + $(NULL) + +libka_la_LIBADD = \ + $(GCONF_LIBS) \ + $(GTK_LIBS) \ + $(CONTROL_CENTER_LIBS) \ + $(NULL) + +AM_CPPFLAGS = \ + $(DISABLE_DEPRECATED) \ + $(NULL) + +libka_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)' +desktopdir = $(datadir)/applications +desktop_in_files = gnome-ka-panel.desktop.in +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +pkgdata_DATA = \ + ka-panel.ui \ + $(NULL) + +CLEANFILES = $(desktop_DATA) +EXTRA_DIST = \ + $(desktop_in_files) \ + $(pkgdata_DATA) \ + $(NULL) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cc-panel/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu cc-panel/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-ccpanelsLTLIBRARIES: $(ccpanels_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(ccpanelsdir)" || $(MKDIR_P) "$(DESTDIR)$(ccpanelsdir)" + @list='$(ccpanels_LTLIBRARIES)'; test -n "$(ccpanelsdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(ccpanelsdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(ccpanelsdir)"; \ + } + +uninstall-ccpanelsLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(ccpanels_LTLIBRARIES)'; test -n "$(ccpanelsdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(ccpanelsdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(ccpanelsdir)/$$f"; \ + done + +clean-ccpanelsLTLIBRARIES: + -test -z "$(ccpanels_LTLIBRARIES)" || rm -f $(ccpanels_LTLIBRARIES) + @list='$(ccpanels_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libka.la: $(libka_la_OBJECTS) $(libka_la_DEPENDENCIES) + $(AM_V_CCLD)$(libka_la_LINK) -rpath $(ccpanelsdir) $(libka_la_OBJECTS) $(libka_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cc-ka-panel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ka-gconf-tools.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ka-module.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ka-tools.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +ka-gconf-tools.lo: $(top_srcdir)/src/ka-gconf-tools.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ka-gconf-tools.lo -MD -MP -MF $(DEPDIR)/ka-gconf-tools.Tpo -c -o ka-gconf-tools.lo `test -f '$(top_srcdir)/src/ka-gconf-tools.c' || echo '$(srcdir)/'`$(top_srcdir)/src/ka-gconf-tools.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ka-gconf-tools.Tpo $(DEPDIR)/ka-gconf-tools.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/ka-gconf-tools.c' object='ka-gconf-tools.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ka-gconf-tools.lo `test -f '$(top_srcdir)/src/ka-gconf-tools.c' || echo '$(srcdir)/'`$(top_srcdir)/src/ka-gconf-tools.c + +ka-tools.lo: $(top_srcdir)/src/ka-tools.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ka-tools.lo -MD -MP -MF $(DEPDIR)/ka-tools.Tpo -c -o ka-tools.lo `test -f '$(top_srcdir)/src/ka-tools.c' || echo '$(srcdir)/'`$(top_srcdir)/src/ka-tools.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ka-tools.Tpo $(DEPDIR)/ka-tools.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/ka-tools.c' object='ka-tools.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ka-tools.lo `test -f '$(top_srcdir)/src/ka-tools.c' || echo '$(srcdir)/'`$(top_srcdir)/src/ka-tools.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-desktopDATA: $(desktop_DATA) + @$(NORMAL_INSTALL) + test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ + done + +uninstall-desktopDATA: + @$(NORMAL_UNINSTALL) + @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(desktopdir)" && rm -f $$files +install-pkgdataDATA: $(pkgdata_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" + @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ + done + +uninstall-pkgdataDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(ccpanelsdir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(pkgdatadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-ccpanelsLTLIBRARIES clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-ccpanelsLTLIBRARIES install-desktopDATA \ + install-pkgdataDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-ccpanelsLTLIBRARIES uninstall-desktopDATA \ + uninstall-pkgdataDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-ccpanelsLTLIBRARIES clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am \ + install-ccpanelsLTLIBRARIES install-data install-data-am \ + install-desktopDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgdataDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-ccpanelsLTLIBRARIES \ + uninstall-desktopDATA uninstall-pkgdataDATA + + +@INTLTOOL_DESKTOP_RULE@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cc-panel/cc-ka-panel.c b/cc-panel/cc-ka-panel.c new file mode 100644 index 0000000..c63e4e3 --- /dev/null +++ b/cc-panel/cc-ka-panel.c @@ -0,0 +1,784 @@ +/* + * Copyright (C) 2011 Guido Guenther + * + * 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, 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 "cc-ka-panel.h" + +#include "ka-gconf-tools.h" +#include "ka-tools.h" + +#include + +G_DEFINE_DYNAMIC_TYPE (CcKaPanel, cc_ka_panel, CC_TYPE_PANEL) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_KA_PANEL, CcKaPanelPrivate)) + +#define WID(b, w) (GtkWidget *) gtk_builder_get_object (b, w) + +#define PKINIT_SMARTCARD "PKCS11:" SC_PKCS11 +#define PKINIT_FILE "FILE:" + +#define N_LISTENERS 7 + +typedef struct _CcKaPanelPrivate CcKaPanelPrivate; + +struct _CcKaPanelPrivate { + GtkBuilder *builder; + + GConfClient *client; + + GtkWidget *notebook; + GtkWidget *principal_entry; + GtkWidget *pkuserid_entry; + GtkWidget *pkuserid_button; + GtkWidget *smartcard_toggle; + GtkWidget *pkanchors_entry; + GtkWidget *pkanchors_button; + GtkWidget *forwardable_toggle; + GtkWidget *proxiable_toggle; + GtkWidget *renewable_toggle; + GtkWidget *prompt_mins_entry; + + guint listeners [N_LISTENERS]; + int n_listeners; +}; + +static void +cc_ka_panel_principal_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + CcKaPanelPrivate *priv) +{ + const char *principal; + + if (!entry->value || entry->value->type != GCONF_VALUE_STRING) + return; + + principal = gconf_value_get_string (entry->value); + + if (!principal || !strlen(principal)) + gtk_entry_set_text (GTK_ENTRY (priv->principal_entry), ""); + else { + const char *old_principal; + + old_principal = gtk_entry_get_text (GTK_ENTRY (priv->principal_entry)); + if (!old_principal || (old_principal && strcmp (old_principal, principal))) + gtk_entry_set_text (GTK_ENTRY (priv->principal_entry), principal); + } +} + +static void +cc_ka_panel_principal_changed (GtkEntry *entry, + CcKaPanelPrivate *priv) +{ + const char *principal; + + principal = gtk_entry_get_text (entry); + + if (!principal || !strlen(principal)) + gconf_client_unset (priv->client, KA_GCONF_KEY_PRINCIPAL, NULL); + else + gconf_client_set_string (priv->client, KA_GCONF_KEY_PRINCIPAL, principal, NULL); +} + + +static void +cc_ka_panel_setup_principal_entry (CcKaPanelPrivate *priv) +{ + char *principal = NULL; + + priv->principal_entry = WID (priv->builder, "principal_entry"); + g_assert (priv->principal_entry != NULL); + + if (!ka_gconf_get_string (priv->client, KA_GCONF_KEY_PRINCIPAL, &principal)) + g_warning ("Getting principal failed"); + + if (principal && strlen(principal)) + gtk_entry_set_text (GTK_ENTRY (priv->principal_entry), principal); + if (principal) + g_free (principal); + + g_signal_connect (priv->principal_entry, "changed", + G_CALLBACK (cc_ka_panel_principal_changed), priv); + + if (!gconf_client_key_is_writable (priv->client, KA_GCONF_KEY_PRINCIPAL, NULL)) { + gtk_widget_set_sensitive (priv->principal_entry, FALSE); + } + + priv->listeners [priv->n_listeners] = + gconf_client_notify_add (priv->client, + KA_GCONF_KEY_PRINCIPAL, + (GConfClientNotifyFunc) cc_ka_panel_principal_notify, + priv, NULL, NULL); + priv->n_listeners++; +} + + +static void +cc_ka_panel_pkuserid_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + CcKaPanelPrivate *priv) +{ + const char *pkuserid; + + if (!entry->value || entry->value->type != GCONF_VALUE_STRING) + return; + + pkuserid = gconf_value_get_string (entry->value); + + if (!pkuserid || !strlen(pkuserid)) + gtk_entry_set_text (GTK_ENTRY (priv->pkuserid_entry), ""); + else { + const char *old_pkuserid; + + old_pkuserid = gtk_entry_get_text (GTK_ENTRY (priv->pkuserid_entry)); + if (!old_pkuserid || (old_pkuserid && strcmp (old_pkuserid, pkuserid))) + gtk_entry_set_text (GTK_ENTRY (priv->pkuserid_entry), pkuserid); + } +} + + +static void +cc_ka_panel_pkuserid_changed (GtkEntry *entry, + CcKaPanelPrivate *priv) +{ + const char *pkuserid; + + pkuserid = gtk_entry_get_text (entry); + + if (!pkuserid || !strlen(pkuserid)) + gconf_client_unset (priv->client, KA_GCONF_KEY_PK_USERID, NULL); + else + gconf_client_set_string (priv->client, KA_GCONF_KEY_PK_USERID, pkuserid, NULL); +} + + +static void +cc_ka_panel_setup_pkuserid_entry (CcKaPanelPrivate *priv) +{ + char *pkuserid = NULL; + + priv->pkuserid_entry = WID(priv->builder, "pkuserid_entry"); + g_assert (priv->pkuserid_entry != NULL); + + if (!ka_gconf_get_string (priv->client, KA_GCONF_KEY_PK_USERID, &pkuserid)) + g_warning ("Getting pkuserid failed"); + + if (pkuserid && strlen(pkuserid)) + gtk_entry_set_text (GTK_ENTRY (priv->pkuserid_entry), pkuserid); + if (pkuserid) + g_free (pkuserid); + + g_signal_connect (priv->pkuserid_entry, "changed", + G_CALLBACK (cc_ka_panel_pkuserid_changed), priv); + if (!gconf_client_key_is_writable (priv->client, KA_GCONF_KEY_PK_USERID, NULL)) { + gtk_widget_set_sensitive (priv->pkuserid_entry, FALSE); + } + + priv->listeners [priv->n_listeners] = + gconf_client_notify_add (priv->client, + KA_GCONF_KEY_PK_USERID, + (GConfClientNotifyFunc) cc_ka_panel_pkuserid_notify, + priv, NULL, NULL); + priv->n_listeners++; +} + + +static void +ka_preferences_pkanchors_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + CcKaPanelPrivate *priv) +{ + const char *pkanchors; + + if (!entry->value || entry->value->type != GCONF_VALUE_STRING) + return; + + pkanchors = gconf_value_get_string (entry->value); + + if (!pkanchors || !strlen(pkanchors)) + gtk_entry_set_text (GTK_ENTRY (priv->pkanchors_entry), ""); + else { + const char *old_pkanchors; + + old_pkanchors = gtk_entry_get_text (GTK_ENTRY (priv->pkanchors_entry)); + if (!old_pkanchors || (old_pkanchors && strcmp (old_pkanchors, pkanchors))) + gtk_entry_set_text (GTK_ENTRY (priv->pkanchors_entry), pkanchors); + } +} + + +static void +cc_ka_panel_pkanchors_changed (GtkEntry *entry, + CcKaPanelPrivate *priv) +{ + const char *pkanchors; + + pkanchors = gtk_entry_get_text (entry); + + if (!pkanchors || !strlen(pkanchors)) + gconf_client_unset (priv->client, KA_GCONF_KEY_PK_ANCHORS, NULL); + else + gconf_client_set_string (priv->client, KA_GCONF_KEY_PK_ANCHORS, + pkanchors, NULL); +} + + +static void +cc_ka_panel_setup_pkanchors_entry (CcKaPanelPrivate *priv) +{ + char *pkanchors = NULL; + + priv->pkanchors_entry = WID(priv->builder, "pkanchors_entry"); + g_assert (priv->pkanchors_entry != NULL); + + if (!ka_gconf_get_string (priv->client, KA_GCONF_KEY_PK_ANCHORS, &pkanchors)) + g_warning ("Getting pkanchors failed"); + + if (pkanchors && strlen(pkanchors)) + gtk_entry_set_text (GTK_ENTRY (priv->pkanchors_entry), pkanchors); + if (pkanchors) + g_free (pkanchors); + + g_signal_connect (priv->pkanchors_entry, "changed", + G_CALLBACK (cc_ka_panel_pkanchors_changed), priv); + if (!gconf_client_key_is_writable (priv->client, KA_GCONF_KEY_PK_ANCHORS, NULL)) { + gtk_widget_set_sensitive (priv->pkanchors_entry, FALSE); + } + + priv->listeners [priv->n_listeners] = + gconf_client_notify_add (priv->client, + KA_GCONF_KEY_PK_ANCHORS, + (GConfClientNotifyFunc) ka_preferences_pkanchors_notify, + priv, NULL, NULL); + priv->n_listeners++; +} + + +static void +ka_preferences_toggle_pkuserid_entry (gboolean state, CcKaPanelPrivate *priv) +{ + gtk_widget_set_sensitive (priv->pkuserid_entry, state); + gtk_widget_set_sensitive (priv->pkuserid_button, state); +} + + +static void +cc_ka_panel_smartcard_toggled (GtkToggleButton *toggle, + CcKaPanelPrivate *priv) +{ + gboolean smartcard = gtk_toggle_button_get_active (toggle); + static gchar *old_path = NULL; + + if (smartcard) { + const char *path; + + path = gtk_entry_get_text (GTK_ENTRY(priv->pkuserid_entry)); + if (g_strcmp0 (path, PKINIT_SMARTCARD)) { + g_free (old_path); + old_path = g_strdup (path); + } + ka_preferences_toggle_pkuserid_entry (FALSE, priv); + gconf_client_set_string (priv->client, KA_GCONF_KEY_PK_USERID, PKINIT_SMARTCARD, NULL); + } else { + ka_preferences_toggle_pkuserid_entry (TRUE, priv); + if (old_path) + gconf_client_set_string (priv->client, KA_GCONF_KEY_PK_USERID, old_path, NULL); + else + gconf_client_unset (priv->client, KA_GCONF_KEY_PK_USERID, NULL); + } +} + + +static void +cc_ka_panel_setup_smartcard_toggle(CcKaPanelPrivate *priv) +{ + char *pkuserid = NULL; + + priv->smartcard_toggle = WID (priv->builder, "smartcard_toggle"); + g_assert (priv->smartcard_toggle != NULL); + + if (!ka_gconf_get_string (priv->client, KA_GCONF_KEY_PK_USERID, &pkuserid)) + g_warning ("Getting pkanchors failed"); + + g_signal_connect (priv->smartcard_toggle, "toggled", + G_CALLBACK (cc_ka_panel_smartcard_toggled), priv); + + if (!g_strcmp0 (pkuserid, PKINIT_SMARTCARD)) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->smartcard_toggle), TRUE); + else + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->smartcard_toggle), FALSE); + + if (pkuserid) + g_free (pkuserid); +} + + +static void +cc_ka_panel_browse_certs (CcKaPanelPrivate *priv, GtkEntry *entry) +{ + GtkWidget *filechooser; + GtkFileFilter *cert_filter, *all_filter; + gchar *filename = NULL; + const gchar *current; + gint ret; + + filechooser = gtk_file_chooser_dialog_new(_("Choose Certificate"), + GTK_WINDOW (gtk_widget_get_toplevel (priv->notebook)), + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + + current = gtk_entry_get_text (entry); + if (current && g_str_has_prefix (current, PKINIT_FILE) && + strlen(current) > strlen (PKINIT_FILE)) { + gtk_file_chooser_select_filename (GTK_FILE_CHOOSER(filechooser), + (const gchar*)¤t[strlen(PKINIT_FILE)]); + } + + cert_filter = g_object_ref_sink (gtk_file_filter_new ()); + gtk_file_filter_add_mime_type (cert_filter, "application/x-x509-ca-cert"); + gtk_file_filter_set_name (cert_filter, _("X509 Certificates")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooser), cert_filter); + all_filter = g_object_ref_sink (gtk_file_filter_new ()); + gtk_file_filter_add_pattern (all_filter, "*"); + gtk_file_filter_set_name (all_filter, _("all files")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filechooser), all_filter); + + ret = gtk_dialog_run (GTK_DIALOG(filechooser)); + if (ret == GTK_RESPONSE_ACCEPT) + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(filechooser)); + gtk_widget_destroy (GTK_WIDGET(filechooser)); + + if (filename) { + gchar *cert = g_strconcat( PKINIT_FILE, filename, NULL); + gtk_entry_set_text (entry, cert); + g_free (filename); + g_free (cert); + } + g_object_unref (cert_filter); + g_object_unref (all_filter); +} + +static void +cc_ka_panel_browse_pkuserids (GtkButton *button G_GNUC_UNUSED, + CcKaPanelPrivate *priv) +{ + cc_ka_panel_browse_certs (priv, + GTK_ENTRY(priv->pkuserid_entry)); +} + +static void +cc_ka_panel_browse_pkanchors(GtkButton *button G_GNUC_UNUSED, + CcKaPanelPrivate *priv) +{ + cc_ka_panel_browse_certs (priv, + GTK_ENTRY(priv->pkanchors_entry)); +} + +static void +cc_ka_panel_setup_pkuserid_button (CcKaPanelPrivate *priv) +{ + priv->pkuserid_button = WID (priv->builder, "pkuserid_button"); + g_assert (priv->pkuserid_button != NULL); + + g_signal_connect (priv->pkuserid_button, "clicked", + G_CALLBACK (cc_ka_panel_browse_pkuserids), priv); + +} + +static void +cc_ka_panel_setup_pkanchors_button (CcKaPanelPrivate *priv) +{ + priv->pkanchors_button = WID (priv->builder, "pkanchors_button"); + g_assert (priv->pkanchors_button != NULL); + + g_signal_connect (priv->pkanchors_button, "clicked", + G_CALLBACK (cc_ka_panel_browse_pkanchors), priv); + +} + + +static void +cc_ka_panel_forwardable_toggled (GtkToggleButton *toggle, + CcKaPanelPrivate *priv) +{ + gboolean forwardable; + + forwardable = gtk_toggle_button_get_active (toggle); + + gconf_client_set_bool (priv->client, KA_GCONF_KEY_FORWARDABLE, forwardable, NULL); +} + + +static void +cc_ka_panel_forwardable_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + CcKaPanelPrivate *priv) +{ + gboolean forwardable; + + if (!entry->value || entry->value->type != GCONF_VALUE_BOOL) + return; + + forwardable = gconf_value_get_bool (entry->value) != FALSE; + + if (forwardable != gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->forwardable_toggle))) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->forwardable_toggle), forwardable); +} + + +static gboolean +cc_ka_panel_setup_forwardable_toggle (CcKaPanelPrivate *priv) +{ + gboolean forwardable; + + priv->forwardable_toggle = WID (priv->builder, "forwardable_toggle"); + g_assert (priv->forwardable_toggle != NULL); + + forwardable = gconf_client_get_bool (priv->client, KA_GCONF_KEY_FORWARDABLE, NULL); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->forwardable_toggle), forwardable); + + g_signal_connect (priv->forwardable_toggle, "toggled", + G_CALLBACK (cc_ka_panel_forwardable_toggled), priv); + + if (!gconf_client_key_is_writable (priv->client, KA_GCONF_KEY_FORWARDABLE, NULL)) { + gtk_widget_set_sensitive (priv->forwardable_toggle, FALSE); + } + + priv->listeners [priv->n_listeners] = + gconf_client_notify_add (priv->client, + KA_GCONF_KEY_FORWARDABLE, + (GConfClientNotifyFunc) cc_ka_panel_forwardable_notify, + priv, NULL, NULL); + priv->n_listeners++; + return forwardable; +} + + +static void +cc_ka_panel_proxiable_toggled (GtkToggleButton *toggle, + CcKaPanelPrivate *priv) +{ + gboolean proxiable; + + proxiable = gtk_toggle_button_get_active (toggle); + + gconf_client_set_bool (priv->client, KA_GCONF_KEY_PROXIABLE, proxiable, NULL); +} + + +static void +cc_ka_panel_proxiable_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + CcKaPanelPrivate *priv) +{ + gboolean proxiable; + + if (!entry->value || entry->value->type != GCONF_VALUE_BOOL) + return; + + proxiable = gconf_value_get_bool (entry->value) != FALSE; + + if (proxiable != gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->proxiable_toggle))) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->proxiable_toggle), proxiable); +} + + +static gboolean +cc_ka_panel_setup_proxiable_toggle (CcKaPanelPrivate *priv) +{ + gboolean proxiable; + + priv->proxiable_toggle = WID (priv->builder, "proxiable_toggle"); + g_assert (priv->proxiable_toggle != NULL); + + proxiable = gconf_client_get_bool (priv->client, KA_GCONF_KEY_PROXIABLE, NULL); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->proxiable_toggle), proxiable); + + g_signal_connect (priv->proxiable_toggle, "toggled", + G_CALLBACK (cc_ka_panel_proxiable_toggled), priv); + + if (!gconf_client_key_is_writable (priv->client, KA_GCONF_KEY_PROXIABLE, NULL)) { + gtk_widget_set_sensitive (priv->proxiable_toggle, FALSE); + } + + priv->listeners [priv->n_listeners] = + gconf_client_notify_add (priv->client, + KA_GCONF_KEY_PROXIABLE, + (GConfClientNotifyFunc) cc_ka_panel_proxiable_notify, + priv, NULL, NULL); + priv->n_listeners++; + return proxiable; +} + + +static void +cc_ka_panel_renewable_toggled (GtkToggleButton *toggle, + CcKaPanelPrivate *priv) +{ + gboolean renewable; + + renewable = gtk_toggle_button_get_active (toggle); + + gconf_client_set_bool (priv->client, KA_GCONF_KEY_RENEWABLE, renewable, NULL); +} + + +static void +cc_ka_panel_renewable_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + CcKaPanelPrivate *priv) +{ + gboolean renewable; + + if (!entry->value || entry->value->type != GCONF_VALUE_BOOL) + return; + + renewable = gconf_value_get_bool (entry->value) != FALSE; + + if (renewable != gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->renewable_toggle))) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->renewable_toggle), renewable); +} + + +static gboolean +cc_ka_panel_setup_renewable_toggle (CcKaPanelPrivate *priv) +{ + gboolean renewable; + + priv->renewable_toggle = WID (priv->builder, "renewable_toggle"); + g_assert (priv->renewable_toggle != NULL); + + renewable = gconf_client_get_bool (priv->client, KA_GCONF_KEY_RENEWABLE, NULL); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->renewable_toggle), renewable); + + g_signal_connect (priv->renewable_toggle, "toggled", + G_CALLBACK (cc_ka_panel_renewable_toggled), priv); + + if (!gconf_client_key_is_writable (priv->client, KA_GCONF_KEY_RENEWABLE, NULL)) { + gtk_widget_set_sensitive (priv->renewable_toggle, FALSE); + } + + priv->listeners [priv->n_listeners] = + gconf_client_notify_add (priv->client, + KA_GCONF_KEY_RENEWABLE, + (GConfClientNotifyFunc) cc_ka_panel_renewable_notify, + priv, NULL, NULL); + priv->n_listeners++; + return renewable; +} + + +static void +cc_ka_panel_prompt_mins_changed (GtkSpinButton *button, + CcKaPanelPrivate *priv) +{ + gint prompt_mins; + + prompt_mins = gtk_spin_button_get_value_as_int (button); + gconf_client_set_int (priv->client, KA_GCONF_KEY_PROMPT_MINS, prompt_mins, NULL); +} + + +static void +cc_ka_panel_prompt_mins_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + CcKaPanelPrivate *priv) +{ + gint prompt_mins; + + if (!entry->value || entry->value->type != GCONF_VALUE_INT) + return; + + prompt_mins = gconf_value_get_int (entry->value); + + if (prompt_mins != gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (priv->prompt_mins_entry))) + gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->prompt_mins_entry), prompt_mins); +} + + +static gint +cc_ka_panel_setup_prompt_mins_entry (CcKaPanelPrivate *priv) +{ + gint prompt_mins; + + priv->prompt_mins_entry = WID (priv->builder, "prompt_mins_entry"); + g_assert (priv->prompt_mins_entry != NULL); + + prompt_mins = gconf_client_get_int (priv->client, KA_GCONF_KEY_PROMPT_MINS, NULL); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->prompt_mins_entry), prompt_mins); + + g_signal_connect (priv->prompt_mins_entry, "value-changed", + G_CALLBACK (cc_ka_panel_prompt_mins_changed), priv); + + if (!gconf_client_key_is_writable (priv->client, KA_GCONF_KEY_PROMPT_MINS, NULL)) { + gtk_widget_set_sensitive (priv->prompt_mins_entry, FALSE); + } + + priv->listeners [priv->n_listeners] = + gconf_client_notify_add (priv->client, + KA_GCONF_KEY_PROMPT_MINS, + (GConfClientNotifyFunc) cc_ka_panel_prompt_mins_notify, + priv, NULL, NULL); + priv->n_listeners++; + return prompt_mins; +} + +static void +cc_ka_panel_get_property (GObject *self, + guint property_id, + GValue *value G_GNUC_UNUSED, + GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (self, property_id, pspec); + } +} + +static void +cc_ka_panel_set_property (GObject *self, + guint property_id, + const GValue *value G_GNUC_UNUSED, + GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (self, property_id, pspec); + } +} + +static void +cc_ka_panel_dispose (GObject *self) +{ + CcKaPanelPrivate *priv = GET_PRIVATE (self); + + if (priv->builder != NULL) { + g_object_unref (priv->builder); + priv->builder = NULL; + } + G_OBJECT_CLASS (cc_ka_panel_parent_class)->dispose (self); +} + +static void +cc_ka_panel_finalize (GObject *self) +{ + CcKaPanelPrivate *priv = GET_PRIVATE (self); + + if (priv->client) { + int i; + + for (i = 0; i < priv->n_listeners; i++) { + if (priv->listeners [i]) + gconf_client_notify_remove (priv->client, priv->listeners [i]); + priv->listeners [i] = 0; + } + priv->n_listeners = 0; + + gconf_client_remove_dir (priv->client, KA_GCONF_PATH, NULL); + + g_object_unref (priv->client); + priv->client = NULL; + } + + G_OBJECT_CLASS (cc_ka_panel_parent_class)->finalize (self); +} + +static void +cc_ka_panel_class_init (CcKaPanelClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (CcKaPanelPrivate)); + + object_class->get_property = cc_ka_panel_get_property; + object_class->set_property = cc_ka_panel_set_property; + object_class->dispose = cc_ka_panel_dispose; + object_class->finalize = cc_ka_panel_finalize; +} + +static void +cc_ka_panel_class_finalize (CcKaPanelClass *klass G_GNUC_UNUSED) +{ +} + +static void +cc_ka_panel_init (CcKaPanel *self) +{ + GError *error = NULL; + + CcKaPanelPrivate *priv = GET_PRIVATE (self); + + priv->builder = gtk_builder_new (); + gtk_builder_add_from_file(priv->builder, KA_DATA_DIR G_DIR_SEPARATOR_S + "ka-panel.ui", &error); + if (error != NULL) { + g_warning ("Could not load interface file: %s", error->message); + g_error_free (error); + return; + + } + priv->client = gconf_client_get_default (); + gconf_client_add_dir (priv->client, KA_GCONF_PATH, + GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); + + cc_ka_panel_setup_principal_entry (priv); + cc_ka_panel_setup_pkuserid_entry (priv); + cc_ka_panel_setup_pkuserid_button (priv); + cc_ka_panel_setup_smartcard_toggle (priv); + cc_ka_panel_setup_pkanchors_entry(priv); + cc_ka_panel_setup_pkanchors_button (priv); + cc_ka_panel_setup_forwardable_toggle (priv); + cc_ka_panel_setup_proxiable_toggle (priv); + cc_ka_panel_setup_renewable_toggle (priv); + cc_ka_panel_setup_prompt_mins_entry (priv); + + g_assert (priv->n_listeners == N_LISTENERS); + + priv->notebook = WID (priv->builder, "ka_notebook"); + gtk_widget_reparent (priv->notebook, (GtkWidget *) self); + + gtk_widget_show (priv->notebook); +} + +void +cc_ka_panel_register (GIOModule *module) +{ + cc_ka_panel_register_type (G_TYPE_MODULE (module)); + g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT, + CC_TYPE_KA_PANEL, + "ka-panel", 0); +} + +/* + * vim:ts:sts=4:sw=4:et: + */ diff --git a/cc-panel/cc-ka-panel.h b/cc-panel/cc-ka-panel.h new file mode 100644 index 0000000..d8fdda0 --- /dev/null +++ b/cc-panel/cc-ka-panel.h @@ -0,0 +1,45 @@ +/* cc-ka-panel.h */ + +#ifndef _CC_KA_PANEL +#define _CC_KA_PANEL + +#include + +G_BEGIN_DECLS + +#define CC_TYPE_KA_PANEL cc_ka_panel_get_type() + +#define CC_KA_PANEL(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj),CC_TYPE_KA_PANEL, CcKaPanel)) + +#define CC_KA_PANEL_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), CC_TYPE_KA_PANEL, CcKaPanelClass)) + +#define CC_IS_KA_PANEL(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CC_TYPE_KA_PANEL)) + +#define CC_IS_KA_PANEL_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), CC_TYPE_KA_PANEL)) + +#define CC_KA_PANEL_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), CC_TYPE_KA_PANEL, CcKaPanelClass)) + +typedef struct { + CcPanel parent; +} CcKaPanel; + +typedef struct { + CcPanelClass parent_class; +} CcKaPanelClass; + +GType cc_ka_panel_get_type (void) G_GNUC_CONST; + +void cc_ka_panel_register (GIOModule *module); + +G_END_DECLS + +#endif /* _CC_KA_PANEL */ + +/* + * vim:ts:sts=4:sw=4:et: + */ diff --git a/cc-panel/gnome-ka-panel.desktop.in b/cc-panel/gnome-ka-panel.desktop.in new file mode 100644 index 0000000..f7105c5 --- /dev/null +++ b/cc-panel/gnome-ka-panel.desktop.in @@ -0,0 +1,17 @@ +[Desktop Entry] +_Name=Kerberos Authentication +_Comment=Set your Kerberos network authentication preferences +Exec=gnome-ka-properties +Icon=krb-valid-ticket +Terminal=false +Type=Application +StartupNotify=true +# The X-GNOME-Settings-Panel is necessary to show in the main shell UI +Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel; +OnlyShowIn=GNOME; +X-GNOME-Settings-Panel=ka-panel +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=krb5-auth-dialog +X-GNOME-Bugzilla-Component=general +# Translators: those are keywords for the example control-center panel +_X-GNOME-Keywords=Kerberos;Authentication diff --git a/cc-panel/ka-module.c b/cc-panel/ka-module.c new file mode 100644 index 0000000..17ab5bd --- /dev/null +++ b/cc-panel/ka-module.c @@ -0,0 +1,20 @@ +#include + +#include "cc-ka-panel.h" + +#include + +void +g_io_module_load (GIOModule *module) +{ + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + + /* register the panel */ + cc_ka_panel_register (module); +} + +void +g_io_module_unload (GIOModule *module G_GNUC_UNUSED) +{ +} diff --git a/cc-panel/ka-panel.ui b/cc-panel/ka-panel.ui new file mode 100644 index 0000000..0081a40 --- /dev/null +++ b/cc-panel/ka-panel.ui @@ -0,0 +1,579 @@ + + + + + + + + True + True + + + True + 12 + vertical + 18 + + + True + vertical + 12 + + + True + 0 + Kerberos User + + + + + + False + False + 0 + + + + + True + 12 + + + True + 0 + krb-valid-ticket + 6 + + + False + False + 0 + + + + + True + vertical + 6 + + + True + 0 + none + + + True + 12 + + + True + True + + True + + + + + + + True + Kerberos principal: + True + + + + + 0 + + + + + True + 0 + none + + + True + 12 + + + True + vertical + + + True + 0 + none + + + True + 24 + + + True + vertical + + + Use Smartcard + True + True + False + If checked, use a security token (Smartcard) to authenticate. + True + + + 0 + + + + + True + + + True + True + Certificate and private key used for authentication + + True + + + 0 + + + + + _Browse... + True + True + True + True + + + False + 1 + + + + + 1 + + + + + + + + + True + Userid: + True + + + + + 0 + + + + + True + 0 + none + + + True + 24 + + + True + + + True + True + + True + + + 0 + + + + + _Browse... + True + True + True + True + + + False + 1 + + + + + + + + + True + X509 trust anchors: + True + + + + + 1 + + + + + + + + + True + PKINIT: + + + + + 1 + + + + + 1 + + + + + 1 + + + + + False + 0 + + + + + True + vertical + 12 + + + True + 0 + Ticket Options + + + + + + False + 0 + + + + + True + 12 + + + True + 0 + system-lock-screen + 6 + + + False + False + 0 + + + + + True + vertical + 6 + + + True + Requested Kerberos tickets should be: + + + False + False + 0 + + + + + True + + + True + + + + False + False + 0 + + + + + forwardable + True + True + False + If checked, request forwardable tickets + True + + + 1 + + + + + False + False + 1 + + + + + True + + + True + + + + False + False + 0 + + + + + renewable + True + True + False + If checked, request renewable tickets + True + + + False + False + 1 + + + + + 2 + + + + + True + + + True + + + + False + False + 0 + + + + + proxiable + True + True + False + If checked, request proxiable tickets + True + + + False + False + 1 + + + + + 3 + + + + + 1 + + + + + 1 + + + + + False + 1 + + + + + + + True + Kerberos + + + False + + + + + True + 12 + vertical + 18 + + + True + vertical + 12 + + + True + 0 + Notifications + + + + + + False + False + 0 + + + + + True + 12 + + + True + 0 + gtk-dialog-warning + 6 + + + False + False + 0 + + + + + True + 6 + + + True + + + + False + False + 0 + + + + + True + Warn + + + False + False + 1 + + + + + True + True + Send notification about ticket expiry that many minutes before it finally expires + + True + True + adjustment1 + + + False + False + 2 + + + + + True + minutes before expiry + + + False + False + 3 + + + + + False + 1 + + + + + False + 1 + + + + + False + 0 + + + + + 1 + + + + + True + Applet + + + 1 + False + + + + + + + 1000 + 1 + 10 + 10 + + -- cgit