|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Extend calendar plugin supportHello,
there are some patches that we created to support features in our calendar system. Patches eds-* are meant to evolution data server and evo-* are for evolution package. It was testedagainst 2.26 release, so i hope it will work with current developement version of evolution. -- Jan Kratina http://zonio.cz jan.kratina@... [eds-cap-no-send-itip.patch] add CAL_STATIC_CAPABILITY_NO_SEND_IMIP calendar capability From: Ondrej Jirman <ondrej.jirman@...> calendar/ChangeLog: 2008-04-06 Ondrej Jirman <megous@...> ** Fix for bug #not yet submitted * libecal/e-cal-util.h: Add new capability CAL_STATIC_CAPABILITY_NO_SEND_IMIP to disable sending of iMIPs and conversion of attachment URLs to 'CID:...' by evolution. This is used by calendar backends that want to send iTIPs and upload attachments to a calendar server. --- calendar/libecal/e-cal-util.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/calendar/libecal/e-cal-util.h b/calendar/libecal/e-cal-util.h index 0be3bd4..8cf10f6 100644 --- a/calendar/libecal/e-cal-util.h +++ b/calendar/libecal/e-cal-util.h @@ -126,6 +126,7 @@ gboolean e_cal_util_event_dates_match (icalcomponent *icalcomp1, icalcomponent * #define CAL_STATIC_CAPABILITY_NO_ORGANIZER "no-organizer" #define CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY "delegate-to-many" #define CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING "has-unaccepted-meeting" +#define CAL_STATIC_CAPABILITY_NO_SEND_IMIP "no-send-imip" /* Recurrent events. Management for instances */ icalcomponent *e_cal_util_construct_instance (icalcomponent *icalcomp, [eds-ecal-credentials-fix.patch] always pass username/password to e_cal_open From: Ondrej Jirman <ondrej.jirman@...> --- calendar/libecal/e-cal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c index 732b562..7034af9 100644 --- a/calendar/libecal/e-cal.c +++ b/calendar/libecal/e-cal.c @@ -1639,7 +1639,7 @@ open_calendar (ECal *ecal, gboolean only_if_exists, GError **error, ECalendarSta g_mutex_unlock (priv->mutex); /* see if the backend needs authentication */ - if ( (priv->mode != CAL_MODE_LOCAL) && e_source_get_property (priv->source, "auth")) { + if (e_source_get_property (priv->source, "auth")) { char *prompt, *key; char *parent_user; [eds-ecal-dont-cache-ro-flag.patch] don't cache read only status in ECal From: Ondrej Jirman <ondrej.jirman@...> calendar/ChangeLog: 2008-04-06 Ondrej Jirman <megous@...> ** Fix for bug #525231 * libecal/e-cal.c: (e_cal_is_read_only): Don't cache read_only flag on the client side. Always ask backend plugin for the current status of the read_only flag. Some calendar plugins allow for changes between read-only/read-write status of the calendar on the fly (for example because of change in the calendar ACL). --- calendar/libecal/e-cal.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c index c429ff0..732b562 100644 --- a/calendar/libecal/e-cal.c +++ b/calendar/libecal/e-cal.c @@ -2114,15 +2114,10 @@ e_cal_get_local_attachment_store (ECal *ecal) gboolean e_cal_is_read_only (ECal *ecal, gboolean *read_only, GError **error) { - ECalPrivate *priv; - if (!(ecal && E_IS_CAL (ecal))) E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_INVALID_ARG, error); - priv = ecal->priv; - *read_only = priv->read_only; - - return TRUE; + return get_read_only (ecal, read_only, error); } static gboolean [eds-group-auth.patch] use password manager key from ESource auth-key property in ECal From: Ondrej Jirman <ondrej.jirman@...> calendar/ChangeLog: 2008-04-06 Ondrej Jirman <megous@...> ** Fix for bug #525229 * libecal/e-cal.c: (open_calendar): Use "auth-key" ESource property to determine pass_key if "auth-key" is set. This is used by calendar plugins that use common authentication credentials for multiple calendars assigned to single calendar account. --- calendar/libecal/e-cal.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c index 1603e87..c429ff0 100644 --- a/calendar/libecal/e-cal.c +++ b/calendar/libecal/e-cal.c @@ -1666,7 +1666,9 @@ open_calendar (ECal *ecal, gboolean only_if_exists, GError **error, ECalendarSta e_source_peek_name (priv->source), username); auth_type = e_source_get_duped_property (priv->source, "auth-type"); - if (auth_type) + if (e_source_get_property (priv->source, "auth-key")) + key = e_source_get_duped_property (priv->source, "auth-key"); + else if (auth_type) key = build_pass_key (ecal); else { parent_user = e_source_get_duped_property (priv->source, "parent_id_name"); [eds-sync-and-error-notify.patch] add support for error/outofsync icons/messages on events in day view From: Ondrej Jirman <ondrej.jirman@...> ChangeLog: 2008-04-06 Ondrej Jirman <megous@...> ** Fix for bug #not yet submitted * art/Makefile.am: Install images listed below. * art/category_error_16.png: Added. * art/category_outofsync_16.png: Added. * libedataserver/e-categories.c: Add new categories 'error' and 'outofsync'. calendar/ChangeLog: 2008-04-06 Ondrej Jirman <megous@...> ** Fix for bug #not yet submitted * libecal/e-cal-component.h: * libecal/e-cal-component.c: (e_cal_component_get_categories_list), (e_cal_component_get_x_property), (e_cal_component_set_x_property): Add categories to the list based on X-EVOLUTION-STATUS and X-EVOLUTION-ERROR properties. --- art/Makefile.am | 4 +- art/category_error_16.png | Bin art/category_outofsync_16.png | Bin calendar/libecal/e-cal-component.c | 92 ++++++++++++++++++++++++++++++++++++ calendar/libecal/e-cal-component.h | 3 + libedataserver/e-categories.c | 4 ++ 6 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 art/category_error_16.png create mode 100644 art/category_outofsync_16.png diff --git a/art/Makefile.am b/art/Makefile.am index 4bc6dac..a7aeaad 100644 --- a/art/Makefile.am +++ b/art/Makefile.am @@ -16,7 +16,9 @@ images_DATA = \ category_status_16.png \ category_strategies_16.png \ category_suppliers_16.png \ - category_time-and-expenses_16.png + category_time-and-expenses_16.png \ + category_error_16.png \ + category_outofsync_16.png EXTRA_DIST = \ $(images_DATA) diff --git a/art/category_error_16.png b/art/category_error_16.png new file mode 100644 index 0000000000000000000000000000000000000000..43e777830bb16fb56253bc3fdc81753f3c21eda2 GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z8pkThIi(`nz>Ewh1%<t+a|E&K%`%HaJmc++Qw`bZ#wg*>D>uhv7&~g6T z>==Iu5V*4c<bx8{qk0KSPs*K&u9Pw^)HuAXtx8YfSXoY1<Oj_bSNVe_4X4Y#lr->( s?3`y1G*8I$qxH!+1(t$TgGmewRw9OnyKGN30j*~6boFyt=akR{07vab=l}o! literal 0 HcmV?d00001 diff --git a/art/category_outofsync_16.png b/art/category_outofsync_16.png new file mode 100644 index 0000000000000000000000000000000000000000..0d6d6d4842e2f107f5f508ee5282c1a2aa4f24eb GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg?E@@^a)ly@(DL|n>PZ!4!i_^&o z5+Mof%!liPz8VBBn%M{h6C=*b1#FejQ@EbCgK>wCnl?jcA@43JHK#h26b@z8z*h$k v95~^TIV)k2%AFHk3`xwhSDl=@je+6)Oz~se7rxpIG@QZH)z4*}Q$iB}D$_u% literal 0 HcmV?d00001 diff --git a/calendar/libecal/e-cal-component.c b/calendar/libecal/e-cal-component.c index e7ccb0a..9490929 100644 --- a/calendar/libecal/e-cal-component.c +++ b/calendar/libecal/e-cal-component.c @@ -1756,6 +1756,7 @@ e_cal_component_get_categories_list (ECalComponent *comp, GSList **categ_list) const char *p; const char *cat_start; char *str; + const char* prop; g_return_if_fail (comp != NULL); g_return_if_fail (E_IS_CAL_COMPONENT (comp)); @@ -1764,8 +1765,18 @@ e_cal_component_get_categories_list (ECalComponent *comp, GSList **categ_list) priv = comp->priv; g_return_if_fail (priv->icalcomp != NULL); + *categ_list = NULL; + + /*XXX: a little bit hacky, but it is the simplest solution anyway */ + e_cal_component_get_x_property (comp, "X-EVOLUTION-STATUS", &prop); + if (prop) + *categ_list = g_slist_prepend (*categ_list, g_strdup("outofsync")); + + e_cal_component_get_x_property (comp, "X-EVOLUTION-ERROR", &prop); + if (prop) + *categ_list = g_slist_prepend (*categ_list, g_strdup("error")); + if (!priv->categories) { - *categ_list = NULL; return; } @@ -4708,6 +4719,85 @@ e_cal_component_set_location (ECalComponent *comp, const char *location) } } +/** + * e_cal_component_get_x_property: + * @comp: A calendar component object + * @name: Property name. + * @value: Return value for the property value. + * + * Queries the location property of a calendar component object. + **/ +void +e_cal_component_get_x_property (ECalComponent *comp, const char* name, const char **value) +{ + ECalComponentPrivate *priv; + icalproperty *iter; + + g_return_if_fail (comp != NULL); + g_return_if_fail (E_IS_CAL_COMPONENT (comp)); + g_return_if_fail (name != NULL); + g_return_if_fail (value != NULL); + + priv = comp->priv; + g_return_if_fail (priv->icalcomp != NULL); + + *value = NULL; + for (iter = icalcomponent_get_first_property(priv->icalcomp, ICAL_X_PROPERTY); iter; + iter = icalcomponent_get_next_property(priv->icalcomp, ICAL_X_PROPERTY)) { + const char *str = icalproperty_get_x_name (iter); + + if (str && !strcmp (str, name)) { + *value = icalproperty_get_value_as_string (iter); + return; + } + } +} + +/** + * e_cal_component_set_x_property: + * @comp: A calendar component object + * @name: Property name. + * @value: Property value. + * + * Queries the location property of a calendar component object. + **/ +void +e_cal_component_set_x_property (ECalComponent *comp, const char* name, const char *value) +{ + ECalComponentPrivate *priv; + icalproperty *iter; + + g_return_if_fail (comp != NULL); + g_return_if_fail (E_IS_CAL_COMPONENT (comp)); + g_return_if_fail (name != NULL); + + priv = comp->priv; + g_return_if_fail (priv->icalcomp != NULL); + +again: + for (iter = icalcomponent_get_first_property(priv->icalcomp, ICAL_X_PROPERTY); iter; + iter = icalcomponent_get_next_property(priv->icalcomp, ICAL_X_PROPERTY)) { + const char *str = icalproperty_get_x_name (iter); + + if (str && !strcmp (str, name)) { + icalcomponent_remove_property(priv->icalcomp, iter); + icalproperty_free(iter); + goto again; + } + } + + if (value) { + /* XXX: commas are bad (libical does not escape them) */ + char** v = g_strsplit(value, ",", -1); + char* e_value = g_strjoinv("", v); + g_strfreev(v); + iter = icalproperty_new_x(e_value); + g_free(e_value); + icalproperty_set_x_name(iter, name); + icalcomponent_add_property(priv->icalcomp, iter); + } +} + /** diff --git a/libedataserver/e-categories.c b/libedataserver/e-categories.c index c190416..ca74837 100644 --- a/libedataserver/e-categories.c +++ b/libedataserver/e-categories.c @@ -456,6 +456,10 @@ initialize_categories (void) g_atexit (finalize_categories); + /*XXX: always add our categories */ + e_categories_add ("error", NULL, g_build_filename (E_DATA_SERVER_IMAGESDIR, "category_error_16.png", NULL), FALSE); + e_categories_add ("outofsync", NULL, g_build_filename (E_DATA_SERVER_IMAGESDIR, "category_outofsync_16.png", NULL), FALSE); + n_added = load_categories (); if (n_added > 0) { g_debug ("Loaded %d categories", n_added); diff --git a/calendar/libecal/e-cal-component.h b/calendar/libecal/e-cal-component.h index 382976f..4d08cc5 100644 --- a/calendar/libecal/e-cal-component.h +++ b/calendar/libecal/e-cal-component.h @@ -328,6 +328,9 @@ gboolean e_cal_component_has_attendees (ECalComponent *comp); void e_cal_component_get_location (ECalComponent *comp, const char **location); void e_cal_component_set_location (ECalComponent *comp, const char *location); +void e_cal_component_get_x_property (ECalComponent *comp, const char* name, const char **value); +void e_cal_component_set_x_property (ECalComponent *comp, const char* name, const char *value); + /* Attachment handling */ void e_cal_component_get_attachment_list (ECalComponent *comp, GSList **attachment_list); void e_cal_component_set_attachment_list (ECalComponent *comp, GSList *attachment_list); [evo-alarm-group-auth.patch] alarm notify auth should use auth-key From: Ondrej Jirman <ondrej.jirman@...> calendar/ChangeLog: 2008-04-06 Ondrej Jirman <megous@...> ** Fix for bug #525229 * gui/alarm-notify/alarm-notify.c: (alarm_notify_add_calendar): Use "auth-key" ESource property to determine pass_key if "auth-key" is set. This is used by calendar plugins that use common authentication credentials for multiple calendars assigned to single calendar account. --- calendar/gui/alarm-notify/alarm-notify.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 4110681..2a8bacb 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -352,7 +352,9 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource priv = an->priv; str_uri = e_source_get_uri (source); e_uri = e_uri_new (str_uri); - if (e_source_get_property (source, "auth-type")) + if (e_source_get_property (source, "auth-key")) + pass_key = e_source_get_duped_property (source, "auth-key"); + else if (e_source_get_property (source, "auth-type")) pass_key = e_uri_to_string (e_uri, FALSE); else pass_key = g_strdup (str_uri); [evo-cap-no-send-itip.patch] --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -1166,7 +1166,7 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp, /* Recipients */ destinations = comp_to_list (method, comp, users, FALSE); if (method != E_CAL_COMPONENT_METHOD_PUBLISH) { - if (destinations == NULL) { + if (destinations == NULL || e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_SEND_IMIP)) { /* We sent them all via the server */ retval = TRUE; goto cleanup; --- a/calendar/gui/dialogs/comp-editor.c 2009-03-24 12:41:42.000000000 +0100 +++ b/calendar/gui/dialogs/comp-editor.c.orig 2009-03-24 12:37:07.000000000 +0100 @@ -3105,7 +3105,7 @@ } if (!e_cal_component_has_attachments (priv->comp) - || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) { + || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES) || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_NO_SEND_IMIP)) { if (itip_send_comp (method, send_comp, priv->client, NULL, NULL, users, strip_alarms)) { g_object_unref (send_comp); [evo-disable-source-update-flag.patch] diff --git a/calendar/gui/e-cal-config.h b/calendar/gui/e-cal-config.h index 015a3f0..4bbd675 100644 --- a/calendar/gui/e-cal-config.h +++ b/calendar/gui/e-cal-config.h @@ -58,6 +58,7 @@ struct _ECalConfigTargetSource { struct _ESource *source; ECalSourceType source_type; + gboolean disable_source_update; }; struct _ECalConfigTargetPrefs { implement flag that calendar properties plugin can use to disable sync From: Ondrej Jirman <ondrej.jirman@...> calendar/ChangeLog: 2008-04-06 Ondrej Jirman <megous@...> ** Fix for bug #not yet submitted * gui/dialogs/calendar-setup.c: (eccp_commit): * gui/e-cal-config.h: Implement ECalConfigTargetSource flag that calendar plugin can use to disable ESourceList sync. This is useful if plugin wants to do its own ESourceList sync. --- calendar/gui/dialogs/calendar-setup.c | 4 ++++ calendar/gui/e-cal-config.h | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index ffc3757..71783e1 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -75,9 +75,13 @@ eccp_check_complete (EConfig *ec, const char *pageid, void *data) static void eccp_commit (EConfig *ec, GSList *items, void *data) { + ECalConfigTargetSource* target = (ECalConfigTargetSource*)ec->target; CalendarSourceDialog *sdialog = data; xmlNodePtr xml; + if (target->disable_source_update) + return; + if (sdialog->original_source) { const gchar *color_spec; [evo-show-error-message-in-event.patch] show error message in event tooltip From: Ondrej Jirman <ondrej.jirman@...> calendar/ChangeLog: 2008-04-06 Ondrej Jirman <megous@...> ** Fix for bug #not yet submitted * gui/e-calendar-view.c: (e_calendar_view_get_tooltips): Display error string in event's tooltip from X-EVOLUTION-ERROR event property. --- calendar/gui/e-calendar-view.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 3e05333..01ce1a9 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -2202,6 +2202,20 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data) gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0); g_free (tmp); + + /* display error */ + e_cal_component_get_x_property (newcomp, "X-EVOLUTION-ERROR", &str); + if (str) { + tmp = g_strdup_printf (_("Error: %s"), str); + label = gtk_label_new (NULL); + gtk_label_set_markup ((GtkLabel *)label, tmp); + hbox = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, FALSE, 0); + ebox = gtk_event_box_new (); + gtk_container_add ((GtkContainer *)ebox, hbox); + gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0); + g_free (tmp); + } e_cal_component_get_organizer (newcomp, &organiser); if (organiser.cn) { _______________________________________________ Evolution-patches mailing list Evolution-patches@... http://mail.gnome.org/mailman/listinfo/evolution-patches |
|
|
Re: Extend calendar plugin supportOn Wed, 2009-04-22 at 16:10 +0200, Jan devyx Kratina wrote:
> there are some patches that we created to support features in our > calendar system. > Patches eds-* are meant to evolution data server and evo-* are for > evolution package. > It was testedagainst 2.26 release, so i hope it will work with current > developement version of evolution. Can you please file separate bugs for each of these patches at http://bugzilla.gnome.org/ and include a description of what they do? It's easier to track patches in a bug database than on a mailing list. Thanks, Matthew Barnes _______________________________________________ Evolution-patches mailing list Evolution-patches@... http://mail.gnome.org/mailman/listinfo/evolution-patches |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |