diff options
-rw-r--r-- | calendar/ChangeLog | 10 | ||||
-rw-r--r-- | calendar/gui/calendar-component.c | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 89ac0448f6..794865509b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2007-06-22 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #328484 + + * gui/calendar-component.c: (source_changed_cb): + New callback to refresh view after source changed. + * gui/calendar-component.c: (source_added_cb), + (source_removed_cb): Connecting and disconnecting + on change callback to source. + 2007-07-02 Milan Crha <mcrha@redhat.com> ** Fix for bug #445526 diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 95d67c8efd..90dd8426f6 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -641,11 +641,23 @@ primary_source_selection_changed_cb (ESourceSelector *selector, CalendarComponen } static void +source_changed_cb (ESource *source, GnomeCalendar *calendar) +{ + if (calendar) { + GtkWidget *widget = gnome_calendar_get_current_view_widget (calendar); + + if (widget) + gtk_widget_queue_draw (widget); + } +} + +static void source_added_cb (GnomeCalendar *calendar, ECalSourceType source_type, ESource *source, CalendarComponentView *component_view) { switch (source_type) { case E_CAL_SOURCE_TYPE_EVENT: e_source_selector_select_source (E_SOURCE_SELECTOR (component_view->source_selector), source); + g_signal_connect (source, "changed", G_CALLBACK (source_changed_cb), calendar); break; default: break; @@ -657,6 +669,7 @@ source_removed_cb (GnomeCalendar *calendar, ECalSourceType source_type, ESource { switch (source_type) { case E_CAL_SOURCE_TYPE_EVENT: + g_signal_handlers_disconnect_by_func (source, G_CALLBACK (source_changed_cb), calendar); e_source_selector_unselect_source (E_SOURCE_SELECTOR (component_view->source_selector), source); break; default: |