diff options
author | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-08-20 18:17:18 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-08-20 18:17:18 +0800 |
commit | 4ad72d24ee36553c85c1bbf21b22c46f77c2ac82 (patch) | |
tree | 048f40b08f5a0e42df0f2a5567158174b228bdea /calendar/gui/calendar-commands.c | |
parent | ba861603f446ca0fd9b4cf72f0f8357c306ce953 (diff) | |
download | gsoc2013-evolution-4ad72d24ee36553c85c1bbf21b22c46f77c2ac82.tar gsoc2013-evolution-4ad72d24ee36553c85c1bbf21b22c46f77c2ac82.tar.gz gsoc2013-evolution-4ad72d24ee36553c85c1bbf21b22c46f77c2ac82.tar.bz2 gsoc2013-evolution-4ad72d24ee36553c85c1bbf21b22c46f77c2ac82.tar.lz gsoc2013-evolution-4ad72d24ee36553c85c1bbf21b22c46f77c2ac82.tar.xz gsoc2013-evolution-4ad72d24ee36553c85c1bbf21b22c46f77c2ac82.tar.zst gsoc2013-evolution-4ad72d24ee36553c85c1bbf21b22c46f77c2ac82.zip |
Merged from calendar-views-with-model branch
svn path=/trunk/; revision=22308
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r-- | calendar/gui/calendar-commands.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 6b91e79463..38206a66b9 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -314,8 +314,8 @@ static void publish_freebusy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; - CalClient *client; - GList *comp_list; + GList *client_list, *cl; + GList *comp_list = NULL; icaltimezone *utc; time_t start = time (NULL), end; @@ -325,20 +325,26 @@ publish_freebusy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) start = time_day_begin_with_zone (start, utc); end = time_add_week_with_zone (start, 6, utc); - client = gnome_calendar_get_cal_client (gcal); - comp_list = cal_client_get_free_busy (client, NULL, start, end); - if (comp_list) { - GList *l; + client_list = e_cal_model_get_client_list (gnome_calendar_get_calendar_model (gcal)); + for (cl = client_list; cl != NULL; cl = cl->next) { + GList *tmp_comp_list; - for (l = comp_list; l; l = l->next) { - CalComponent *comp = CAL_COMPONENT (l->data); - itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, client, NULL); + tmp_comp_list = cal_client_get_free_busy ((CalClient *) cl->data, NULL, start, end); + if (tmp_comp_list) { + GList *l; - g_object_unref (comp); - } + for (l = comp_list; l; l = l->next) { + CalComponent *comp = CAL_COMPONENT (l->data); + itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, (CalClient *) cl->data, NULL); + + g_object_unref (comp); + } - g_list_free (comp_list); + g_list_free (comp_list); + } } + + g_list_free (client_list); } static void @@ -589,7 +595,7 @@ sensitize_calendar_commands (GnomeCalendar *gcal, BonoboControl *control, gboole g_assert (uic != NULL); n_selected = enable ? gnome_calendar_get_num_events_selected (gcal) : 0; - read_only = cal_client_is_read_only (gnome_calendar_get_cal_client (gcal)); + read_only = cal_client_is_read_only (e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal))); bonobo_ui_component_set_prop (uic, "/commands/Cut", "sensitive", n_selected == 0 || read_only ? "0" : "1", @@ -620,7 +626,7 @@ sensitize_calendar_commands (GnomeCalendar *gcal, BonoboControl *control, gboole event = NULL; if (event) { - if (cal_component_has_recurrences (event->comp)) + if (cal_util_component_has_recurrences (event->comp_data->icalcomp)) has_recurrences = TRUE; } } |