From 5d17a26e74f774d5a57822915df678ac42aa63fd Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Fri, 4 May 2007 04:14:18 +0000 Subject: Fix for bug #415562 svn path=/trunk/; revision=33480 --- calendar/gui/alarm-notify/alarm-queue.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'calendar/gui/alarm-notify') diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 5f5060e8e8..b5a2f52ffb 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1344,6 +1344,7 @@ tray_icon_clicked_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_da gtk_widget_destroy (GTK_WIDGET (tray_icon)); tray_image = NULL; #else + gtk_status_icon_set_visible (tray_icon, FALSE); g_object_unref (tray_icon); #endif tray_icon = NULL; @@ -1366,6 +1367,21 @@ icon_activated (GtkStatusIcon *icon) tray_icon_clicked_cb (NULL, &event, NULL); } + +static void +popup_menu (GtkStatusIcon *icon, guint button, guint activate_time) +{ + if (button == 3) { + /* right click */ + GdkEventButton event; + + event.type = GDK_BUTTON_PRESS; + event.button = 3; + event.time = gtk_get_current_event_time (); + + tray_icon_clicked_cb (NULL, &event, NULL); + } +} #endif static gboolean @@ -1495,6 +1511,9 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa, gtk_status_icon_set_from_pixbuf (tray_icon, e_icon_factory_get_icon ("stock_appointment-reminder", E_ICON_SIZE_LARGE_TOOLBAR)); g_signal_connect (G_OBJECT (tray_icon), "activate", G_CALLBACK (icon_activated), NULL); + g_signal_connect (G_OBJECT (tray_icon), "popup-menu", + G_CALLBACK (popup_menu), NULL); + } #endif -- cgit v1.2.3