diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2004-01-10 22:16:16 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-01-10 22:16:16 +0800 |
commit | 873550ef30d4e8c8d249442fb5002095765a764f (patch) | |
tree | 72af0242cd3c1d1fb3c0ec60cd11102fb3f60afe /calendar | |
parent | 82a3ae7919c66016b8f8352d3d0aacec84eaf2d8 (diff) | |
download | gsoc2013-evolution-873550ef30d4e8c8d249442fb5002095765a764f.tar.gz gsoc2013-evolution-873550ef30d4e8c8d249442fb5002095765a764f.tar.zst gsoc2013-evolution-873550ef30d4e8c8d249442fb5002095765a764f.zip |
keep all the tray icons we create in a list. (tray_icon_destroyed_cb):
2004-01-10 Rodrigo Moya <rodrigo@ximian.com>
* gui/alarm-notify/alarm-queue.c (display_notification): keep
all the tray icons we create in a list.
(tray_icon_destroyed_cb): remove the tray icon data from the list.
(popup_dismiss_cb, popup_dismiss_all_cb): implemented missing
popup menu items.
svn path=/trunk/; revision=24145
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 10 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-queue.c | 15 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.c | 2 |
3 files changed, 25 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 31d9bda68b..58379e5994 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2004-01-10 Rodrigo Moya <rodrigo@ximian.com> + + * gui/alarm-notify/alarm-queue.c (display_notification): keep + all the tray icons we create in a list. + (tray_icon_destroyed_cb): remove the tray icon data from the list. + (popup_dismiss_cb, popup_dismiss_all_cb): implemented missing + popup menu items. + 2004-01-09 Hans Petter Jansson <hpj@ximian.com> * gui/calendar-component.c (new_calendar_cb): calendar_config -> @@ -57,7 +65,7 @@ corba values * gui/calendar-component.c (impl_upgradeFromVersion): ditto - + 2004-01-09 Rodrigo Moya <rodrigo@ximian.com> * gui/calendar-component.c (impl_upgradeFromVersion): only migrate diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 610e84f8d7..24c89ce0d4 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -65,6 +65,9 @@ static time_t saved_notification_time; /* Clients we are monitoring for alarms */ static GHashTable *client_alarms_hash = NULL; +/* List of tray icons being displayed */ +static GList *tray_icons_list = NULL; + /* Structure that stores a client we are monitoring */ typedef struct { /* Monitored client */ @@ -796,6 +799,8 @@ tray_icon_destroyed_cb (GtkWidget *tray, gpointer user_data) g_object_unref (tray_data->comp); g_object_unref (tray_data->client); + + tray_icons_list = g_list_remove (tray_icons_list, tray_data); g_free (tray_data); return TRUE; @@ -858,11 +863,19 @@ open_alarm_dialog (TrayIconData *tray_data) static void popup_dismiss_cb (GtkWidget *widget, TrayIconData *tray_data) { + gtk_widget_destroy (tray_data->tray_icon); } static void popup_dismiss_all_cb (GtkWidget *widget, TrayIconData *tray_data) { + while (tray_icons_list != NULL) { + TrayIconData *tray_data = tray_icons_list->data; + + gtk_widget_destroy (tray_data->tray_icon); + + tray_icons_list = g_list_remove (tray_icons_list, tray_icons_list); + } } static void @@ -999,6 +1012,8 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa, g_object_ref (tray_data->client); tray_data->tray_icon = tray_icon; + tray_icons_list = g_list_prepend (tray_icons_list, tray_data); + g_signal_connect (G_OBJECT (tray_icon), "destroy", G_CALLBACK (tray_icon_destroyed_cb), tray_data); g_signal_connect (G_OBJECT (ebox), "button_press_event", diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 1fa9b9c0b2..2f459a33e2 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -1377,7 +1377,7 @@ e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *mes EActivityHandler *activity_handler = calendar_component_peek_activity_handler (calendar_component_peek ()); g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table)); - + if (!message || !*message) { if (cal_table->activity_id != 0) { e_activity_handler_operation_finished (activity_handler, cal_table->activity_id); |