diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-03-09 10:55:05 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-03-09 10:55:05 +0100 |
commit | ca71a0f06e24fd58a18b76c9df01c85642f63bdb (patch) | |
tree | 8e661a1e15479d8b1eaa48691b566d3ef9859c5e /src/ka-applet.c | |
parent | New upstream version 2.91.90 (diff) | |
download | krb5-auth-dialog-ca71a0f06e24fd58a18b76c9df01c85642f63bdb.tar.gz krb5-auth-dialog-ca71a0f06e24fd58a18b76c9df01c85642f63bdb.tar.bz2 krb5-auth-dialog-ca71a0f06e24fd58a18b76c9df01c85642f63bdb.zip |
New upstream version 2.91.91
Diffstat (limited to 'src/ka-applet.c')
-rw-r--r-- | src/ka-applet.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/ka-applet.c b/src/ka-applet.c index 7de9204..2d4981e 100644 --- a/src/ka-applet.c +++ b/src/ka-applet.c @@ -51,6 +51,14 @@ enum { KA_PROP_TGT_RENEWABLE, }; + +const gchar *ka_signal_names[KA_SIGNAL_COUNT] = { + "krb-tgt-acquired", + "krb-tgt-renewed", + "krb-tgt-expired", +}; + + struct _KaApplet { GObject parent; @@ -252,12 +260,6 @@ ka_applet_class_init (KaAppletClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; - - const gchar *signalNames[KA_SIGNAL_COUNT] = { - "krb-tgt-acquired", - "krb-tgt-renewed", - "krb-tgt-expired" - }; int i; object_class->dispose = ka_applet_dispose; @@ -320,7 +322,7 @@ ka_applet_class_init (KaAppletClass *klass) for (i = 0; i < KA_SIGNAL_COUNT; i++) { guint signalId; - signalId = g_signal_new (signalNames[i], G_OBJECT_CLASS_TYPE (klass), + signalId = g_signal_new (ka_signal_names[i], G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, ka_closure_VOID__STRING_UINT, G_TYPE_NONE, 2, /* number of parameters */ @@ -707,8 +709,7 @@ ka_applet_cb_quit (GtkMenuItem *menuitem G_GNUC_UNUSED, gpointer user_data) { KaApplet *applet = KA_APPLET (user_data); - g_object_unref (applet); - gtk_main_quit (); + ka_applet_destroy (applet); } @@ -978,6 +979,15 @@ ka_ns_check_persistence (KaApplet *self) } +/* destroy the applet and quit */ +void +ka_applet_destroy (KaApplet* applet) +{ + g_object_unref (applet); + gtk_main_quit (); +} + + /* create the tray icon applet */ KaApplet * ka_applet_create () |