diff options
author | JP Rosevear <jpr@ximian.com> | 2001-10-18 23:11:28 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-10-18 23:11:28 +0800 |
commit | 3a28caed5809cfd099c6b0daafa953cd1f05e9f8 (patch) | |
tree | e926945a101ea99c8588373c04d0b6eec1774371 /calendar/gui | |
parent | 2ac3a32b841f38aa81fddc85a29960caed4d7954 (diff) | |
download | gsoc2013-evolution-3a28caed5809cfd099c6b0daafa953cd1f05e9f8.tar gsoc2013-evolution-3a28caed5809cfd099c6b0daafa953cd1f05e9f8.tar.gz gsoc2013-evolution-3a28caed5809cfd099c6b0daafa953cd1f05e9f8.tar.bz2 gsoc2013-evolution-3a28caed5809cfd099c6b0daafa953cd1f05e9f8.tar.lz gsoc2013-evolution-3a28caed5809cfd099c6b0daafa953cd1f05e9f8.tar.xz gsoc2013-evolution-3a28caed5809cfd099c6b0daafa953cd1f05e9f8.tar.zst gsoc2013-evolution-3a28caed5809cfd099c6b0daafa953cd1f05e9f8.zip |
util routine to handle calling back (async_close): use above
2001-10-18 JP Rosevear <jpr@ximian.com>
* gui/e-meeting-model.c (process_callbacks): util routine to
handle calling back
(async_close): use above
(e_meeting_model_refresh_busy_periods): ditto
svn path=/trunk/; revision=13747
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-meeting-model.c | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c index 0cc67304ee..273a25672a 100644 --- a/calendar/gui/e-meeting-model.c +++ b/calendar/gui/e-meeting-model.c @@ -1037,6 +1037,28 @@ process_free_busy_comp (EMeetingAttendee *ia, icalcomponent *fb_comp, icalcompon } static void +process_callbacks (EMeetingModel *im) +{ + EMeetingModelPrivate *priv; + GList *l, *m; + + priv = im->priv; + + for (l = priv->refresh_callbacks, m = priv->refresh_data; l != NULL; l = l->next, m = m->next) { + EMeetingModelRefreshCallback cb = l->data; + + cb (m->data); + } + + g_list_free (priv->refresh_callbacks); + g_list_free (priv->refresh_data); + priv->refresh_callbacks = NULL; + priv->refresh_data = NULL; + + priv->refreshing = FALSE; +} + +static void process_free_busy (EMeetingModel *im, EMeetingAttendee *ia, char *text) { EMeetingModelPrivate *priv; @@ -1096,17 +1118,8 @@ async_close (GnomeVFSAsyncHandle *handle, priv->refresh_count--; - if (priv->refresh_count == 0) { - GList *l, *m; - - for (l = priv->refresh_callbacks, m = priv->refresh_data; l != NULL; l = l->next, m = m->next) { - EMeetingModelRefreshCallback cb = l->data; - - cb (m->data); - } - - priv->refreshing = FALSE; - } + if (priv->refresh_count == 0) + process_callbacks (r_data->im); } static void @@ -1253,7 +1266,11 @@ e_meeting_model_refresh_busy_periods (EMeetingModel *im, EMeetingModelRefreshCal if (ia != NULL) process_free_busy (im, ia, cal_component_get_as_string (comp)); - } + + process_callbacks (im); + } + + } /* Look for fburl's of attendee with no free busy info on server */ |