[krb5-auth-dialog] Handle errors from notify_notification_close
- From: Guido Günther <guidog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog] Handle errors from notify_notification_close
- Date: Sun, 6 Jun 2010 17:18:21 +0000 (UTC)
commit 88a05524474ebbc363167714246c7c3cfde57463
Author: Guido Günther <agx sigxcpu org>
Date: Sun Jun 6 19:16:25 2010 +0200
Handle errors from notify_notification_close
src/ka-applet.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/ka-applet.c b/src/ka-applet.c
index a7f8598..bce4288 100644
--- a/src/ka-applet.c
+++ b/src/ka-applet.c
@@ -463,7 +463,8 @@ ka_send_event_notification (KaApplet *applet,
const char *icon,
const char *action)
{
- const char *notify_icon;
+ const char *notify_icon;
+ GError *error = NULL;
g_return_if_fail (applet != NULL);
g_return_if_fail (summary != NULL);
@@ -473,8 +474,16 @@ ka_send_event_notification (KaApplet *applet,
notify_init (PACKAGE);
if (applet->priv->notification != NULL) {
- notify_notification_close (applet->priv->notification, NULL);
+ if (!notify_notification_close (applet->priv->notification,
+ &error)) {
+ if (error)
+ g_warning ("Cannot close notification %s",
+ error->message);
+ else
+ g_warning ("Cannot close notification");
+ }
g_object_unref (applet->priv->notification);
+ g_clear_error (&error);
}
notify_icon = icon ? icon : "krb-valid-ticket";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]