From 61675c0b44f15c2f1760c7f192321e61f174daaa Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sat, 4 Apr 2009 15:00:44 +0200 Subject: Imported Upstream version 0.8+svn141 --- preferences/Makefile.am | 42 ++ preferences/krb5-auth-dialog-preferences.c | 627 +++++++++++++++++++++ .../krb5-auth-dialog-preferences.desktop.in | 12 + preferences/krb5-auth-dialog-preferences.glade | 573 +++++++++++++++++++ 4 files changed, 1254 insertions(+) create mode 100644 preferences/Makefile.am create mode 100644 preferences/krb5-auth-dialog-preferences.c create mode 100644 preferences/krb5-auth-dialog-preferences.desktop.in create mode 100644 preferences/krb5-auth-dialog-preferences.glade (limited to 'preferences') diff --git a/preferences/Makefile.am b/preferences/Makefile.am new file mode 100644 index 0000000..83541ea --- /dev/null +++ b/preferences/Makefile.am @@ -0,0 +1,42 @@ +NULL = + +INCLUDES = \ + -I $(top_srcdir)/src/ \ + -DKA_DATA_DIR=\""$(pkgdatadir)"\" \ + -DLOCALE_DIR=\""$(localedir)/"\" \ + $(NULL) + +bin_PROGRAMS = krb5-auth-dialog-preferences + +schemadir = $(sysconfdir)/gconf/schemas + +krb5_auth_dialog_preferences_SOURCES = \ + krb5-auth-dialog-preferences.c \ + ../src/krb5-auth-gconf-tools.c \ + ../src/krb5-auth-gconf-tools.h \ + $(NULL) + +krb5_auth_dialog_preferences_LDADD = \ + @GCONF_LIBS@ \ + @GLADE_LIBS@ \ + @GTK_LIBS@ \ + $(NULL) + +desktopdir = $(datadir)/applications +desktop_in_files = krb5-auth-dialog-preferences.desktop.in +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) + +@INTLTOOL_DESKTOP_RULE@ + +pkgdatadir = $(datadir)/krb5-auth-dialog +pkgdata_DATA = \ + krb5-auth-dialog-preferences.glade + +CLEANFILES = \ + $(desktop_DATA) \ + $(NULL) + +EXTRA_DIST = \ + $(desktop_in_files) \ + $(pkgdata_DATA) \ + $(NULL) diff --git a/preferences/krb5-auth-dialog-preferences.c b/preferences/krb5-auth-dialog-preferences.c new file mode 100644 index 0000000..caf9ed9 --- /dev/null +++ b/preferences/krb5-auth-dialog-preferences.c @@ -0,0 +1,627 @@ +/* + * Copyright (C) 2009 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. + * + * Author: + * Guido Guenther + * + * based on the vino capplet which is: + * + * Copyright (C) 2003 Sun Microsystems, Inc. + * Copyright (C) 2006 Jonh Wendell + * + * Authors: + * Mark McLoughlin + * Jonh Wendell + */ + +#include "config.h" + +#include +#include +#include + +#include "krb5-auth-gconf-tools.h" + +#define N_LISTENERS 7 + +typedef struct { + GladeXML *xml; + GConfClient *client; + + GtkWidget *dialog; + GtkWidget *principal_entry; + GtkWidget *pkuserid_entry; + GtkWidget *forwardable_toggle; + GtkWidget *proxiable_toggle; + GtkWidget *renewable_toggle; + GtkWidget *trayicon_toggle; + GtkWidget *prompt_mins_entry; + + guint listeners [N_LISTENERS]; + int n_listeners; +} KaPreferencesDialog; + + +static void +ka_preferences_principal_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + KaPreferencesDialog *dialog) +{ + 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 (dialog->principal_entry), ""); + else { + const char *old_principal; + + old_principal = gtk_entry_get_text (GTK_ENTRY (dialog->principal_entry)); + if (!old_principal || (old_principal && strcmp (old_principal, principal))) + gtk_entry_set_text (GTK_ENTRY (dialog->principal_entry), principal); + } +} + + +static void +ka_preferences_dialog_principal_changed (GtkEntry *entry, + KaPreferencesDialog *dialog) +{ + const char *principal; + + principal = gtk_entry_get_text (entry); + + if (!principal || !strlen(principal)) + gconf_client_unset (dialog->client, KA_GCONF_KEY_PRINCIPAL, NULL); + else + gconf_client_set_string (dialog->client, KA_GCONF_KEY_PRINCIPAL, principal, NULL); +} + + +static void +ka_preferences_dialog_setup_principal_entry (KaPreferencesDialog *dialog) +{ + char *principal = NULL; + + dialog->principal_entry = glade_xml_get_widget (dialog->xml, "principal_entry"); + g_assert (dialog->principal_entry != NULL); + + if (!ka_gconf_get_string (dialog->client, KA_GCONF_KEY_PRINCIPAL, &principal)) + g_warning ("Getting principal failed"); + + if (principal && strlen(principal)) + gtk_entry_set_text (GTK_ENTRY (dialog->principal_entry), principal); + if (principal) + g_free (principal); + + g_signal_connect (dialog->principal_entry, "changed", + G_CALLBACK (ka_preferences_dialog_principal_changed), dialog); + + if (!gconf_client_key_is_writable (dialog->client, KA_GCONF_KEY_PRINCIPAL, NULL)) { + gtk_widget_set_sensitive (dialog->principal_entry, FALSE); + } + + dialog->listeners [dialog->n_listeners] = gconf_client_notify_add (dialog->client, + KA_GCONF_KEY_PRINCIPAL, + (GConfClientNotifyFunc) ka_preferences_principal_notify, + dialog, NULL, NULL); + dialog->n_listeners++; +} + + +static void +ka_preferences_pkuserid_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + KaPreferencesDialog *dialog) +{ + 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 (dialog->pkuserid_entry), ""); + else { + const char *old_pkuserid; + + old_pkuserid = gtk_entry_get_text (GTK_ENTRY (dialog->pkuserid_entry)); + if (!old_pkuserid || (old_pkuserid && strcmp (old_pkuserid, pkuserid))) + gtk_entry_set_text (GTK_ENTRY (dialog->pkuserid_entry), pkuserid); + } +} + + +static void +ka_preferences_dialog_pkuserid_changed (GtkEntry *entry, + KaPreferencesDialog *dialog) +{ + const char *pkuserid; + + pkuserid = gtk_entry_get_text (entry); + + if (!pkuserid || !strlen(pkuserid)) + gconf_client_unset (dialog->client, KA_GCONF_KEY_PK_USERID, NULL); + else + gconf_client_set_string (dialog->client, KA_GCONF_KEY_PK_USERID, pkuserid, NULL); +} + + +static void +ka_preferences_dialog_setup_pkuserid_entry (KaPreferencesDialog *dialog) +{ + char *pkuserid = NULL; + + dialog->pkuserid_entry = glade_xml_get_widget (dialog->xml, "pkuserid_entry"); + g_assert (dialog->pkuserid_entry != NULL); + + if (!ka_gconf_get_string (dialog->client, KA_GCONF_KEY_PK_USERID, &pkuserid)) + g_warning ("Getting pkuserid failed"); + + if (pkuserid && strlen(pkuserid)) + gtk_entry_set_text (GTK_ENTRY (dialog->pkuserid_entry), pkuserid); + if (pkuserid) + g_free (pkuserid); + + g_signal_connect (dialog->pkuserid_entry, "changed", + G_CALLBACK (ka_preferences_dialog_pkuserid_changed), dialog); + if (!gconf_client_key_is_writable (dialog->client, KA_GCONF_KEY_PK_USERID, NULL)) { + gtk_widget_set_sensitive (dialog->pkuserid_entry, FALSE); + } + + dialog->listeners [dialog->n_listeners] = gconf_client_notify_add (dialog->client, + KA_GCONF_KEY_PK_USERID, + (GConfClientNotifyFunc) ka_preferences_pkuserid_notify, + dialog, NULL, NULL); + dialog->n_listeners++; +} + + +static void +ka_preferences_dialog_forwardable_toggled (GtkToggleButton *toggle, + KaPreferencesDialog *dialog) +{ + gboolean forwardable; + + forwardable = gtk_toggle_button_get_active (toggle); + + gconf_client_set_bool (dialog->client, KA_GCONF_KEY_FORWARDABLE, forwardable, NULL); +} + + +static void +ka_preferences_dialog_forwardable_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + KaPreferencesDialog *dialog) +{ + 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 (dialog->forwardable_toggle))) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->forwardable_toggle), forwardable); +} + + +static gboolean +ka_preferences_dialog_setup_forwardable_toggle (KaPreferencesDialog *dialog) +{ + gboolean forwardable; + + dialog->forwardable_toggle = glade_xml_get_widget (dialog->xml, "forwardable_toggle"); + g_assert (dialog->forwardable_toggle != NULL); + + forwardable = gconf_client_get_bool (dialog->client, KA_GCONF_KEY_FORWARDABLE, NULL); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->forwardable_toggle), forwardable); + + g_signal_connect (dialog->forwardable_toggle, "toggled", + G_CALLBACK (ka_preferences_dialog_forwardable_toggled), dialog); + + if (!gconf_client_key_is_writable (dialog->client, KA_GCONF_KEY_FORWARDABLE, NULL)) { + gtk_widget_set_sensitive (dialog->forwardable_toggle, FALSE); + } + + dialog->listeners [dialog->n_listeners] = gconf_client_notify_add (dialog->client, + KA_GCONF_KEY_FORWARDABLE, + (GConfClientNotifyFunc) ka_preferences_dialog_forwardable_notify, + dialog, NULL, NULL); + dialog->n_listeners++; + return forwardable; +} + + +static void +ka_preferences_dialog_proxiable_toggled (GtkToggleButton *toggle, + KaPreferencesDialog *dialog) +{ + gboolean proxiable; + + proxiable = gtk_toggle_button_get_active (toggle); + + gconf_client_set_bool (dialog->client, KA_GCONF_KEY_PROXIABLE, proxiable, NULL); +} + + +static void +ka_preferences_dialog_proxiable_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + KaPreferencesDialog *dialog) +{ + 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 (dialog->proxiable_toggle))) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->proxiable_toggle), proxiable); +} + + +static gboolean +ka_preferences_dialog_setup_proxiable_toggle (KaPreferencesDialog *dialog) +{ + gboolean proxiable; + + dialog->proxiable_toggle = glade_xml_get_widget (dialog->xml, "proxiable_toggle"); + g_assert (dialog->proxiable_toggle != NULL); + + proxiable = gconf_client_get_bool (dialog->client, KA_GCONF_KEY_PROXIABLE, NULL); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->proxiable_toggle), proxiable); + + g_signal_connect (dialog->proxiable_toggle, "toggled", + G_CALLBACK (ka_preferences_dialog_proxiable_toggled), dialog); + + if (!gconf_client_key_is_writable (dialog->client, KA_GCONF_KEY_PROXIABLE, NULL)) { + gtk_widget_set_sensitive (dialog->proxiable_toggle, FALSE); + } + + dialog->listeners [dialog->n_listeners] = gconf_client_notify_add (dialog->client, + KA_GCONF_KEY_PROXIABLE, + (GConfClientNotifyFunc) ka_preferences_dialog_proxiable_notify, + dialog, NULL, NULL); + dialog->n_listeners++; + return proxiable; +} + + +static void +ka_preferences_dialog_renewable_toggled (GtkToggleButton *toggle, + KaPreferencesDialog *dialog) +{ + gboolean renewable; + + renewable = gtk_toggle_button_get_active (toggle); + + gconf_client_set_bool (dialog->client, KA_GCONF_KEY_RENEWABLE, renewable, NULL); +} + + +static void +ka_preferences_dialog_renewable_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + KaPreferencesDialog *dialog) +{ + 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 (dialog->renewable_toggle))) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->renewable_toggle), renewable); +} + + +static gboolean +ka_preferences_dialog_setup_renewable_toggle (KaPreferencesDialog *dialog) +{ + gboolean renewable; + + dialog->renewable_toggle = glade_xml_get_widget (dialog->xml, "renewable_toggle"); + g_assert (dialog->renewable_toggle != NULL); + + renewable = gconf_client_get_bool (dialog->client, KA_GCONF_KEY_RENEWABLE, NULL); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->renewable_toggle), renewable); + + g_signal_connect (dialog->renewable_toggle, "toggled", + G_CALLBACK (ka_preferences_dialog_renewable_toggled), dialog); + + if (!gconf_client_key_is_writable (dialog->client, KA_GCONF_KEY_RENEWABLE, NULL)) { + gtk_widget_set_sensitive (dialog->renewable_toggle, FALSE); + } + + dialog->listeners [dialog->n_listeners] = gconf_client_notify_add (dialog->client, + KA_GCONF_KEY_RENEWABLE, + (GConfClientNotifyFunc) ka_preferences_dialog_renewable_notify, + dialog, NULL, NULL); + dialog->n_listeners++; + return renewable; +} + +static void +ka_preferences_dialog_trayicon_toggled (GtkToggleButton *toggle, + KaPreferencesDialog *dialog) +{ + gboolean trayicon; + + trayicon = gtk_toggle_button_get_active (toggle); + gconf_client_set_bool (dialog->client, KA_GCONF_KEY_SHOW_TRAYICON, trayicon, NULL); +} + + +static void +ka_preferences_dialog_trayicon_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + KaPreferencesDialog *dialog) +{ + gboolean trayicon; + + if (!entry->value || entry->value->type != GCONF_VALUE_BOOL) + return; + + trayicon = gconf_value_get_bool (entry->value) != FALSE; + + if (trayicon != gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->trayicon_toggle))) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->trayicon_toggle), trayicon); +} + + +static gboolean +ka_preferences_dialog_setup_trayicon_toggle (KaPreferencesDialog *dialog) +{ + gboolean trayicon; + + dialog->trayicon_toggle = glade_xml_get_widget (dialog->xml, "trayicon_toggle"); + g_assert (dialog->trayicon_toggle != NULL); + + trayicon = gconf_client_get_bool (dialog->client, KA_GCONF_KEY_SHOW_TRAYICON, NULL); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->trayicon_toggle), trayicon); + + g_signal_connect (dialog->trayicon_toggle, "toggled", + G_CALLBACK (ka_preferences_dialog_trayicon_toggled), dialog); + + if (!gconf_client_key_is_writable (dialog->client, KA_GCONF_KEY_SHOW_TRAYICON, NULL)) { + gtk_widget_set_sensitive (dialog->trayicon_toggle, FALSE); + } + + dialog->listeners [dialog->n_listeners] = gconf_client_notify_add (dialog->client, + KA_GCONF_KEY_SHOW_TRAYICON, + (GConfClientNotifyFunc) ka_preferences_dialog_trayicon_notify, + dialog, NULL, NULL); + dialog->n_listeners++; + return trayicon; +} + + +static void +ka_preferences_dialog_prompt_mins_changed (GtkSpinButton *button, + KaPreferencesDialog *dialog) +{ + gint prompt_mins; + + prompt_mins = gtk_spin_button_get_value_as_int (button); + gconf_client_set_int (dialog->client, KA_GCONF_KEY_PROMPT_MINS, prompt_mins, NULL); +} + + +static void +ka_preferences_dialog_prompt_mins_notify (GConfClient *client G_GNUC_UNUSED, + guint cnx_id G_GNUC_UNUSED, + GConfEntry *entry, + KaPreferencesDialog *dialog) +{ + 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 (dialog->prompt_mins_entry))) + gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->prompt_mins_entry), prompt_mins); +} + + +static gint +ka_preferences_dialog_setup_prompt_mins_entry (KaPreferencesDialog *dialog) +{ + gint prompt_mins; + + dialog->prompt_mins_entry = glade_xml_get_widget (dialog->xml, "prompt_mins_entry"); + g_assert (dialog->prompt_mins_entry != NULL); + + prompt_mins = gconf_client_get_int (dialog->client, KA_GCONF_KEY_PROMPT_MINS, NULL); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->prompt_mins_entry), prompt_mins); + + g_signal_connect (dialog->prompt_mins_entry, "value-changed", + G_CALLBACK (ka_preferences_dialog_prompt_mins_changed), dialog); + + if (!gconf_client_key_is_writable (dialog->client, KA_GCONF_KEY_PROMPT_MINS, NULL)) { + gtk_widget_set_sensitive (dialog->prompt_mins_entry, FALSE); + } + + dialog->listeners [dialog->n_listeners] = gconf_client_notify_add (dialog->client, + KA_GCONF_KEY_PROMPT_MINS, + (GConfClientNotifyFunc) ka_preferences_dialog_prompt_mins_notify, + dialog, NULL, NULL); + dialog->n_listeners++; + return prompt_mins; +} + + + +static void +ka_preferences_dialog_response (GtkWidget *widget, + int response, + KaPreferencesDialog *dialog) +{ + GError *error = NULL; + + if (response != GTK_RESPONSE_HELP) { + gtk_widget_destroy (widget); + return; + } + + gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (dialog->dialog)), + "ghelp:krb5-auth-dialog#preferences", + gtk_get_current_event_time (), &error); + + if (error) { + GtkWidget *message_dialog; + + + message_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog->dialog), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + _("There was an error displaying help:\n%s"), + error->message); + gtk_window_set_resizable (GTK_WINDOW (message_dialog), FALSE); + + g_signal_connect (message_dialog, "response", + G_CALLBACK (gtk_widget_destroy), + NULL); + + gtk_widget_show (message_dialog); + g_error_free (error); + } +} + + +static void +ka_preferences_dialog_destroyed (GtkWidget *widget G_GNUC_UNUSED, + KaPreferencesDialog *dialog) +{ + dialog->dialog = NULL; + + gtk_main_quit (); +} + + +static gboolean +ka_preferences_dialog_init(KaPreferencesDialog* dialog) +{ + dialog->xml = glade_xml_new (KA_DATA_DIR G_DIR_SEPARATOR_S + PACKAGE "-preferences.glade", NULL, NULL); + + dialog->dialog = glade_xml_get_widget (dialog->xml, "krb5_auth_dialog_prefs"); + g_assert (dialog->dialog); + + g_signal_connect (dialog->dialog, "response", + G_CALLBACK (ka_preferences_dialog_response), dialog); + g_signal_connect (dialog->dialog, "destroy", + G_CALLBACK (ka_preferences_dialog_destroyed), dialog); + + dialog->client = gconf_client_get_default (); + gconf_client_add_dir (dialog->client, KA_GCONF_PATH, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); + + ka_preferences_dialog_setup_principal_entry (dialog); + ka_preferences_dialog_setup_pkuserid_entry (dialog); + ka_preferences_dialog_setup_forwardable_toggle (dialog); + ka_preferences_dialog_setup_proxiable_toggle (dialog); + ka_preferences_dialog_setup_renewable_toggle (dialog); + ka_preferences_dialog_setup_trayicon_toggle (dialog); + ka_preferences_dialog_setup_prompt_mins_entry (dialog); + + g_assert (dialog->n_listeners == N_LISTENERS); + + gtk_widget_show (dialog->dialog); + return TRUE; +} + + +static void +ka_preferences_dialog_finalize (KaPreferencesDialog *dialog) +{ + if (dialog->dialog) + gtk_widget_destroy (dialog->dialog); + dialog->dialog = NULL; + + if (dialog->client) { + int i; + + for (i = 0; i < dialog->n_listeners; i++) { + if (dialog->listeners [i]) + gconf_client_notify_remove (dialog->client, dialog->listeners [i]); + dialog->listeners [i] = 0; + } + dialog->n_listeners = 0; + + gconf_client_remove_dir (dialog->client, KA_GCONF_PATH, NULL); + + g_object_unref (dialog->client); + dialog->client = NULL; + } + + if (dialog->xml) + g_object_unref (dialog->xml); + dialog->xml = NULL; +} + +int +main (int argc, char *argv[]) +{ + GOptionContext *context; + GError *error = NULL; + KaPreferencesDialog dialog = { NULL, }; + + const char *help_msg = "Run '" PACKAGE " --help' to see a full list of available command line options"; + const GOptionEntry options [] = { + { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } + }; + + context = g_option_context_new ("- Kerberos Authentication Configuration"); + g_option_context_add_main_entries (context, options, NULL); + g_option_context_add_group (context, gtk_get_option_group (TRUE)); + g_option_context_parse (context, &argc, &argv, &error); + if (error) { + g_print ("%s\n%s\n", + error->message, + help_msg); + g_error_free (error); + return 1; + } + textdomain (PACKAGE); + bind_textdomain_codeset (PACKAGE, "UTF-8"); + bindtextdomain (PACKAGE, LOCALE_DIR); + + ka_preferences_dialog_init(&dialog); + gtk_main (); + ka_preferences_dialog_finalize(&dialog); + return 0; +} diff --git a/preferences/krb5-auth-dialog-preferences.desktop.in b/preferences/krb5-auth-dialog-preferences.desktop.in new file mode 100644 index 0000000..d87e1e7 --- /dev/null +++ b/preferences/krb5-auth-dialog-preferences.desktop.in @@ -0,0 +1,12 @@ +[Desktop Entry] +_Name=Network Authentication +_Comment=Set your Kerberos network authenticaion preferences +Exec=krb5-auth-dialog-preferences +Icon=gtk-dialog-authentication +Terminal=false +Type=Application +StartupNotify=true +Categories=GNOME;GTK;Settings;X-GNOME-NetworkSettings; +OnlyShowIn=GNOME; +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=krb5-auth-dialog diff --git a/preferences/krb5-auth-dialog-preferences.glade b/preferences/krb5-auth-dialog-preferences.glade new file mode 100644 index 0000000..b4e5cd5 --- /dev/null +++ b/preferences/krb5-auth-dialog-preferences.glade @@ -0,0 +1,573 @@ + + + + + + 5 + Kerberos Authentication Configuration + GTK_WIN_POS_CENTER_ON_PARENT + gtk-dialog-authentication + GDK_WINDOW_TYPE_HINT_DIALOG + False + + + True + 2 + + + True + True + + + True + 12 + 18 + + + True + 12 + + + True + 0 + <b>Kerberos User</b> + True + + + False + False + + + + + True + 12 + + + True + 0 + 6 + gtk-dialog-authentication + + + False + False + + + + + True + 6 + + + True + 0 + Kerberos principal: + + + False + False + + + + + True + 6 + + + True + + + + False + False + + + + + True + True + + + 1 + + + + + 1 + + + + + True + 0 + PKINIT userid: + + + False + False + 2 + + + + + True + 6 + + + True + + + + False + False + + + + + True + True + The principal's public/private/certificate identifier. Leave empty if not using PKINIT. + + + 1 + + + + + 3 + + + + + 1 + + + + + 1 + + + + + False + + + + + True + 12 + + + True + 0 + <b>Ticket Options</b> + True + + + False + + + + + True + 12 + + + True + 0 + 6 + system-lock-screen + + + False + False + + + + + True + 6 + + + True + Requested Kerberos tickets should be: + + + False + False + + + + + True + + + True + + + + False + False + + + + + True + True + If checked, request forwardable tickets + forwardable + 0 + True + + + 1 + + + + + False + False + 1 + + + + + True + + + True + + + + False + False + + + + + True + True + If checked, request renewable tickets + renewable + 0 + True + + + False + False + 1 + + + + + 2 + + + + + True + + + True + + + + False + False + + + + + True + True + If checked, request proxiable tickets + proxiable + 0 + True + + + False + False + 1 + + + + + 3 + + + + + 1 + + + + + 1 + + + + + False + 1 + + + + + + + True + Kerberos + + + tab + False + + + + + True + 12 + 18 + + + True + 12 + + + True + 0 + <b>Notifications</b> + True + + + False + False + + + + + True + 12 + + + True + 0 + gtk-dialog-warning + 6 + + + False + False + + + + + True + 6 + + + True + + + + False + False + + + + + True + Warn + + + False + False + 1 + + + + + True + True + Send notification about ticket expiry that many minutes before it finally expires. + 0 0 100 1 10 10 + + + False + False + 2 + + + + + True + minutes before expiry + + + False + False + 3 + + + + + False + 1 + + + + + False + 1 + + + + + False + + + + + True + 12 + + + True + 0 + <b>Appearance</b> + True + + + False + False + + + + + True + 12 + + + True + 0 + 0 + gtk-zoom-in + 6 + + + False + False + + + + + True + + + True + 6 + + + True + + + + False + False + + + + + True + True + If checked, display the tray icon in the status bar. + Show tray icon + 0 + True + + + False + 1 + + + + + + + False + False + 1 + + + + + False + False + 1 + + + + + False + 1 + + + + + 1 + + + + + True + Applet + + + tab + 1 + False + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + gtk-help + True + -11 + + + + + True + True + True + gtk-close + True + 0 + + + 1 + + + + + False + GTK_PACK_END + + + + + + -- cgit