aboutsummaryrefslogtreecommitdiff
path: root/src/ka-applet.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-02-24 20:00:30 +0100
committerGuido Günther <agx@sigxcpu.org>2011-02-24 20:00:30 +0100
commit2a51379a21903f4df0b43d0c83b670b66fbc8e4a (patch)
treebdf4636fa16aa09de3b7ae565a410d49c0cf2d4c /src/ka-applet.c
parentNew upstream version 2.91.6 (diff)
downloadkrb5-auth-dialog-2a51379a21903f4df0b43d0c83b670b66fbc8e4a.tar.gz
krb5-auth-dialog-2a51379a21903f4df0b43d0c83b670b66fbc8e4a.tar.bz2
krb5-auth-dialog-2a51379a21903f4df0b43d0c83b670b66fbc8e4a.zip
New upstream version 2.91.90
Diffstat (limited to 'src/ka-applet.c')
-rw-r--r--src/ka-applet.c36
1 files changed, 23 insertions, 13 deletions
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);
bgstack15