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.c19
1 files changed, 19 insertions, 0 deletions
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