From 2a51379a21903f4df0b43d0c83b670b66fbc8e4a Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 24 Feb 2011 20:00:30 +0100 Subject: New upstream version 2.91.90 --- src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/ka-applet.c | 36 +++++--- src/ka-dialog.c | 20 +++-- src/krb5-auth-dialog.ui | 216 +++++++++++++++++++++++++++++++++++++++++++++++ src/krb5-auth-dialog.xml | 216 ----------------------------------------------- 6 files changed, 255 insertions(+), 237 deletions(-) create mode 100644 src/krb5-auth-dialog.ui delete mode 100644 src/krb5-auth-dialog.xml (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 1c89d31..fb64219 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -105,7 +105,7 @@ AM_CPPFLAGS = \ pkgdatadir = $(datadir)/krb5-auth-dialog pkgdata_DATA = \ - krb5-auth-dialog.xml \ + krb5-auth-dialog.ui \ $(NULL) EXTRA_DIST = \ diff --git a/src/Makefile.in b/src/Makefile.in index 612e7c4..12cb8fa 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -409,7 +409,7 @@ AM_CPPFLAGS = \ $(NULL) pkgdata_DATA = \ - krb5-auth-dialog.xml \ + krb5-auth-dialog.ui \ $(NULL) EXTRA_DIST = \ diff --git a/src/ka-applet.c b/src/ka-applet.c index b2b2823..7de9204 100644 --- a/src/ka-applet.c +++ b/src/ka-applet.c @@ -950,21 +950,31 @@ ka_ns_check_persistence (KaApplet *self) { GList *caps; GList *l; + gboolean is_autostart = g_getenv("DESKTOP_AUTOSTART_ID") ? TRUE : FALSE; + gint seconds = 5; self->priv->ns_persistence = FALSE; - caps = notify_get_server_caps (); - if (caps == NULL) { + do { + caps = notify_get_server_caps (); + if (caps == NULL) g_warning ("Failed to read server caps"); - return; - } - - l = g_list_find_custom (caps, "persistence", (GCompareFunc)strcmp); - if (l != NULL) { - self->priv->ns_persistence = TRUE; - KA_DEBUG ("Notification server supports persistence."); - } - g_list_foreach (caps, (GFunc) g_free, NULL); - g_list_free (caps); + else { + l = g_list_find_custom (caps, "persistence", (GCompareFunc)strcmp); + if (l != NULL) { + self->priv->ns_persistence = TRUE; + KA_DEBUG ("Notification server supports persistence."); + } + g_list_foreach (caps, (GFunc) g_free, NULL); + g_list_free (caps); + } + /* During session start we have to wait until the shell is fully up + * to reliably detect the persistence property (#642666) */ + if (is_autostart && !self->priv->ns_persistence) { + sleep(1); + seconds--; + } else + break; + } while (seconds); } @@ -989,7 +999,7 @@ ka_applet_create () applet->priv->uixml = gtk_builder_new (); ret = gtk_builder_add_from_file (applet->priv->uixml, KA_DATA_DIR G_DIR_SEPARATOR_S - PACKAGE ".xml", &error); + PACKAGE ".ui", &error); if (!ret) { g_assert (error); g_assert (error->message); diff --git a/src/ka-dialog.c b/src/ka-dialog.c index ce86367..3114f49 100644 --- a/src/ka-dialog.c +++ b/src/ka-dialog.c @@ -502,6 +502,15 @@ credentials_expiring (gpointer *data) } +/* run once, then terminate the timer */ +static gboolean +credentials_expiring_once (gpointer *data) +{ + credentials_expiring(data); + return FALSE; +} + + /* * set ticket options by looking at krb5.conf and gconf */ @@ -1056,9 +1065,10 @@ main (int argc, char *argv[]) const char *help_msg = "Run '" PACKAGE " --help' to see a full list of available command line options"; const GOptionEntry options [] = { {"auto", 'a', 0, G_OPTION_ARG_NONE, &run_auto, - "Only run if an initialized ccache is found (default)", NULL}, + "Only run if an initialized ccache is found", NULL}, + /* accepted for compatibility only */ {"always", 'A', 0, G_OPTION_ARG_NONE, &run_always, - "Always run", NULL}, + "Always run (default)", NULL}, { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } }; GFileMonitor *monitor = NULL; @@ -1085,10 +1095,7 @@ main (int argc, char *argv[]) if (!ka_dbus_connect (&status)) exit(status); - if (run_always && !run_auto) { - always_run = TRUE; - } - + always_run = !run_auto; if (using_krb5 () || always_run) { g_set_application_name (KA_NAME); @@ -1098,6 +1105,7 @@ main (int argc, char *argv[]) ka_nm_init(); g_timeout_add_seconds (CREDENTIAL_CHECK_INTERVAL, (GSourceFunc)credentials_expiring, applet); + g_idle_add ((GSourceFunc)credentials_expiring_once, applet); monitor = monitor_ccache (applet); ka_dbus_service(applet); diff --git a/src/krb5-auth-dialog.ui b/src/krb5-auth-dialog.ui new file mode 100644 index 0000000..f36f537 --- /dev/null +++ b/src/krb5-auth-dialog.ui @@ -0,0 +1,216 @@ + + + + + + 6 + Kerberos Authentication + False + center-always + dialog + + + True + + + True + 6 + 12 + + + True + 0 + krb-valid-ticket + 6 + + + False + 0 + + + + + True + 10 + + + True + 12 + + + True + + + True + 0 + True + + + False + False + 0 + + + + + 0 + + + + + True + 3 + + + True + 3 + + + + + + 0 + + + + + True + 1 + <span size="smaller"> </span> + True + + + False + False + 1 + + + + + 1 + + + + + + + 1 + + + + + 1 + + + + + True + end + + + gtk-cancel + True + True + True + False + True + + + False + False + 0 + + + + + _Renew Ticket + True + True + True + True + False + True + + + False + False + 1 + + + + + False + end + 0 + + + + + + cancelbutton1 + krb5_renew_button + + + + 5 + Service Tickets + False + normal + + + True + vertical + 2 + + + True + vertical + + + True + True + + + 0 + + + + + 1 + + + + + True + end + + + + + + gtk-close + True + True + True + True + + + False + False + 1 + + + + + False + end + 0 + + + + + + krb5_tickets_ok + + + diff --git a/src/krb5-auth-dialog.xml b/src/krb5-auth-dialog.xml deleted file mode 100644 index f36f537..0000000 --- a/src/krb5-auth-dialog.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - 6 - Kerberos Authentication - False - center-always - dialog - - - True - - - True - 6 - 12 - - - True - 0 - krb-valid-ticket - 6 - - - False - 0 - - - - - True - 10 - - - True - 12 - - - True - - - True - 0 - True - - - False - False - 0 - - - - - 0 - - - - - True - 3 - - - True - 3 - - - - - - 0 - - - - - True - 1 - <span size="smaller"> </span> - True - - - False - False - 1 - - - - - 1 - - - - - - - 1 - - - - - 1 - - - - - True - end - - - gtk-cancel - True - True - True - False - True - - - False - False - 0 - - - - - _Renew Ticket - True - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - cancelbutton1 - krb5_renew_button - - - - 5 - Service Tickets - False - normal - - - True - vertical - 2 - - - True - vertical - - - True - True - - - 0 - - - - - 1 - - - - - True - end - - - - - - gtk-close - True - True - True - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - krb5_tickets_ok - - - -- cgit