diff options
author | JP Rosevear <jpr@ximian.com> | 2001-10-10 02:37:53 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-10-10 02:37:53 +0800 |
commit | 4186cba8a65447ae5b93b43070eb290ee0762ff2 (patch) | |
tree | 7d4810e20102c8097522fefe18e4ad470bf1c1f8 /calendar/gui/e-itip-control.c | |
parent | 78a2327d01e6536506a58ac43191dc50486ef95d (diff) | |
download | gsoc2013-evolution-4186cba8a65447ae5b93b43070eb290ee0762ff2.tar gsoc2013-evolution-4186cba8a65447ae5b93b43070eb290ee0762ff2.tar.gz gsoc2013-evolution-4186cba8a65447ae5b93b43070eb290ee0762ff2.tar.bz2 gsoc2013-evolution-4186cba8a65447ae5b93b43070eb290ee0762ff2.tar.lz gsoc2013-evolution-4186cba8a65447ae5b93b43070eb290ee0762ff2.tar.xz gsoc2013-evolution-4186cba8a65447ae5b93b43070eb290ee0762ff2.tar.zst gsoc2013-evolution-4186cba8a65447ae5b93b43070eb290ee0762ff2.zip |
util function to get address (itip_addresses_get_default): get only the
2001-10-09 JP Rosevear <jpr@ximian.com>
* gui/itip-utils.c (get_address): util function to get address
(itip_addresses_get_default): get only the default address
(itip_address_free): free single address
(itip_addresses_free): use above
(comp_limit_attendees): limit the number of attendees to one, the
user
(comp_sentby): set the sentby parameter if the user is not the
organizer
(comp_minimal): remove extraneous info for send (for refresh and
declinecounter)
(comp_compliant): remove all alarms, do various things to make the
components comply with itip spec based on method
(itip_send_comp): use comp_compliant method
* gui/itip-utils.h: new protos
* gui/e-itip-control.c: rescan the component when necessary
(get_next): don't get stuck in infinite loop if there are no
viewable components
(e_itip_control_set_data): if there are no viewable components,
spit an error message
* gui/dialogs/meeting-page.h: tidy
* gui/dialogs/meeting-page.c (meeting_page_fill_widgets): use
organizer's cn if possible
(other_clicked_cb): no longer doing the sent by stuff directly,
hide more widgets
* pcs/query.c: use bonobo exception stuff
* cal-util/cal-component.c (cal_component_rescan): have the comp
rescan its libical component (for when you change things directly)
(free_icalcomponent): take a param on whether to free the
component or just clean up the mappings
(cal_component_has_attendees): util function
* cal-util/cal-component.h: new protos
svn path=/trunk/; revision=13525
Diffstat (limited to 'calendar/gui/e-itip-control.c')
-rw-r--r-- | calendar/gui/e-itip-control.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 20e17d7eac..1f26c5d765 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -857,15 +857,16 @@ static icalcomponent * get_next (icalcompiter *iter) { icalcomponent *ret = NULL; - icalcomponent_kind kind = ICAL_NO_COMPONENT; + icalcomponent_kind kind; - while (kind != ICAL_VEVENT_COMPONENT - && kind != ICAL_VTODO_COMPONENT - && kind != ICAL_VFREEBUSY_COMPONENT) { + do { icalcompiter_next (iter); ret = icalcompiter_deref (iter); kind = icalcomponent_isa (ret); - } + } while (ret != NULL + && kind != ICAL_VEVENT_COMPONENT + && kind != ICAL_VTODO_COMPONENT + && kind != ICAL_VFREEBUSY_COMPONENT); return ret; } @@ -990,6 +991,11 @@ e_itip_control_set_data (EItipControl *itip, const gchar *text) && kind != ICAL_VFREEBUSY_COMPONENT) priv->ical_comp = get_next (&priv->iter); + if (priv->ical_comp == NULL) { + write_error_html (itip, _("The attachment has no viewable calendar items")); + return; + } + priv->total = icalcomponent_count_components (priv->main_comp, ICAL_VEVENT_COMPONENT); priv->total += icalcomponent_count_components (priv->main_comp, ICAL_VTODO_COMPONENT); priv->total += icalcomponent_count_components (priv->main_comp, ICAL_VFREEBUSY_COMPONENT); @@ -1130,6 +1136,7 @@ update_attendee_status (EItipControl *itip) change_status (cal_component_get_icalcomponent (comp), itip_strip_mailto (a->value), partstat); + cal_component_rescan (comp); } else { dialog = gnome_warning_dialog (_("Attendee status could " "not be updated because " @@ -1334,14 +1341,17 @@ ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar break; case 'A': change_status (priv->ical_comp, priv->my_address, ICAL_PARTSTAT_ACCEPTED); + cal_component_rescan (priv->comp); update_item (itip); break; case 'T': change_status (priv->ical_comp, priv->my_address, ICAL_PARTSTAT_TENTATIVE); + cal_component_rescan (priv->comp); update_item (itip); break; case 'D': change_status (priv->ical_comp, priv->my_address, ICAL_PARTSTAT_DECLINED); + cal_component_rescan (priv->comp); update_item (itip); break; case 'F': @@ -1399,6 +1409,7 @@ ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar icalproperty_free (prop); } } + cal_component_rescan (comp); itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp); } else { GtkWidget *dialog; |