[no subject]



From: Ondrej Jirman <ondrej jirman zonio net>

Subject: [PATCH] set_local_attachment_store: support eee:// attachments
---

 calendar/libecal/e-cal.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 7034af9..db03ad6 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -1386,6 +1386,14 @@ set_local_attachment_store (ECal *ecal)
 		priv->local_attachment_store =
 			g_filename_to_uri (filename, NULL, NULL);
 		g_free (filename);
+        } else if (g_str_has_prefix (priv->uri, "eee://")) {
+		gchar *filename = g_build_filename (g_get_home_dir (),
+						    ".evolution/cache/calendar",
+						    mangled_uri,
+						    NULL);
+		priv->local_attachment_store =
+			g_filename_to_uri (filename, NULL, NULL);
+		g_free (filename);
 	}
 	g_free (mangled_uri);
 }

--=-+DfdBuiVbWMzHuZ1uacn
Content-Disposition: attachment; filename=eds-group-auth.patch
Content-Type: text/x-patch; name=eds-group-auth.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

use password manager key from ESource auth-key property in ECal

From: Ondrej Jirman <ondrej jirman zonio net>

calendar/ChangeLog:

2008-04-06  Ondrej Jirman  <megous megous com>

	** 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");

--=-+DfdBuiVbWMzHuZ1uacn
Content-Disposition: attachment; filename=eds-sync-and-error-notify.patch
Content-Type: text/x-patch; name=eds-sync-and-error-notify.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

add support for error/outofsync icons/messages on events in day view

From: Ondrej Jirman <ondrej jirman zonio net>

ChangeLog:

2008-04-06  Ondrej Jirman  <megous megous com>

	** 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 megous com>

	** 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);

--=-+DfdBuiVbWMzHuZ1uacn
Content-Disposition: attachment; filename=evo-alarm-group-auth.patch
Content-Type: text/x-patch; name=evo-alarm-group-auth.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

alarm notify auth should use auth-key

From: Ondrej Jirman <ondrej jirman zonio net>

calendar/ChangeLog:

2008-04-06  Ondrej Jirman  <megous megous com>

	** 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);

--=-+DfdBuiVbWMzHuZ1uacn
Content-Disposition: attachment; filename=evo-cap-no-send-itip.patch
Content-Type: text/x-patch; name=evo-cap-no-send-itip.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

--- 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);

--=-+DfdBuiVbWMzHuZ1uacn
Content-Disposition: attachment; filename=evo-disable-source-update-flag.patch
Content-Type: text/x-patch; name=evo-disable-source-update-flag.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

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 zonio net>

calendar/ChangeLog:

2008-04-06  Ondrej Jirman  <megous megous com>

	** 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;
 

--=-+DfdBuiVbWMzHuZ1uacn
Content-Disposition: attachment; filename=evo-show-error-message-in-event.patch
Content-Type: text/x-patch; name=evo-show-error-message-in-event.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

show error message in event tooltip

From: Ondrej Jirman <ondrej jirman zonio net>

calendar/ChangeLog:

2008-04-06  Ondrej Jirman  <megous megous com>

	** 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) {

--=-+DfdBuiVbWMzHuZ1uacn--



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]