From 02442e7e8cf78169231650ccce19c15d41ce2cfc Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Thu, 15 Jun 2006 09:15:02 +0000 Subject: [PATCH] Fix a build error on gtk 2.9.2+. This fixes bug #65. --- ChangeLog | 5 +++++ libnotify/notification.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f143088..a677a52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jun 15 02:14:14 PDT 2006 Christian Hammond + + * libnotify/notification.c: + - Fix a build error on gtk 2.9.2+. This fixes bug #65. + Tue Jun 06 12:44:48 PDT 2006 Christian Hammond * docs/reference/tmpl/notification.sgml: diff --git a/libnotify/notification.c b/libnotify/notification.c index 5a7958c..ef47a88 100644 --- a/libnotify/notification.c +++ b/libnotify/notification.c @@ -354,7 +354,7 @@ notify_notification_finalize(GObject *object) if (priv->attached_widget != NULL) g_object_unref(G_OBJECT(priv->attached_widget)); -#if HAVE_STATUS_ICON +#ifdef HAVE_STATUS_ICON if (priv->status_icon != NULL) g_object_remove_weak_pointer(G_OBJECT(priv->status_icon), (gpointer)&priv->status_icon); @@ -607,10 +607,14 @@ void notify_notification_attach_to_status_icon(NotifyNotification *notification, GtkStatusIcon *status_icon) { + NotifyNotificationPrivate *priv; + g_return_if_fail(NOTIFY_IS_NOTIFICATION(notification)); g_return_if_fail(status_icon == NULL || GTK_IS_STATUS_ICON(status_icon)); - if (notification->priv->status_icon == status_icon) + priv = notification->priv; + + if (priv->status_icon == status_icon) return; if (priv->status_icon != NULL)