[krb5-auth-dialog] check for errors when sending notifications



commit 920564fc9c42567e19b8cfa6d5a2cff271b95c6f
Author: Guido Günther <agx sigxcpu org>
Date:   Sun Jul 26 13:36:22 2009 +0200

    check for errors when sending notifications

 src/krb5-auth-applet.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/krb5-auth-applet.c b/src/krb5-auth-applet.c
index cc3f50e..7b043cc 100644
--- a/src/krb5-auth-applet.c
+++ b/src/krb5-auth-applet.c
@@ -389,7 +389,16 @@ ka_show_notification (KaApplet *applet)
 {
 	/* wait for the panel to be settled before showing a bubble */
 	if (gtk_status_icon_is_embedded (applet->priv->tray_icon)) {
-		notify_notification_show (applet->priv->notification, NULL);
+		GError *error = NULL;
+		gboolean ret;
+
+		ret = notify_notification_show (applet->priv->notification, &error);
+		if (!ret) {
+			g_assert (error);
+			g_assert (error->message);
+			g_warning ("Failed to show notification: %s", error->message);
+			g_clear_error (&error);
+		}
 	} else {
 		g_timeout_add_seconds (5, (GSourceFunc)ka_show_notification, applet);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]