diff options
author | Milan Crha <mcrha@redhat.com> | 2008-06-09 18:09:05 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-06-09 18:09:05 +0800 |
commit | 7d4f83689a512f3af1a4002a1567ffbb2762ebb9 (patch) | |
tree | fb560b80ac5a1e7a262c5170a5fd13925aa30531 /calendar/gui/comp-util.c | |
parent | 5c0a74daec3233ea307f25e23c83ba0db83f1b47 (diff) | |
download | gsoc2013-evolution-7d4f83689a512f3af1a4002a1567ffbb2762ebb9.tar.gz gsoc2013-evolution-7d4f83689a512f3af1a4002a1567ffbb2762ebb9.tar.zst gsoc2013-evolution-7d4f83689a512f3af1a4002a1567ffbb2762ebb9.zip |
** Fix for bug #536813
2008-06-09 Milan Crha <mcrha@redhat.com>
** Fix for bug #536813
* gui/comp-util.h: (is_icalcomp_on_the_server):
* gui/comp-util.c: (is_icalcomp_on_the_server): Similar helper function
as cal_comp_is_on_server only the parameter is icalcomponent.
* gui/e-week-view-event-item.c: (e_week_view_event_item_double_click):
* gui/e-week-view.c: (e_week_view_on_text_item_event):
Do not start to edit the event on the double click if the event is not
on the server yet. Storing the event can cause the renumbering events
so the result can be that the edited event would be different.
svn path=/trunk/; revision=35618
Diffstat (limited to 'calendar/gui/comp-util.c')
-rw-r--r-- | calendar/gui/comp-util.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c index e1aacc7c9e..392f991a84 100644 --- a/calendar/gui/comp-util.c +++ b/calendar/gui/comp-util.c @@ -248,6 +248,29 @@ cal_comp_is_on_server (ECalComponent *comp, ECal *client) } /** + * is_icalcomp_on_the_server: + * same as @cal_comp_is_on_server, only the component parameter is icalcomponent, not the ECalComponent. + **/ +gboolean +is_icalcomp_on_the_server (icalcomponent *icalcomp, ECal *client) +{ + gboolean on_server; + ECalComponent *comp; + + if (!icalcomp || !client || !icalcomponent_get_uid (icalcomp)) + return FALSE; + + comp = e_cal_component_new (); + e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp)); + + on_server = cal_comp_is_on_server (comp, client); + + g_object_unref (comp); + + return on_server; +} + +/** * cal_comp_event_new_with_defaults: * * Creates a new VEVENT component and adds any default alarms to it as set in |