aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c19
2 files changed, 26 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 9e32ee6e91..cc747906f9 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-04 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #415562
+
+ * gui/alarm-notify/alarm-queue.c: (tray_icon_clicked_cb),
+ (popup_menu), (display_notification):
+
2007-04-28 Kjartan Maraas <kmaraas@gnome.org>
* gui/dialogs/task-page.glade: Fix a mnemonic conflict.
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