diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-11-11 14:21:33 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-11-11 14:21:34 +0100 |
commit | 8bf9bdffccec6ed84c29df4a7f676ff938d9e08f (patch) | |
tree | 4ece9b7980512ad3eaf028e0373757cb3d264971 /src/ka-main-window.c | |
parent | Document changes and release 3.20.0-3 (diff) | |
parent | New upstream version 3.26.0 (diff) | |
download | krb5-auth-dialog-8bf9bdffccec6ed84c29df4a7f676ff938d9e08f.tar.gz krb5-auth-dialog-8bf9bdffccec6ed84c29df4a7f676ff938d9e08f.tar.bz2 krb5-auth-dialog-8bf9bdffccec6ed84c29df4a7f676ff938d9e08f.zip |
Update upstream source from tag 'upstream/3.26.0'
Update to upstream version '3.26.0'
with Debian dir a0dd8a8ec42bd8510e0a04a62426a1f4fd6076b4
Diffstat (limited to 'src/ka-main-window.c')
-rw-r--r-- | src/ka-main-window.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ka-main-window.c b/src/ka-main-window.c index 21b1dbc..1509b20 100644 --- a/src/ka-main-window.c +++ b/src/ka-main-window.c @@ -30,6 +30,7 @@ #include "ka-preferences.h" static GtkListStore *tickets; +static GtkButton *ticket_btn; static GtkApplicationWindow *main_window; static void @@ -44,6 +45,26 @@ ccache_changed_cb (KaApplet* applet, } +static void +enable_ticket_button_cb (gpointer* applet G_GNUC_UNUSED, + gchar *princ G_GNUC_UNUSED, + guint when G_GNUC_UNUSED, + gpointer user_data) +{ + gboolean enable = GPOINTER_TO_UINT(user_data); + KA_DEBUG ("Sensitive: %u", enable); + gtk_widget_set_sensitive(GTK_WIDGET(ticket_btn), enable); +} + + +static void +ticket_btn_clicked(GtkButton* btn G_GNUC_UNUSED, gpointer user_data) +{ + KaApplet *applet = KA_APPLET(user_data); + ka_grab_credentials (applet); +} + + GtkApplicationWindow * ka_main_window_create (KaApplet *applet) { @@ -117,6 +138,17 @@ ka_main_window_create (KaApplet *applet) G_CALLBACK(ccache_changed_cb), NULL); + ticket_btn = + GTK_BUTTON (gtk_builder_get_object (builder, "get_ticket_btn")); + g_signal_connect(ticket_btn, "clicked", G_CALLBACK(ticket_btn_clicked), applet); + + g_signal_connect (applet, "krb-tgt-acquired", + G_CALLBACK (enable_ticket_button_cb), + GUINT_TO_POINTER(FALSE)); + + g_signal_connect (applet, "krb-tgt-expired", + G_CALLBACK (enable_ticket_button_cb), + GUINT_TO_POINTER(TRUE)); g_object_unref (builder); return main_window; } |