aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm-queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-queue.c')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 41e2b9fea1..08f1aadd48 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -1279,12 +1279,15 @@ open_alarm_dialog (TrayIconData *tray_data)
if (tray_blink_id > -1)
g_source_remove (tray_blink_id);
tray_blink_id = -1;
-
- gtk_widget_destroy (GTK_WIDGET (tray_icon));
- tray_icon = NULL;
+
#ifndef USE_GTK_STATUS_ICON
+ gtk_widget_destroy (GTK_WIDGET (tray_icon));
tray_image = NULL;
+#else
+ g_object_unref (tray_icon);
#endif
+ tray_icon = NULL;
+
if (!alarm_notifications_dialog)
alarm_notifications_dialog = notified_alarms_dialog_new ();
@@ -1333,11 +1336,15 @@ tray_icon_clicked_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_da
g_source_remove (tray_blink_id);
tray_blink_id = -1;
- gtk_widget_destroy (GTK_WIDGET (tray_icon));
- tray_icon = NULL;
+
+
#ifndef USE_GTK_STATUS_ICON
+ gtk_widget_destroy (GTK_WIDGET (tray_icon));
tray_image = NULL;
+#else
+ g_object_unref (tray_icon);
#endif
+ tray_icon = NULL;
return TRUE;
}
}