evolution r37200 - in branches/kill-bonobo: . addressbook addressbook/gui/component addressbook/util calendar calendar/gui calendar/gui/dialogs calendar/modules help help/de mail plugins/backup-restore plugins/bogo-junk-plugin plugins/external-editor plugins/google-account-setup plugins/groupwise-account-setup plugins/groupwise-features plugins/import-ics-attachments plugins/ipod-sync plugins/itip-formatter plugins/mail-notification plugins/mail-to-meeting plugins/mail-to-task plugins/mono plugins/pst-import plugins/publish-calendar plugins/save-attachments plugins/save-calendar plugins/startup-wizard plugins/tnef-attachments plugins/webdav-account-setup po tools ui widgets/misc win32



Author: mbarnes
Date: Sat Jan 31 19:03:12 2009
New Revision: 37200
URL: http://svn.gnome.org/viewvc/evolution?rev=37200&view=rev

Log:
Merge revisions 37108:37199 from trunk.


Modified:
   branches/kill-bonobo/   (props changed)
   branches/kill-bonobo/ChangeLog
   branches/kill-bonobo/NEWS
   branches/kill-bonobo/addressbook/ChangeLog
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c
   branches/kill-bonobo/addressbook/gui/component/eab-composer-util.c   (props changed)
   branches/kill-bonobo/addressbook/gui/component/eab-composer-util.h   (props changed)
   branches/kill-bonobo/addressbook/util/addressbook.c   (props changed)
   branches/kill-bonobo/addressbook/util/addressbook.h   (props changed)
   branches/kill-bonobo/calendar/ChangeLog
   branches/kill-bonobo/calendar/gui/calendar-component.c
   branches/kill-bonobo/calendar/gui/comp-util.c
   branches/kill-bonobo/calendar/gui/comp-util.h
   branches/kill-bonobo/calendar/gui/dialogs/e-send-options-utils.c
   branches/kill-bonobo/calendar/gui/dialogs/event-editor.c
   branches/kill-bonobo/calendar/gui/dialogs/event-page.c
   branches/kill-bonobo/calendar/gui/dialogs/event-page.h
   branches/kill-bonobo/calendar/gui/dialogs/task-page.c
   branches/kill-bonobo/calendar/gui/e-cal-model.c
   branches/kill-bonobo/calendar/gui/e-calendar-table.c
   branches/kill-bonobo/calendar/gui/e-calendar-view.c
   branches/kill-bonobo/calendar/gui/e-day-view-main-item.c
   branches/kill-bonobo/calendar/gui/e-day-view.c
   branches/kill-bonobo/calendar/gui/e-itip-control.c
   branches/kill-bonobo/calendar/gui/e-meeting-list-view.c
   branches/kill-bonobo/calendar/gui/e-meeting-list-view.h
   branches/kill-bonobo/calendar/gui/e-meeting-store.c
   branches/kill-bonobo/calendar/gui/e-memo-table.c
   branches/kill-bonobo/calendar/gui/e-tasks.c
   branches/kill-bonobo/calendar/gui/e-week-view.c
   branches/kill-bonobo/calendar/gui/gnome-cal.c
   branches/kill-bonobo/calendar/gui/itip-utils.c
   branches/kill-bonobo/calendar/gui/itip-utils.h
   branches/kill-bonobo/calendar/gui/memos-component.c
   branches/kill-bonobo/calendar/gui/print.c
   branches/kill-bonobo/calendar/gui/tasks-component.c
   branches/kill-bonobo/calendar/modules/e-cal-shell-module.c
   branches/kill-bonobo/calendar/modules/e-memo-shell-module.c
   branches/kill-bonobo/calendar/modules/e-task-shell-module.c
   branches/kill-bonobo/configure.in
   branches/kill-bonobo/help/ChangeLog
   branches/kill-bonobo/help/de/de.po
   branches/kill-bonobo/mail/ChangeLog
   branches/kill-bonobo/mail/em-format-html-display.c
   branches/kill-bonobo/mail/em-format-html-print.c
   branches/kill-bonobo/mail/em-format.c
   branches/kill-bonobo/mail/message-list.c
   branches/kill-bonobo/plugins/backup-restore/ChangeLog
   branches/kill-bonobo/plugins/backup-restore/Makefile.am
   branches/kill-bonobo/plugins/backup-restore/backup-restore.c
   branches/kill-bonobo/plugins/backup-restore/backup.c
   branches/kill-bonobo/plugins/bogo-junk-plugin/ChangeLog
   branches/kill-bonobo/plugins/bogo-junk-plugin/Makefile.am
   branches/kill-bonobo/plugins/bogo-junk-plugin/bf-junk-filter.c
   branches/kill-bonobo/plugins/external-editor/ChangeLog
   branches/kill-bonobo/plugins/external-editor/Makefile.am
   branches/kill-bonobo/plugins/external-editor/external-editor.c
   branches/kill-bonobo/plugins/google-account-setup/ChangeLog
   branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.c
   branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.h
   branches/kill-bonobo/plugins/google-account-setup/google-source.c
   branches/kill-bonobo/plugins/groupwise-account-setup/ChangeLog
   branches/kill-bonobo/plugins/groupwise-account-setup/groupwise-account-setup.c
   branches/kill-bonobo/plugins/groupwise-features/ChangeLog
   branches/kill-bonobo/plugins/groupwise-features/send-options.c
   branches/kill-bonobo/plugins/import-ics-attachments/ChangeLog
   branches/kill-bonobo/plugins/import-ics-attachments/Makefile.am
   branches/kill-bonobo/plugins/ipod-sync/ChangeLog
   branches/kill-bonobo/plugins/ipod-sync/ical-format.c
   branches/kill-bonobo/plugins/itip-formatter/ChangeLog
   branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c
   branches/kill-bonobo/plugins/mail-notification/ChangeLog
   branches/kill-bonobo/plugins/mail-notification/Makefile.am
   branches/kill-bonobo/plugins/mail-to-meeting/ChangeLog
   branches/kill-bonobo/plugins/mail-to-meeting/Makefile.am
   branches/kill-bonobo/plugins/mail-to-task/ChangeLog
   branches/kill-bonobo/plugins/mail-to-task/Makefile.am
   branches/kill-bonobo/plugins/mono/ChangeLog
   branches/kill-bonobo/plugins/mono/mono-plugin.c
   branches/kill-bonobo/plugins/pst-import/ChangeLog
   branches/kill-bonobo/plugins/pst-import/Makefile.am
   branches/kill-bonobo/plugins/pst-import/pst-importer.c
   branches/kill-bonobo/plugins/publish-calendar/ChangeLog
   branches/kill-bonobo/plugins/publish-calendar/publish-format-fb.c
   branches/kill-bonobo/plugins/publish-calendar/publish-format-ical.c
   branches/kill-bonobo/plugins/save-attachments/ChangeLog
   branches/kill-bonobo/plugins/save-attachments/Makefile.am
   branches/kill-bonobo/plugins/save-calendar/ChangeLog
   branches/kill-bonobo/plugins/save-calendar/ical-format.c
   branches/kill-bonobo/plugins/startup-wizard/ChangeLog
   branches/kill-bonobo/plugins/startup-wizard/Makefile.am
   branches/kill-bonobo/plugins/tnef-attachments/ChangeLog
   branches/kill-bonobo/plugins/tnef-attachments/Makefile.am
   branches/kill-bonobo/plugins/tnef-attachments/tnef-plugin.c
   branches/kill-bonobo/plugins/webdav-account-setup/ChangeLog
   branches/kill-bonobo/plugins/webdav-account-setup/webdav-contacts-source.c
   branches/kill-bonobo/po/ChangeLog
   branches/kill-bonobo/po/POTFILES.in
   branches/kill-bonobo/po/de.po
   branches/kill-bonobo/po/es.po
   branches/kill-bonobo/po/fi.po
   branches/kill-bonobo/po/ko.po
   branches/kill-bonobo/po/lv.po
   branches/kill-bonobo/po/mk.po
   branches/kill-bonobo/po/nb.po
   branches/kill-bonobo/po/pa.po
   branches/kill-bonobo/po/pl.po
   branches/kill-bonobo/po/pt_BR.po
   branches/kill-bonobo/po/sr.po
   branches/kill-bonobo/po/sr latin po
   branches/kill-bonobo/po/sv.po
   branches/kill-bonobo/po/ta.po
   branches/kill-bonobo/po/vi.po
   branches/kill-bonobo/po/zh_CN.po
   branches/kill-bonobo/tools/killev.c
   branches/kill-bonobo/ui/evolution-mail-reader.ui   (props changed)
   branches/kill-bonobo/widgets/misc/ChangeLog
   branches/kill-bonobo/widgets/misc/e-calendar-item.c
   branches/kill-bonobo/win32/Makefile.am

Modified: branches/kill-bonobo/NEWS
==============================================================================
--- branches/kill-bonobo/NEWS	(original)
+++ branches/kill-bonobo/NEWS	Sat Jan 31 19:03:12 2009
@@ -1,3 +1,63 @@
+Evolution 2.25.5 2009-01-19
+---------------------------
+
+Updated Translations:
+	Andre Klapper  (de)
+	David Planella (ca)
+	Hendrik Richter  (de)
+	Jorge Gonzalez  (es)
+	Kjartan Maraas  (nb)
+	Luca Ferretti  (it)
+	Wadim Dziedzic  (pl)
+
+Bug Fixes:
+	#208426 : Added support for importing .pst files into Evolution (Bharath Acharya  )
+	#245156 : Helper functions to make it easier. (Milan Crha)
+	#246313 : Added ability to show all event in one-day view, but show only up to 6 columns in a multi-day view. (Milan Crha)
+	#303738 : Forget password on AuthFailed or AuthRequired and try to reopen on AuthFailed status, which will ask for a password again. Show "Authentication Required" on such status returned. Do not free memory which hold ECal. Also always forget password for calendar with the URL key. (Milan Crha)
+	#310844 : Transfer master object instead of the instance for recurring events. (Milan Crha)
+	#339879 : Have two types of code expression, one "code", which adds also a "match-all" into the expression, and a "rawcode" without it. (Milan Crha)
+	#360813 : RFC 2445 - CREATED/DTSTAMP/LAST-MODIFIED always in UTC. (Milan Crha)
+	#443544 (bugzilla.novell.com) : Handle E_MEETING_FREE_BUSY_FREE. (Suman Manjunath)
+	#458968 (bugzilla.novell.com) : Don't warn the user about changes being lost if he is trying to delegate the meeting. (Suman Manjunath)
+	#462372 (bnc) : Add supported URI format. (Ashish Shrivastava)
+	#489437 : Check whether the 'until' date is in the future, and report error if not. (Milan Crha)
+	#554454 : Do not crash when received 'modified' event for something not in a model. And a leak fix. (Milan Crha)
+	#555310 : Localize strings properly. (Milan Crha)
+	#563364 : Manage the second day zone in a Preferences dialog. (Milan Crha)
+	#563867 : Unescape "&" when passing the link to browsers. (Felix Riemann)
+	#565376 : Support storing folder uri in a camel's way. Compiler warning fix. (Milan Crha)
+	#565376 : Bump eds requirement to 2.25.5 because of new functionality. (Milan Crha)
+	#565681 : EPlugins must be loaded after Bonobo init, else variables like `session` are not available for plugin's initialization functions (Philip Van hoof)
+	#566011 : Include <glib/gi18n-lib.h> instead of <glib/gi18n.h> and add bindtextdomain(). (Takao Fujiwara)
+	#566572 : Fix typos.  (Andre Klapper)
+	#566599 : Add translator comments and gettext context for meeting mail subject prefixes. (Matthew Barnes)
+	#566653 : Fix a leaked info (Srinivasa Ragavan)
+	#567031 : Hide also label of the combo. (Milan Crha)
+	#567045 : Escalate scroll event's to a scrolled window, to let mouse wheel work over data too. (Milan Crha)
+	#567129 : Add <default> tag in C locale to localize the value. Add gettext. (Takao Fujiwara)
+	#567148 : Use a labelled button to bring up the timezone selector widget.  (Matthew Barnes)
+	#567270 : Remove already-disabled use of gnome_about_new(). (Matthew Barnes)
+	#567276 : Remove unneeded #include <libgnomeui/gnome-dialog-util.h>. Removed unused function calendar_config_check_timezone_set(). (Matthew Barnes)
+	#567280 : Remove unneeded #include <libgnomeui/gnome-pixmap.h>. (Matthew Barnes)
+	#567281 : Remove unneeded #include <libgnomeui/gnome-messagebox.h>. (Matthew Barnes)
+	#567282 : Remove unrequired #include of <libgnomeui/gnome-href.h>. (Andre Klapper)
+	#567285 : Remove unneeded #include <libgnomeui/gnome-popup-menu.h>. (Matthew Barnes)
+	#567409 : Remove redundancy; split up strings (Andre Klapper)
+	#567687 : Force text/html part only when choosing between text/plain and it. (Milan Crha)
+	#567744 : Comment attribute in property tag should be plural. e.g. <property comments="...">  (Matthew Barnes)
+
+Other contributions:
+	Call e_show_uri() instead of gnome_url_show().  (Matthew Barnes)
+	<gmodule.h> API instead of <dlfcn.h> API.  (Tor Lillqvist)
+	Add support for category syncing. Also, retain an existing given/first name split if it exists in the pilot record. (Matt Davey)
+	B & W version of our new logo to replace the old Ximian logo. Regenerate the Quick Reference PDFs with the new logo. (Matthew Barnes)
+	Call e_display_help() instead of gnome_url_show(). New convenience function calls gtk_show_uri() and displays an error dialog if the URI cannot be shown. (Matthew Barnes)
+	Now that we require GTK 2.14, use gtk_show_uri() instead of gnome_help_display(). (Matthew Barnes)
+	Updated screenshots.  ( pc radhika )
+	Remove explicit mentioning of some translators. (Andre Klapper)
+	Add cast to avoid warning.  (Tor Lillqvist)
+
 Evolution 2.25.4 2009-01-05
 ---------------------------
 

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c	Sat Jan 31 19:03:12 2009
@@ -74,6 +74,7 @@
 	ESource *personal;
 	GSList *groups, *iter;
 	const gchar *data_dir;
+	const gchar *name;
 	gchar *base_uri;
 	gchar *filename;
 
@@ -120,10 +121,15 @@
 			on_ldap_servers = source_group;
 	}
 
+	name = _("On This Computer");
+
 	if (on_this_computer != NULL) {
 		GSList *sources;
 		const gchar *group_base_uri;
 
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (on_this_computer, name);
+
 		sources = e_source_group_peek_sources (on_this_computer);
 		group_base_uri = e_source_group_peek_base_uri (on_this_computer);
 
@@ -159,34 +165,38 @@
 
 	} else {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("On This Computer");
 		source_group = e_source_group_new (name, base_uri);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
 	}
 
+	name = _("Personal");
+
 	if (personal == NULL) {
 		ESource *source;
-		const gchar *name;
 
 		/* Create the default Personal address book. */
-		name = _("Personal");
 		source = e_source_new (name, PERSONAL_RELATIVE_URI);
 		e_source_group_add_source (on_this_computer, source, -1);
 		e_source_set_property (source, "completion", "true");
 		g_object_unref (source);
+	} else {
+		/* Force the source name to the current locale. */
+		e_source_set_name (personal, name);
 	}
 
+	name = _("On LDAP Servers");
+
 	if (on_ldap_servers == NULL) {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("On LDAP Servers");
 		source_group = e_source_group_new (name, LDAP_BASE_URI);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
+	} else {
+		/* Force the source name to the current locale. */
+		e_source_set_name (on_ldap_servers, name);
 	}
 
 	g_free (base_uri);

Modified: branches/kill-bonobo/calendar/gui/calendar-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/calendar-component.c	(original)
+++ branches/kill-bonobo/calendar/gui/calendar-component.c	Sat Jan 31 19:03:12 2009
@@ -352,6 +352,88 @@
 }
 
 static void
+<<<<<<< .working
+=======
+impl_upgradeFromVersion (PortableServer_Servant servant,
+			 CORBA_short major,
+			 CORBA_short minor,
+			 CORBA_short revision,
+			 CORBA_Environment *ev)
+{
+	GError *err = NULL;
+	CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
+
+	if (!migrate_calendars (calendar_component, major, minor, revision, &err)) {
+		GNOME_Evolution_Component_UpgradeFailed *failedex;
+
+		failedex = GNOME_Evolution_Component_UpgradeFailed__alloc();
+		failedex->what = CORBA_string_dup(_("Failed upgrading calendars."));
+		failedex->why = CORBA_string_dup(err->message);
+		CORBA_exception_set(ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_UpgradeFailed, failedex);
+	}
+
+	if (err)
+		g_error_free(err);
+}
+
+static gboolean
+selector_tree_data_dropped (ESourceSelector *selector,
+                            GtkSelectionData *data,
+                            ESource *destination,
+                            GdkDragAction action,
+                            guint info,
+			    CalendarComponent *component)
+{
+	gboolean success = FALSE;
+	ECal *client;
+
+	client = auth_new_cal_from_source (destination, E_CAL_SOURCE_TYPE_EVENT);
+
+	if (!client || !e_cal_open (client, TRUE, NULL)) {
+		if (client)
+			g_object_unref (client);
+
+		return FALSE;
+	}
+
+	if (data->data) {
+		icalcomponent *icalcomp = NULL;
+		char *comp_str; /* do not free this! */
+
+		/* data->data is "source_uid\ncomponent_string" */
+		comp_str = strchr ((char *)data->data, '\n');
+		if (comp_str) {
+			comp_str [0] = 0;
+			comp_str++;
+
+			icalcomp = icalparser_parse_string (comp_str);
+
+			if (icalcomp) {
+				success = cal_comp_process_source_list_drop (client, icalcomp, action, (char *)data->data, component->priv->source_list);
+				icalcomponent_free (icalcomp);
+			}
+		}
+	}
+
+	return success;
+}
+
+static void
+control_activate_cb (BonoboControl *control, gboolean activate, gpointer data)
+{
+	CalendarComponentView *component_view = data;
+
+	if (activate) {
+		BonoboUIComponent *uic;
+		uic = bonobo_control_get_ui_component (component_view->view_control);
+
+		e_user_creatable_items_handler_activate (component_view->creatable_items_handler, uic);
+	}
+}
+
+
+static void
+>>>>>>> .merge-right.r37199
 config_create_ecal_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
 {
 	CalendarComponent *calendar_component = data;
@@ -475,6 +557,16 @@
 	/* Create sidebar selector */
 	component_view->source_selector = e_source_selector_new (calendar_component->priv->source_list);
 
+<<<<<<< .working
+=======
+	g_signal_connect (
+		component_view->source_selector, "data-dropped",
+		G_CALLBACK (selector_tree_data_dropped), calendar_component);
+
+	gtk_drag_dest_set(component_view->source_selector, GTK_DEST_DEFAULT_ALL, drag_types,
+			  num_drag_types, GDK_ACTION_COPY | GDK_ACTION_MOVE);
+
+>>>>>>> .merge-right.r37199
 	gtk_widget_show (component_view->source_selector);
 
 	/* Set up the "new" item handler */

Modified: branches/kill-bonobo/calendar/gui/comp-util.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/comp-util.c	(original)
+++ branches/kill-bonobo/calendar/gui/comp-util.c	Sat Jan 31 19:03:12 2009
@@ -33,6 +33,7 @@
 #include "dialogs/delete-comp.h"
 #include <libecal/e-cal-component.h>
 #include "e-util/e-categories-config.h"
+#include "common/authentication.h"
 
 
 
@@ -607,3 +608,191 @@
 
 	e_cal_component_free_datetime (&olddate);
 }
+
+static gboolean
+update_single_object (ECal *client, icalcomponent *icalcomp, gboolean fail_on_modify)
+{
+	const char *uid;
+	char *tmp;
+	icalcomponent *tmp_icalcomp;
+	gboolean res;
+
+	uid = icalcomponent_get_uid (icalcomp);
+
+	if (e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL)) {
+		if (fail_on_modify)
+			return FALSE;
+
+		return e_cal_modify_object (client, icalcomp, CALOBJ_MOD_ALL, NULL);
+	}
+
+	tmp = NULL;
+	res = e_cal_create_object (client, icalcomp, &tmp, NULL);
+
+	g_free (tmp);
+
+	return res;
+}
+
+static gboolean
+update_objects (ECal *client, icalcomponent *icalcomp)
+{
+	icalcomponent *subcomp;
+	icalcomponent_kind kind;
+
+	kind = icalcomponent_isa (icalcomp);
+	if (kind == ICAL_VTODO_COMPONENT || 
+	    kind == ICAL_VEVENT_COMPONENT ||
+	    kind == ICAL_VJOURNAL_COMPONENT)
+		return update_single_object (client, icalcomp, kind == ICAL_VJOURNAL_COMPONENT);
+	else if (kind != ICAL_VCALENDAR_COMPONENT)
+		return FALSE;
+
+	subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
+	while (subcomp) {
+		gboolean success;
+
+		kind = icalcomponent_isa (subcomp);
+		if (kind == ICAL_VTIMEZONE_COMPONENT) {
+			icaltimezone *zone;
+
+			zone = icaltimezone_new ();
+			icaltimezone_set_component (zone, subcomp);
+
+			success = e_cal_add_timezone (client, zone, NULL);
+			icaltimezone_free (zone, 1);
+			if (!success)
+				return success;
+		} else if (kind == ICAL_VTODO_COMPONENT ||
+			   kind == ICAL_VEVENT_COMPONENT ||
+			   kind == ICAL_VJOURNAL_COMPONENT) {
+			success = update_single_object (client, subcomp, kind == ICAL_VJOURNAL_COMPONENT);
+			if (!success)
+				return success;
+		}
+
+		subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT);
+	}
+
+	return TRUE;
+}
+
+/**
+ * cal_comp_process_source_list_drop:
+ * Processes the drop signal over the ESourceList.
+ * @param destination Where to put the component.
+ * @param comp Component to move/copy.
+ * @param action What to do.
+ * @param source_uid Where the component comes from; used when moving.
+ * @param source_list The ESourceList over which the event was called.
+ * @return Whether was the operation successful.
+ **/
+gboolean
+cal_comp_process_source_list_drop (ECal *destination, icalcomponent *comp, GdkDragAction action, const char *source_uid, ESourceList *source_list)
+{
+	const char * uid;
+	char *old_uid = NULL;
+	icalcomponent *tmp_icalcomp = NULL;
+	GError *error = NULL;
+	gboolean success = FALSE;
+
+	g_return_val_if_fail (destination != NULL, FALSE);
+	g_return_val_if_fail (comp != NULL, FALSE);
+	g_return_val_if_fail (source_uid != NULL, FALSE);
+	g_return_val_if_fail (source_list != NULL, FALSE);
+
+	/* FIXME deal with GDK_ACTION_ASK */
+	if (action == GDK_ACTION_COPY) {
+		char *tmp;
+
+		old_uid = g_strdup (icalcomponent_get_uid (comp));
+		tmp = e_cal_component_gen_uid ();
+
+		icalcomponent_set_uid (comp, tmp);
+		g_free (tmp);
+	}
+
+	uid = icalcomponent_get_uid (comp);
+	if (!old_uid)
+		old_uid = g_strdup (uid);
+
+	if (!e_cal_get_object (destination, uid, NULL, &tmp_icalcomp, &error)) {
+		if ((error != NULL) && (error->code != E_CALENDAR_STATUS_OBJECT_NOT_FOUND)) {
+			switch (e_cal_get_source_type (destination)) {
+			case E_CAL_SOURCE_TYPE_EVENT:
+				g_message ("Failed to search the object in destination event list: %s", error->message);
+				break;
+			case E_CAL_SOURCE_TYPE_TODO:
+				g_message ("Failed to search the object in destination task list: %s", error->message);
+				break;
+			case E_CAL_SOURCE_TYPE_JOURNAL:
+				g_message ("Failed to search the object in destination memo list: %s", error->message);
+				break;
+			default:
+				break;
+			}
+		} else {
+			/* this will report success by last item, but we don't care */
+			success = update_objects (destination, comp);
+
+			if (success && action == GDK_ACTION_MOVE) {
+				/* remove components rather here, because we know which has been moved */
+				ESource *source_source;
+				ECal *source_client;
+
+				source_source = e_source_list_peek_source_by_uid (source_list, source_uid);
+
+				if (source_source && !E_IS_SOURCE_GROUP (source_source) && !e_source_get_readonly (source_source)) {
+					source_client = auth_new_cal_from_source (source_source, e_cal_get_source_type (destination));
+
+					if (source_client) {
+						gboolean read_only = TRUE;
+
+						e_cal_is_read_only (source_client, &read_only, NULL);
+
+						if (!read_only && e_cal_open (source_client, TRUE, NULL))
+							e_cal_remove_object (source_client, old_uid, NULL);
+						else if (!read_only) {
+							switch (e_cal_get_source_type (destination)) {
+							case E_CAL_SOURCE_TYPE_EVENT:
+								g_message ("Cannot open source client to remove old event");
+								break;
+							case E_CAL_SOURCE_TYPE_TODO:
+								g_message ("Cannot open source client to remove old task");
+								break;
+							case E_CAL_SOURCE_TYPE_JOURNAL:
+								g_message ("Cannot open source client to remove old memo");
+								break;
+							default:
+								break;
+							}
+						}
+
+						g_object_unref (source_client);
+					} else {
+						switch (e_cal_get_source_type (destination)) {
+						case E_CAL_SOURCE_TYPE_EVENT:
+							g_message ("Cannot create source client to remove old event");
+							break;
+						case E_CAL_SOURCE_TYPE_TODO:
+							g_message ("Cannot create source client to remove old task");
+							break;
+						case E_CAL_SOURCE_TYPE_JOURNAL:
+							g_message ("Cannot create source client to remove old memo");
+							break;
+						default:
+							break;
+						}
+					}
+				}
+			}
+		}
+
+		g_clear_error (&error);
+	} else
+		icalcomponent_free (tmp_icalcomp);
+
+	g_free (old_uid);
+
+	return success;
+}

Modified: branches/kill-bonobo/calendar/gui/comp-util.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/comp-util.h	(original)
+++ branches/kill-bonobo/calendar/gui/comp-util.h	Sat Jan 31 19:03:12 2009
@@ -57,4 +57,6 @@
 void cal_comp_set_dtstart_with_oldzone (ECal *client, ECalComponent *comp, const ECalComponentDateTime *pdate);
 void cal_comp_set_dtend_with_oldzone (ECal *client, ECalComponent *comp, const ECalComponentDateTime *pdate);
 
+gboolean cal_comp_process_source_list_drop (ECal *destination, icalcomponent *comp, GdkDragAction action, const char *source_uid, ESourceList *source_list);
+
 #endif

Modified: branches/kill-bonobo/calendar/gui/dialogs/e-send-options-utils.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/e-send-options-utils.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/e-send-options-utils.c	Sat Jan 31 19:03:12 2009
@@ -192,7 +192,7 @@
 			icaltimezone *zone = calendar_config_get_icaltimezone ();
 			temp = icaltime_from_timet_with_zone (gopts->delay_until, FALSE, zone);
 
-			str = icaltime_as_ical_string (temp);
+			str = icaltime_as_ical_string_r (temp);
 			prop = icalproperty_new_x (str);
 			g_free (str);
 			icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-DELAY");

Modified: branches/kill-bonobo/calendar/gui/dialogs/event-editor.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-editor.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-editor.c	Sat Jan 31 19:03:12 2009
@@ -568,6 +568,8 @@
 		}
 
 		if (!(delegate && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) {
+			event_page_remove_all_attendees (priv->event_page);
+
 			for (l = attendees; l != NULL; l = l->next) {
 				ECalComponentAttendee *ca = l->data;
 				EMeetingAttendee *ia;

Modified: branches/kill-bonobo/calendar/gui/dialogs/event-page.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-page.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-page.c	Sat Jan 31 19:03:12 2009
@@ -1820,27 +1820,28 @@
 	client = comp_editor_get_client (editor);
 	flags = comp_editor_get_flags (editor);
 
-	if (flags & COMP_EDITOR_DELEGATE) {
-	   if (existing_attendee (ia, priv->comp))
-		   e_meeting_store_remove_attendee (priv->model, ia);
-	   else {
-		   if (!e_cal_get_static_capability (client,
-					   CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) {
-			   const char *delegator_id = e_meeting_attendee_get_delfrom (ia);
-			   EMeetingAttendee *delegator;
-
-			   delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL);
-			   e_meeting_attendee_set_delto (delegator,
-					   g_strdup (e_meeting_attendee_get_address (ia)));
-
-			   e_meeting_attendee_set_delfrom (ia, g_strdup_printf ("MAILTO:%s", delegator_id));
-			   gtk_widget_set_sensitive (priv->invite, FALSE);
-			   gtk_widget_set_sensitive (priv->add, FALSE);
-			   gtk_widget_set_sensitive (priv->edit, FALSE);
-		   }
-	   }
-}
+	if (!(flags & COMP_EDITOR_DELEGATE))
+		return;
+
+	if (existing_attendee (ia, priv->comp)) {
+		e_meeting_store_remove_attendee (priv->model, ia);
+	} else {
+		if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) {
+			const char *delegator_id = e_meeting_attendee_get_delfrom (ia);
+			EMeetingAttendee *delegator;
+
+			delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL);
+
+			g_return_if_fail (delegator != NULL);
 
+			e_meeting_attendee_set_delto (delegator, g_strdup (e_meeting_attendee_get_address (ia)));
+
+			e_meeting_attendee_set_delfrom (ia, g_strdup (delegator_id));
+			gtk_widget_set_sensitive (priv->invite, FALSE);
+			gtk_widget_set_sensitive (priv->add, FALSE);
+			gtk_widget_set_sensitive (priv->edit, FALSE);
+		}
+	}
 }
 
 /* Callbacks for list view*/
@@ -3250,3 +3251,23 @@
 	e_meeting_store_add_attendee (priv->model, attendee);
 	e_meeting_list_view_add_attendee_to_name_selector (E_MEETING_LIST_VIEW (priv->list_view), attendee);
 }
+
+/**
+ * event_page_remove_all_attendees
+ * Removes all attendees from the meeting store and name selector.
+ * @param epage EventPage.
+ **/
+void
+event_page_remove_all_attendees (EventPage *epage)
+{
+	EventPagePrivate *priv;
+
+	g_return_if_fail (epage != NULL);
+	g_return_if_fail (IS_EVENT_PAGE (epage));
+	
+	priv = epage->priv;
+
+	e_meeting_store_remove_all_attendees (priv->model);
+	e_meeting_list_view_remove_all_attendees_from_name_selector (E_MEETING_LIST_VIEW (priv->list_view));
+}
+

Modified: branches/kill-bonobo/calendar/gui/dialogs/event-page.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-page.h	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-page.h	Sat Jan 31 19:03:12 2009
@@ -108,6 +108,7 @@
 ENameSelector *	event_page_get_name_selector	(EventPage *epage);
 void		event_page_add_attendee		(EventPage *epage,
 						 EMeetingAttendee *attendee);
+void 		event_page_remove_all_attendees (EventPage *epage);
 
 G_END_DECLS
 

Modified: branches/kill-bonobo/calendar/gui/dialogs/task-page.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/task-page.c	(original)
+++ branches/kill-bonobo/calendar/gui/dialogs/task-page.c	Sat Jan 31 19:03:12 2009
@@ -1155,8 +1155,11 @@
 			EMeetingAttendee *delegator;
 
 			delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL);
+
+			g_return_if_fail (delegator != NULL);
+
 			e_meeting_attendee_set_delto (delegator,
-				   g_strdup (e_meeting_attendee_get_address (ia)));
+				g_strdup (e_meeting_attendee_get_address (ia)));
 
 			gtk_widget_set_sensitive (priv->invite, FALSE);
 			gtk_widget_set_sensitive (priv->add, FALSE);

Modified: branches/kill-bonobo/calendar/gui/e-cal-model.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-model.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-cal-model.c	Sat Jan 31 19:03:12 2009
@@ -1338,7 +1338,7 @@
 			gboolean has_rid = (id->rid && *id->rid);
 
 			uid = icalcomponent_get_uid (comp_data->icalcomp);
-			rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+			rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 
 			if (uid && *uid) {
 				if ((!client || comp_data->client == client) && !strcmp (id->uid, uid)) {
@@ -1677,10 +1677,10 @@
 
 try_again:		
 	if (!e_cal_get_query (client_data->client, priv->full_sexp, &client_data->query, &error)) {
-		if (error->code == E_CALENDAR_STATUS_BUSY && tries != 3) {
+		if (error->code == E_CALENDAR_STATUS_BUSY && tries != 10) {
 			tries++;
 			/*TODO chose an optimal value */
-			g_usleep (50);
+			g_usleep (500);
 			g_clear_error (&error);
 			goto try_again;	
 		}	

Modified: branches/kill-bonobo/calendar/gui/e-calendar-table.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-table.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-table.c	Sat Jan 31 19:03:12 2009
@@ -1298,7 +1298,7 @@
 	e_cal_util_add_timezones_from_component (cal_table->tmp_vcal, comp_data->icalcomp);
 
 	/* add the new component to the VCALENDAR component */
-	comp_str = icalcomponent_as_ical_string (comp_data->icalcomp);
+	comp_str = icalcomponent_as_ical_string_r (comp_data->icalcomp);
 	child = icalparser_parse_string (comp_str);
 	if (child) {
 		icalcomponent_add_component (cal_table->tmp_vcal,
@@ -1328,13 +1328,12 @@
 
 	etable = e_calendar_table_get_table (cal_table);
 	e_table_selected_row_foreach (etable, copy_row_cb, cal_table);
-	comp_str = icalcomponent_as_ical_string (cal_table->tmp_vcal);
+	comp_str = icalcomponent_as_ical_string_r (cal_table->tmp_vcal);
 	clipboard = gtk_widget_get_clipboard (GTK_WIDGET (cal_table), clipboard_atom);
 	if (!gtk_clipboard_set_with_data(clipboard, target_types, n_target_types,
 					 clipboard_get_calendar_cb,
 					 NULL, comp_str)) {
-		/* do not free this pointer, it owns libical */
-		/* g_free (comp_str); */
+		/* no-op */
 	} else {
 		gtk_clipboard_set_can_store (clipboard, target_types + 1, n_target_types - 1);
 	}

Modified: branches/kill-bonobo/calendar/gui/e-calendar-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-view.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-view.c	Sat Jan 31 19:03:12 2009
@@ -742,7 +742,7 @@
 
 	/* copy the VCALENDAR to the clipboard */
 	clipboard = gtk_widget_get_clipboard (GTK_WIDGET (cal_view), GDK_SELECTION_CLIPBOARD);
-	comp_str = icalcomponent_as_ical_string (vcal_comp);
+	comp_str = icalcomponent_as_ical_string_r (vcal_comp);
 
 	if (!gtk_clipboard_set_with_data (clipboard, target_types, n_target_types,
 					  clipboard_get_calendar_cb,
@@ -1367,7 +1367,7 @@
 			struct icaltimetype recur_id = icalcomponent_get_recurrenceid (event->comp_data->icalcomp);
 
 			if (!icaltime_is_null_time (recur_id))
-				rid = icaltime_as_ical_string (recur_id);
+				rid = icaltime_as_ical_string_r (recur_id);
 
 			e_cal_remove_object_with_mod (event->comp_data->client, uid, rid, CALOBJ_MOD_ALL, NULL);
 			g_free (rid);
@@ -1922,7 +1922,7 @@
 
 	/* We either need rounding or don't want to set all_day for this, we will rather use actual */
 	/* time in this cases; dtstart should be a midnight in this case */
-	if (do_rounding || (!all_day && (dtend - dtstart) % (60 * 60 * 24) == 0)) {
+	if (do_rounding || (!all_day && (dtend - dtstart) == (60 * 60 * 24))) {
 		struct tm local = *localtime (&now);
 		int time_div = calendar_config_get_time_divisions ();
 		int hours, mins;
@@ -2168,7 +2168,7 @@
 	char *res = NULL;
 	int i;
 
-	if (!comp || !e_cal_component_has_attendees (comp) || !itip_organizer_is_user (comp, client))
+	if (!comp || !e_cal_component_has_attendees (comp) || !itip_organizer_is_user_ex (comp, client, TRUE))
 		return NULL;
 
 	e_cal_component_get_attendee_list (comp, &attendees);
@@ -2409,7 +2409,7 @@
 	for (property = icalcomponent_get_first_property (icalcomp, ICAL_CATEGORIES_PROPERTY);
 	     property != NULL;
 	     property = icalcomponent_get_next_property (icalcomp, ICAL_CATEGORIES_PROPERTY)) {
-		char *value = icalproperty_get_value_as_string (property);
+		char *value = icalproperty_get_value_as_string_r (property);
 
 		if (value && strcmp (category, value) == 0){
 			g_free (value);

Modified: branches/kill-bonobo/calendar/gui/e-day-view-main-item.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-day-view-main-item.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-day-view-main-item.c	Sat Jan 31 19:03:12 2009
@@ -602,7 +602,7 @@
 	GdkGC *gc;
 	GdkColor bg_color;
 	ECalComponent *comp;
-	gint num_icons, icon_x, icon_y, icon_x_inc, icon_y_inc;
+	gint num_icons, icon_x, icon_y, icon_x_inc = 0, icon_y_inc = 0;
 	gint max_icon_w, max_icon_h;
 	gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon, draw_meeting_icon;
 	gboolean draw_attach_icon;
@@ -995,92 +995,6 @@
 	else if (bar_y2 < scroll_flag)
 		event->end_minute -= day_view->mins_per_row;
 
-	if (!short_event)
-	{
-		if (event->start_minute % day_view->mins_per_row != 0
-			|| (day_view->show_event_end_times
-		    	&& event->end_minute % day_view->mins_per_row != 0)) {
-				offset = day_view->first_hour_shown * 60
-				+ day_view->first_minute_shown;
-				show_span = TRUE;
-			} else {
-				offset = 0;
-		}
-		start_minute = offset + event->start_minute;
-		end_minute = offset + event->end_minute;
-
-		format_time = (((end_minute - start_minute)/day_view->mins_per_row) >= 2) ? TRUE : FALSE;
-
-		start_hour = start_minute / 60;
-		start_minute = start_minute % 60;
-
-		end_hour = end_minute / 60;
-		end_minute = end_minute % 60;
-
-		e_day_view_convert_time_to_display (day_view, start_hour,
-						    &start_display_hour,
-						    &start_suffix,
-						    &start_suffix_width);
-		e_day_view_convert_time_to_display (day_view, end_hour,
-						    &end_display_hour,
-						    &end_suffix,
-						    &end_suffix_width);
-
-		if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
-			if (day_view->show_event_end_times && show_span) {
-				/* 24 hour format with end time. */
-				text = g_strdup_printf
-					("%2i:%02i-%2i:%02i",
-					 start_display_hour, start_minute,
-					 end_display_hour, end_minute);
-			} else {
-				if (format_time) {
-				/* 24 hour format without end time. */
-				text = g_strdup_printf
-					("%2i:%02i",
-					 start_display_hour, start_minute);
-				}
-			}
-		} else {
-			if (day_view->show_event_end_times && show_span) {
-				/* 12 hour format with end time. */
-				text = g_strdup_printf
-					("%2i:%02i%s-%2i:%02i%s",
-					 start_display_hour, start_minute,
-					 start_suffix,
-					 end_display_hour, end_minute, end_suffix);
-			} else {
-				/* 12 hour format without end time. */
-				text = g_strdup_printf
-					("%2i:%02i%s",
-					 start_display_hour, start_minute,
-					 start_suffix);
-			}
-		}
-
-		cairo_save (cr);
-		cairo_rectangle (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 1.75, item_y + 2.75,
-			item_w - E_DAY_VIEW_BAR_WIDTH - 4.5,
-			14);
-		cairo_clip (cr);
-		cairo_new_path (cr);
-		if (resize_flag)
-			cairo_move_to (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 10, item_y + 13);
-		else
-			cairo_move_to (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 14, item_y + 13);
-		if ((red/cc > 0.7) || (green/cc > 0.7) || (blue/cc > 0.7 ))
-			cairo_set_source_rgb (cr, 0, 0, 0);
-		else
-			cairo_set_source_rgb (cr, 1, 1, 1);
-		cairo_set_font_size (cr, 14.0);
-		cairo_set_font_options (cr, font_options);
-		cairo_show_text (cr, text);
-		cairo_close_path (cr);
-		cairo_restore (cr);
-	}
-
-	if (font_options)
-		cairo_font_options_destroy (font_options);
 
 	comp = e_cal_component_new ();
 	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -1298,6 +1212,98 @@
 		e_cal_component_free_categories_list (categories_list);
 	}
 
+	if (!short_event)
+	{
+		if (event->start_minute % day_view->mins_per_row != 0
+			|| (day_view->show_event_end_times
+		    	&& event->end_minute % day_view->mins_per_row != 0)) {
+				offset = day_view->first_hour_shown * 60
+				+ day_view->first_minute_shown;
+				show_span = TRUE;
+			} else {
+				offset = 0;
+		}
+		start_minute = offset + event->start_minute;
+		end_minute = offset + event->end_minute;
+
+		format_time = (((end_minute - start_minute)/day_view->mins_per_row) >= 2) ? TRUE : FALSE;
+
+		start_hour = start_minute / 60;
+		start_minute = start_minute % 60;
+
+		end_hour = end_minute / 60;
+		end_minute = end_minute % 60;
+
+		e_day_view_convert_time_to_display (day_view, start_hour,
+						    &start_display_hour,
+						    &start_suffix,
+						    &start_suffix_width);
+		e_day_view_convert_time_to_display (day_view, end_hour,
+						    &end_display_hour,
+						    &end_suffix,
+						    &end_suffix_width);
+
+		if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
+			if (day_view->show_event_end_times && show_span) {
+				/* 24 hour format with end time. */
+				text = g_strdup_printf
+					("%2i:%02i-%2i:%02i",
+					 start_display_hour, start_minute,
+					 end_display_hour, end_minute);
+			} else {
+				if (format_time) {
+				/* 24 hour format without end time. */
+				text = g_strdup_printf
+					("%2i:%02i",
+					 start_display_hour, start_minute);
+				}
+			}
+		} else {
+			if (day_view->show_event_end_times && show_span) {
+				/* 12 hour format with end time. */
+				text = g_strdup_printf
+					("%2i:%02i%s-%2i:%02i%s",
+					 start_display_hour, start_minute,
+					 start_suffix,
+					 end_display_hour, end_minute, end_suffix);
+			} else {
+				/* 12 hour format without end time. */
+				text = g_strdup_printf
+					("%2i:%02i%s",
+					 start_display_hour, start_minute,
+					 start_suffix);
+			}
+		}
+
+		cairo_save (cr);
+		cairo_rectangle (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 1.75, item_y + 2.75,
+			item_w - E_DAY_VIEW_BAR_WIDTH - 4.5,
+			14);
+
+		cairo_clip (cr);
+		cairo_new_path (cr);
+
+		if (icon_x_inc == 0)
+			icon_x += 14;
+
+		if (resize_flag)
+			cairo_move_to (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 10, item_y + 13);
+		else
+			cairo_move_to (cr, icon_x, item_y + 13);
+		if ((red/cc > 0.7) || (green/cc > 0.7) || (blue/cc > 0.7 ))
+			cairo_set_source_rgb (cr, 0, 0, 0);
+		else
+			cairo_set_source_rgb (cr, 1, 1, 1);
+		cairo_set_font_size (cr, 14.0);
+		cairo_set_font_options (cr, font_options);
+		cairo_show_text (cr, text);
+		cairo_close_path (cr);
+		cairo_restore (cr);
+	}
+
+	if (font_options)
+		cairo_font_options_destroy (font_options);
+
 	g_free (text);
 	g_object_unref (comp);
 	cairo_destroy (cr);

Modified: branches/kill-bonobo/calendar/gui/e-day-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-day-view.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-day-view.c	Sat Jan 31 19:03:12 2009
@@ -565,7 +565,7 @@
 
 		prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY);
 		if (prop)
-			rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+			rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 	}
 
 	if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num))
@@ -659,7 +659,7 @@
 
 			prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY);
 			if (prop)
-				rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+				rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 		}
 
 		if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num))
@@ -1994,7 +1994,7 @@
 			u = icalcomponent_get_uid (event->comp_data->icalcomp);
 			if (u && !strcmp (uid, u)) {
 				if (rid && *rid) {
-					r = icaltime_as_ical_string (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
+					r = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
 					if (!r || !*r)
 						continue;
 					if (strcmp (rid, r) != 0) {
@@ -4589,7 +4589,7 @@
 
 		e_day_view_reshape_day_event (day_view, day, event_num);
 		event = &g_array_index (day_view->events[day], EDayViewEvent, event_num);
-		current_comp_string = icalcomponent_as_ical_string (event->comp_data->icalcomp);
+		current_comp_string = icalcomponent_as_ical_string_r (event->comp_data->icalcomp);
 		if (day_view->last_edited_comp_string == NULL) {
 			g_free (current_comp_string);
 			continue;
@@ -7373,10 +7373,20 @@
 		e_cal_util_add_timezones_from_component (vcal, event->comp_data->icalcomp);
 		icalcomponent_add_component (vcal, icalcomponent_new_clone (event->comp_data->icalcomp));
 
-		comp_str = icalcomponent_as_ical_string (vcal);
+		comp_str = icalcomponent_as_ical_string_r (vcal);
 		if (comp_str) {
+			ESource *source = e_cal_get_source (event->comp_data->client);
+			const char *source_uid = e_source_peek_uid (source);
+			char *tmp;
+
+			if (!source_uid)
+				source_uid = "";
+
+			tmp = g_strconcat (source_uid, "\n", comp_str, NULL);
 			gtk_selection_data_set (selection_data, selection_data->target,
-						8, (unsigned char *)comp_str, strlen (comp_str));
+						8, (unsigned char *)tmp, strlen (tmp));
+
+			g_free (tmp);
 		}
 
 		icalcomponent_free (vcal);

Modified: branches/kill-bonobo/calendar/gui/e-itip-control.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-itip-control.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-itip-control.c	Sat Jan 31 19:03:12 2009
@@ -1950,7 +1950,7 @@
 	 * and you then look at it in Outlook).
 	 */
 	stamp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
-	str = icaltime_as_ical_string (stamp);
+	str = icaltime_as_ical_string_r (stamp);
 	prop = icalproperty_new_x (str);
 	g_free (str);
 	icalproperty_set_x_name (prop, "X-MICROSOFT-CDO-REPLYTIME");

Modified: branches/kill-bonobo/calendar/gui/e-meeting-list-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-meeting-list-view.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-meeting-list-view.c	Sat Jan 31 19:03:12 2009
@@ -296,10 +296,8 @@
 			}
 		} else {
 			attendee = e_destination_get_email (des);
-
 			if (madd && attendee && g_str_equal (madd, attendee)) {
-			attendee = e_destination_get_email (des);
-			e_destination_store_remove_destination (destination_store, des);
+				e_destination_store_remove_destination (destination_store, des);
 			}
 		}
 	}
@@ -307,6 +305,49 @@
 	g_list_free (destinations);
 }
 
+void
+e_meeting_list_view_remove_all_attendees_from_name_selector (EMeetingListView *view)
+{
+	ENameSelectorModel *name_selector_model;
+	EMeetingListViewPrivate *priv;
+	guint i;
+
+	priv = view->priv;
+
+	name_selector_model = e_name_selector_peek_model (priv->name_selector);
+
+	for (i = 0; sections[i] != NULL; i++) {
+		EDestinationStore *destination_store = NULL;
+		GList             *destinations = NULL, *l = NULL;
+
+		e_name_selector_model_peek_section (name_selector_model, sections[i],
+						    NULL, &destination_store);
+		if (!destination_store) {
+			g_warning ("destination store is NULL\n");
+			continue;
+		}
+
+		destinations = e_destination_store_list_destinations (destination_store);
+		for (l = destinations; l; l = g_list_next (l)) {
+			EDestination *des = l->data;
+
+			if (e_destination_is_evolution_list (des)) {
+				GList *m, *dl;
+
+				dl = (GList *)e_destination_list_get_dests (des);
+
+				for (m = dl; m; m = m->next) {
+					g_object_unref (m->data);
+					m = g_list_remove (m, l->data);
+				}
+			} else {
+				e_destination_store_remove_destination (destination_store, des);
+			}
+		}
+		g_list_free (destinations);
+	}
+}
+
 static void
 attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *addresses, GList *names, GtkTreeView *view)
 {
@@ -898,8 +939,12 @@
 
 		ma = e_meeting_store_find_attendee (store, email, &i);
 
-		if (ma)
-			e_meeting_store_remove_attendee (store, ma);
+		if (ma) {
+			if (e_meeting_attendee_get_edit_level (ma) != E_MEETING_ATTENDEE_EDIT_FULL)
+				g_warning ("Not enough rights to delete attendee: %s\n", e_meeting_attendee_get_address (ma));
+			else
+				e_meeting_store_remove_attendee (store, ma);
+		}
 	}
 
 	g_slist_free (la);

Modified: branches/kill-bonobo/calendar/gui/e-meeting-list-view.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-meeting-list-view.h	(original)
+++ branches/kill-bonobo/calendar/gui/e-meeting-list-view.h	Sat Jan 31 19:03:12 2009
@@ -64,6 +64,8 @@
 
 void       e_meeting_list_view_invite_others_dialog (EMeetingListView *emlv);
 void	   e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, EMeetingAttendee *ma);
+void	   e_meeting_list_view_remove_all_attendees_from_name_selector (EMeetingListView *view);
+
 void       e_meeting_list_view_add_attendee_to_name_selector (EMeetingListView *view, EMeetingAttendee *ma);
 void       e_meeting_list_view_set_editable (EMeetingListView *lview, gboolean set);
 ENameSelector * e_meeting_list_view_get_name_selector (EMeetingListView *lview);

Modified: branches/kill-bonobo/calendar/gui/e-meeting-store.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-meeting-store.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-meeting-store.c	Sat Jan 31 19:03:12 2009
@@ -780,7 +780,7 @@
 		gtk_tree_model_row_deleted (GTK_TREE_MODEL (store), path);
 		gtk_tree_path_free (path);
 
-		g_ptr_array_remove_index (store->priv->attendees, row);		
+		g_ptr_array_remove_index (store->priv->attendees, row);
 		g_object_unref (attendee);
 	}
 }
@@ -788,22 +788,20 @@
 void
 e_meeting_store_remove_all_attendees (EMeetingStore *store)
 {
-	gint i;
-	GtkTreePath *path = gtk_tree_path_new ();
-
-	gtk_tree_path_append_index (path, 0);
-
-	for (i = 0; i < store->priv->attendees->len; i++) {
-		EMeetingAttendee *attendee = g_ptr_array_index (store->priv->attendees, i);
+	gint i, j, k;
 
+	for (i = 0, j = e_meeting_store_count_actual_attendees (store), k = 0; i < j; i++) {
+	/* Always try to remove the attendee at index 0 since it is the only one that will
+	 * continue to exist until all attendees are removed. */
+		EMeetingAttendee *attendee = g_ptr_array_index (store->priv->attendees, k);
+		GtkTreePath *path = gtk_tree_path_new ();
+		gtk_tree_path_append_index (path, k);
 		gtk_tree_model_row_deleted (GTK_TREE_MODEL (store), path);
-		gtk_tree_path_next (path);
+		gtk_tree_path_free (path);
 
+		g_ptr_array_remove_index (store->priv->attendees, k);
 		g_object_unref (attendee);
 	}
-
-	g_ptr_array_set_size (store->priv->attendees, 0);
-	gtk_tree_path_free (path);
 }
 
 EMeetingAttendee *

Modified: branches/kill-bonobo/calendar/gui/e-memo-table.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-memo-table.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-memo-table.c	Sat Jan 31 19:03:12 2009
@@ -1009,7 +1009,7 @@
 	e_cal_util_add_timezones_from_component (memo_table->tmp_vcal, comp_data->icalcomp);
 
 	/* add the new component to the VCALENDAR component */
-	comp_str = icalcomponent_as_ical_string (comp_data->icalcomp);
+	comp_str = icalcomponent_as_ical_string_r (comp_data->icalcomp);
 	child = icalparser_parse_string (comp_str);
 	if (child) {
 		icalcomponent_add_component (memo_table->tmp_vcal,
@@ -1039,13 +1039,12 @@
 
 	etable = e_memo_table_get_table (memo_table);
 	e_table_selected_row_foreach (etable, copy_row_cb, memo_table);
-	comp_str = icalcomponent_as_ical_string (memo_table->tmp_vcal);
+	comp_str = icalcomponent_as_ical_string_r (memo_table->tmp_vcal);
 	clipboard = gtk_widget_get_clipboard (GTK_WIDGET (memo_table), clipboard_atom);
 	if (!gtk_clipboard_set_with_data(clipboard, target_types, n_target_types,
 					 clipboard_get_calendar_cb,
 					 NULL, comp_str)) {
-		/* do not free this pointer, it owns libical */
-		/* g_free (comp_str); */
+		/* no-op */
 	} else {
 		gtk_clipboard_set_can_store (clipboard, target_types + 1, n_target_types - 1);
 	}

Modified: branches/kill-bonobo/calendar/gui/e-tasks.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-tasks.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-tasks.c	Sat Jan 31 19:03:12 2009
@@ -189,7 +189,7 @@
 		e_cal_util_add_timezones_from_component (vcal, comp_data->icalcomp);
 		icalcomponent_add_component (vcal, icalcomponent_new_clone (comp_data->icalcomp));
 
-		comp_str = icalcomponent_as_ical_string (vcal);
+		comp_str = icalcomponent_as_ical_string_r (vcal);
 		if (comp_str) {
 			ESource *source = e_cal_get_source (comp_data->client);
 			const char *source_uid = e_source_peek_uid (source);

Modified: branches/kill-bonobo/calendar/gui/e-week-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-week-view.c	(original)
+++ branches/kill-bonobo/calendar/gui/e-week-view.c	Sat Jan 31 19:03:12 2009
@@ -351,7 +351,7 @@
 
 		prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY);
 		if (prop)
-			rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+			rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 	}
 
 	if (e_week_view_find_event_from_uid (week_view, comp_data->client, uid, rid, &event_num))
@@ -441,7 +441,7 @@
 
 			prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY);
 			if (prop)
-				rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+				rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
 		}
 
 		if (e_week_view_find_event_from_uid (week_view, comp_data->client, uid, rid, &event_num))
@@ -2566,7 +2566,7 @@
 							span_num);
 			if (week_view->last_edited_comp_string == NULL)
 				continue;
-			current_comp_string = icalcomponent_as_ical_string (event->comp_data->icalcomp);
+			current_comp_string = icalcomponent_as_ical_string_r (event->comp_data->icalcomp);
 			if (strncmp (current_comp_string, week_view->last_edited_comp_string,50) == 0) {
 				EWeekViewEventSpan *span;
 				span = &g_array_index (week_view->spans, EWeekViewEventSpan, event->spans_index + span_num);
@@ -3718,7 +3718,7 @@
 		u = icalcomponent_get_uid (event->comp_data->icalcomp);
 		if (u && !strcmp (uid, u)) {
 			if (rid && *rid) {
-				r = icaltime_as_ical_string (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
+				r = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
 				if (!r || !*r)
 					continue;
 				if (strcmp (rid, r) != 0) {

Modified: branches/kill-bonobo/calendar/gui/gnome-cal.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/gnome-cal.c	(original)
+++ branches/kill-bonobo/calendar/gui/gnome-cal.c	Sat Jan 31 19:03:12 2009
@@ -756,10 +756,10 @@
 		old_query = NULL;
 		if (!e_cal_get_query ((ECal *) l->data, real_sexp, &old_query, &error)) {
 			/* If calendar is busy try again for 3 times. */
-			if (error->code == E_CALENDAR_STATUS_BUSY && tries != 3) {
+			if (error->code == E_CALENDAR_STATUS_BUSY && tries != 10) {
 				tries++;
 				/*TODO chose an optimal value */
-				g_usleep (50);
+				g_usleep (500);
 				
 				g_clear_error (&error);
 				goto try_again;	
@@ -3162,7 +3162,7 @@
 					struct icaltimetype recur_id = icalcomponent_get_recurrenceid (m->data);
 
 					if (!icaltime_is_null_time (recur_id) )
-						rid = icaltime_as_ical_string (recur_id);
+						rid = icaltime_as_ical_string_r (recur_id);
 
 					e_cal_remove_object_with_mod (client, uid, rid, CALOBJ_MOD_ALL, &error);
 					g_free (rid);

Modified: branches/kill-bonobo/calendar/gui/itip-utils.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/itip-utils.c	(original)
+++ branches/kill-bonobo/calendar/gui/itip-utils.c	Sat Jan 31 19:03:12 2009
@@ -82,13 +82,13 @@
 }
 
 gboolean
-itip_organizer_is_user (ECalComponent *comp, ECal *client)
+itip_organizer_is_user_ex (ECalComponent *comp, ECal *client, gboolean skip_cap_test)
 {
 	ECalComponentOrganizer organizer;
 	const char *strip;
 	gboolean user_org = FALSE;
 
-	if (!e_cal_component_has_organizer (comp) || e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_ORGANIZER))
+	if (!e_cal_component_has_organizer (comp) || (!skip_cap_test && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_ORGANIZER)))
 		return FALSE;
 
 	e_cal_component_get_organizer (comp, &organizer);
@@ -116,6 +116,12 @@
 }
 
 gboolean
+itip_organizer_is_user (ECalComponent *comp, ECal *client)
+{
+	return itip_organizer_is_user_ex (comp, client, FALSE);
+}
+
+gboolean
 itip_sentby_is_user (ECalComponent *comp)
 {
 	ECalComponentOrganizer organizer;
@@ -858,7 +864,7 @@
 			continue;
 		}
 
-		attendee = icalproperty_get_value_as_string (prop);
+		attendee = icalproperty_get_value_as_string_r (prop);
 		if (!attendee)
 			continue;
 
@@ -1254,7 +1260,7 @@
 	content_type = comp_content_type (comp, method);
 
 	top_level = comp_toplevel_with_zones (method, comp, client, zones);
-	ical_string = icalcomponent_as_ical_string (top_level);
+	ical_string = icalcomponent_as_ical_string_r (top_level);
 
 	if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_EVENT) {
 		e_msg_composer_set_body (composer, ical_string, content_type);
@@ -1358,7 +1364,7 @@
 	e_destination_freev (destinations);
 
 	top_level = comp_toplevel_with_zones (method, comp, client, zones);
-	ical_string = icalcomponent_as_ical_string (top_level);
+	ical_string = icalcomponent_as_ical_string_r (top_level);
 
 	if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_EVENT){
 
@@ -1668,7 +1674,7 @@
 	}
 
 	soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
-	ical_string = icalcomponent_as_ical_string (toplevel);
+	ical_string = icalcomponent_as_ical_string_r (toplevel);
 	soup_message_set_request (msg, "text/calendar", SOUP_MEMORY_TEMPORARY,
 				  ical_string, strlen (ical_string));
 

Modified: branches/kill-bonobo/calendar/gui/itip-utils.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/itip-utils.h	(original)
+++ branches/kill-bonobo/calendar/gui/itip-utils.h	Sat Jan 31 19:03:12 2009
@@ -51,6 +51,7 @@
 EAccount *itip_addresses_get_default (void);
 
 gboolean itip_organizer_is_user (ECalComponent *comp, ECal *client);
+gboolean itip_organizer_is_user_ex (ECalComponent *comp, ECal *client, gboolean skip_cap_test);
 gboolean itip_sentby_is_user (ECalComponent *comp);
 
 const gchar *itip_strip_mailto (const gchar *address);

Modified: branches/kill-bonobo/calendar/gui/memos-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/memos-component.c	(original)
+++ branches/kill-bonobo/calendar/gui/memos-component.c	Sat Jan 31 19:03:12 2009
@@ -158,67 +158,6 @@
 /* Evolution::Component CORBA methods */
 
 static gboolean
-update_single_object (ECal *client, icalcomponent *icalcomp, gboolean fail_on_modify)
-{
-	char *uid;
-	icalcomponent *tmp_icalcomp;
-
-	d(g_message("memos-component.c: update_single_object called");)
-
-	uid = (char *) icalcomponent_get_uid (icalcomp);
-
-	if (e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL)) {
-		if (fail_on_modify)
-			return FALSE;
-		else
-			return e_cal_modify_object (client, icalcomp, CALOBJ_MOD_ALL, NULL);
-	}
-
-	return e_cal_create_object (client, icalcomp, &uid, NULL);
-}
-
-static gboolean
-update_objects (ECal *client, icalcomponent *icalcomp)
-{
-	icalcomponent *subcomp;
-	icalcomponent_kind kind;
-
-	d(g_message("memos-component.c: update_objects called");)
-
-	kind = icalcomponent_isa (icalcomp);
-	if (kind == ICAL_VJOURNAL_COMPONENT)
-		return update_single_object (client, icalcomp, TRUE);
-	else if (kind != ICAL_VCALENDAR_COMPONENT)
-		return FALSE;
-
-	subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
-	while (subcomp) {
-		gboolean success;
-
-		kind = icalcomponent_isa (subcomp);
-		if (kind == ICAL_VTIMEZONE_COMPONENT) {
-			icaltimezone *zone;
-
-			zone = icaltimezone_new ();
-			icaltimezone_set_component (zone, subcomp);
-
-			success = e_cal_add_timezone (client, zone, NULL);
-			icaltimezone_free (zone, 1);
-			if (!success)
-				return success;
-		} else if (kind == ICAL_VJOURNAL_COMPONENT) {
-			success = update_single_object (client, subcomp, TRUE);
-			if (!success)
-				return success;
-		}
-
-		subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT);
-	}
-
-	return TRUE;
-}
-
-static gboolean
 selector_tree_data_dropped (ESourceSelector *selector,
                             GtkSelectionData *data,
                             ESource *destination,
@@ -238,11 +177,8 @@
 		goto  finish;
 
 	components = cal_comp_selection_get_string_list (data);
-	for (p = components; p; p = p->next) {
-		const char * uid;
-		char *old_uid = NULL;
-		icalcomponent *tmp_icalcomp = NULL;
-		GError *error = NULL;
+	success = components != NULL;
+	for (p = components; p && success; p = p->next) {
 		char *comp_str; /* do not free this! */
 
 		/* p->data is "source_uid\ncomponent_string" */
@@ -257,58 +193,10 @@
 		if (!icalcomp)
 			continue;
 
-		/* FIXME deal with GDK_ACTION_ASK */
-		if (action == GDK_ACTION_COPY) {
-			old_uid = g_strdup (icalcomponent_get_uid (icalcomp));
-			uid = e_cal_component_gen_uid ();
-			icalcomponent_set_uid (icalcomp, uid);
-		}
-
-		uid = icalcomponent_get_uid (icalcomp);
-		if (!old_uid)
-			old_uid = g_strdup (uid);
-
-		if (!e_cal_get_object (client, uid, NULL, &tmp_icalcomp, &error)) {
-			if ((error != NULL) && (error->code != E_CALENDAR_STATUS_OBJECT_NOT_FOUND))
-				g_message ("Failed to search the object in destination task list: %s",error->message);
-			else {
-				/* this will report success by last item, but we don't care */
-				success = update_objects (client, icalcomp);
-
-				if (success && action == GDK_ACTION_MOVE) {
-					/* remove components rather here, because we know which has been moved */
-					ESource *source_source;
-					ECal *source_client;
-
-					source_source = e_source_list_peek_source_by_uid (component->priv->source_list, p->data);
-
-					if (source_source && !E_IS_SOURCE_GROUP (source_source) && !e_source_get_readonly (source_source)) {
-						source_client = auth_new_cal_from_source (source_source, E_CAL_SOURCE_TYPE_JOURNAL);
-
-						if (source_client) {
-							gboolean read_only = TRUE;
-
-							e_cal_is_read_only (source_client, &read_only, NULL);
-
-							if (!read_only && e_cal_open (source_client, TRUE, NULL))
-								e_cal_remove_object (source_client, old_uid, NULL);
-							else if (!read_only)
-								g_message ("Cannot open source client to remove old memo");
-
-							g_object_unref (source_client);
-						} else
-							g_message ("Cannot create source client to remove old memo");
-					}
-				}
-			}
-
-			g_clear_error (&error);
-		} else
-			icalcomponent_free (tmp_icalcomp);
-
-		g_free (old_uid);
+		success = cal_comp_process_source_list_drop (client, icalcomp, action, p->data, component->priv->source_list);
 		icalcomponent_free (icalcomp);
 	}
+
 	g_slist_foreach (components, (GFunc)g_free, NULL);
 	g_slist_free (components);
 

Modified: branches/kill-bonobo/calendar/gui/print.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/print.c	(original)
+++ branches/kill-bonobo/calendar/gui/print.c	Sat Jan 31 19:03:12 2009
@@ -125,9 +125,9 @@
 
 /* The width of the small calendar months, the space from the right edge of
    the header rectangle, and the space between the months. */
-#define SMALL_MONTH_WIDTH	80
-#define SMALL_MONTH_PAD		4
-#define SMALL_MONTH_SPACING	12
+#define SMALL_MONTH_WIDTH	100
+#define SMALL_MONTH_PAD		5
+#define SMALL_MONTH_SPACING	20
 
 /* The minimum number of rows we leave space for for the long events in the
    day view. */
@@ -498,7 +498,7 @@
 	*x1 += 2;
 	*x2 -= 2;
 	*y2 += 2;
-	print_text (context, font, text, alignment, *x1, *x2, *y1, *y1 + size * 1.4);
+	print_text (context, font, text, alignment, *x1, *x2, *y1 + 1.0, *y1 + size * 1.4);
 	*y1 += size * 1.4;
 }
 
@@ -839,10 +839,10 @@
 		sprintf (buf, "%d", hour);
 		print_text (context, font_hour, buf, PANGO_ALIGN_RIGHT,
 			    left, hour_minute_x,
-			    y - yinc + yinc / 2, y - yinc + yinc / 2 + hour_font_size);
+			    y - yinc, y - yinc + hour_font_size);
 		print_text (context, font_minute, minute, PANGO_ALIGN_LEFT,
 			    hour_minute_x, left + width - 3,
-			    y - yinc + yinc / 2, y - yinc + yinc / 2 + minute_font_size);
+			    y - yinc, y - yinc + minute_font_size);
 
                 /* Draw the horizontal line between hours, across the entire
 		   width of the day view. */
@@ -2093,7 +2093,7 @@
 
 		/* Print the filled border around the header. */
 		print_border (context, 0.0, width,
-			      0.0, HEADER_HEIGHT + 2.0, 1.0, 0.9);
+			      0.0, HEADER_HEIGHT + 3.5, 1.0, 0.9);
 
 		/* Print the 2 mini calendar-months. */
 		l = width - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH * 2  - SMALL_MONTH_SPACING;
@@ -2178,14 +2178,14 @@
 	l = width - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH * 2
 		- SMALL_MONTH_SPACING;
 	print_month_small (context, gcal, when,
-			   l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 30,
+			   l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 10,
 			   DATE_MONTH | DATE_YEAR, when,
 			   time_add_week_with_zone (when, 1, zone), FALSE);
 
 	l += SMALL_MONTH_SPACING + SMALL_MONTH_WIDTH;
 	print_month_small (context, gcal,
 			   time_add_month_with_zone (when, 1, zone),
-			   l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 30,
+			   l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 10,
 			   DATE_MONTH | DATE_YEAR, when,
 			   time_add_week_with_zone (when, 1, zone), FALSE);
 
@@ -2211,6 +2211,7 @@
 	icaltimezone *zone = calendar_config_get_icaltimezone ();
 	char buf[100];
 	gdouble width, height;
+	double l;
 
 	setup = gtk_print_context_get_page_setup (context);
 
@@ -2221,17 +2222,19 @@
 	print_month_summary (context, gcal, date, 0.0, width, HEADER_HEIGHT, height);
 
 	/* Print the border around the header. */
-	print_border (context, 0.0, width, 0.0, HEADER_HEIGHT, 1.0, 0.9);
+	print_border (context, 0.0, width, 0.0, HEADER_HEIGHT + 10, 1.0, 0.9);
+
+	l = width - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH;
 
 	/* Print the 2 mini calendar-months. */
 	print_month_small (context, gcal,
 			   time_add_month_with_zone (date, 1, zone),
-			   width - width / 7 + 2, 4,
-			   width - 8, HEADER_HEIGHT,
+			   l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 4,
 			   DATE_MONTH | DATE_YEAR, 0, 0, FALSE);
+
 	print_month_small (context, gcal,
 			   time_add_month_with_zone (date, -1, zone),
-			   8, 4, width / 7 - 2, HEADER_HEIGHT,
+			   8, 4, width / 7 + 20, HEADER_HEIGHT + 4,
 			   DATE_MONTH | DATE_YEAR, 0, 0, FALSE);
 
 	/* Print the month, e.g. 'May 2001'. */

Modified: branches/kill-bonobo/calendar/gui/tasks-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/tasks-component.c	(original)
+++ branches/kill-bonobo/calendar/gui/tasks-component.c	Sat Jan 31 19:03:12 2009
@@ -355,60 +355,6 @@
 }
 
 static gboolean
-update_single_object (ECal *client, icalcomponent *icalcomp)
-{
-	char *uid;
-	icalcomponent *tmp_icalcomp;
-
-	uid = (char *) icalcomponent_get_uid (icalcomp);
-
-	if (e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL))
-		return e_cal_modify_object (client, icalcomp, CALOBJ_MOD_ALL, NULL);
-
-	return e_cal_create_object (client, icalcomp, &uid, NULL);
-}
-
-static gboolean
-update_objects (ECal *client, icalcomponent *icalcomp)
-{
-	icalcomponent *subcomp;
-	icalcomponent_kind kind;
-
-	kind = icalcomponent_isa (icalcomp);
-	if (kind == ICAL_VTODO_COMPONENT || kind == ICAL_VEVENT_COMPONENT)
-		return update_single_object (client, icalcomp);
-	else if (kind != ICAL_VCALENDAR_COMPONENT)
-		return FALSE;
-
-	subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
-	while (subcomp) {
-		gboolean success;
-
-		kind = icalcomponent_isa (subcomp);
-		if (kind == ICAL_VTIMEZONE_COMPONENT) {
-			icaltimezone *zone;
-
-			zone = icaltimezone_new ();
-			icaltimezone_set_component (zone, subcomp);
-
-			success = e_cal_add_timezone (client, zone, NULL);
-			icaltimezone_free (zone, 1);
-			if (!success)
-				return success;
-		} else if (kind == ICAL_VTODO_COMPONENT ||
-			   kind == ICAL_VEVENT_COMPONENT) {
-			success = update_single_object (client, subcomp);
-			if (!success)
-				return success;
-		}
-
-		subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT);
-	}
-
-	return TRUE;
-}
-
-static gboolean
 selector_tree_data_dropped (ESourceSelector *selector,
                             GtkSelectionData *data,
                             ESource *destination,
@@ -428,11 +374,8 @@
 		goto  finish;
 
 	components = cal_comp_selection_get_string_list (data);
-	for (p = components; p; p = p->next) {
-		const char * uid;
-		char *old_uid = NULL;
-		icalcomponent *tmp_icalcomp = NULL;
-		GError *error = NULL;
+	success = components != NULL;
+	for (p = components; p && success; p = p->next) {
 		char *comp_str; /* do not free this! */
 
 		/* p->data is "source_uid\ncomponent_string" */
@@ -447,56 +390,7 @@
 		if (!icalcomp)
 			continue;
 
-		/* FIXME deal with GDK_ACTION_ASK */
-		if (action == GDK_ACTION_COPY) {
-			old_uid = g_strdup (icalcomponent_get_uid (icalcomp));
-			uid = e_cal_component_gen_uid ();
-			icalcomponent_set_uid (icalcomp, uid);
-		}
-
-		uid = icalcomponent_get_uid (icalcomp);
-		if (!old_uid)
-			old_uid = g_strdup (uid);
-
-		if (!e_cal_get_object (client, uid, NULL, &tmp_icalcomp, &error)) {
-			if ((error != NULL) && (error->code != E_CALENDAR_STATUS_OBJECT_NOT_FOUND))
-				g_message ("Failed to search the object in destination task list: %s",error->message);
-			else {
-				/* this will report success by last item, but we don't care */
-				success = update_objects (client, icalcomp);
-
-				if (success && action == GDK_ACTION_MOVE) {
-					/* remove components rather here, because we know which has been moved */
-					ESource *source_source;
-					ECal *source_client;
-
-					source_source = e_source_list_peek_source_by_uid (component->priv->source_list, p->data);
-
-					if (source_source && !E_IS_SOURCE_GROUP (source_source) && !e_source_get_readonly (source_source)) {
-						source_client = auth_new_cal_from_source (source_source, E_CAL_SOURCE_TYPE_TODO);
-
-						if (source_client) {
-							gboolean read_only = TRUE;
-
-							e_cal_is_read_only (source_client, &read_only, NULL);
-
-							if (!read_only && e_cal_open (source_client, TRUE, NULL))
-								e_cal_remove_object (source_client, old_uid, NULL);
-							else if (!read_only)
-								g_message ("Cannot open source client to remove old task");
-
-							g_object_unref (source_client);
-						} else
-							g_message ("Cannot create source client to remove old task");
-					}
-				}
-			}
-
-			g_clear_error (&error);
-		} else
-			icalcomponent_free (tmp_icalcomp);
-
-		g_free (old_uid);
+		success = cal_comp_process_source_list_drop (client, icalcomp, action, p->data, component->priv->source_list);
 		icalcomponent_free (icalcomp);
 	}
 	g_slist_foreach (components, (GFunc)g_free, NULL);

Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-module.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-module.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-module.c	Sat Jan 31 19:03:12 2009
@@ -70,6 +70,7 @@
 	ESource *personal;
 	GSList *groups, *iter;
 	const gchar *data_dir;
+	const gchar *name;
 	gchar *base_uri;
 	gchar *filename;
 	gchar *property;
@@ -128,10 +129,15 @@
 			weather = source_group;
 	}
 
+	name = _("On This Computer");
+
 	if (on_this_computer != NULL) {
 		GSList *sources;
 		const gchar *group_base_uri;
 
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (on_this_computer, name);
+
 		sources = e_source_group_peek_sources (on_this_computer);
 		group_base_uri = e_source_group_peek_base_uri (on_this_computer);
 
@@ -167,21 +173,19 @@
 
 	} else {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("On This Computer");
 		source_group = e_source_group_new (name, base_uri);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
 	}
 
+	name = _("Personal");
+
 	if (personal == NULL) {
 		ESource *source;
 		GSList *selected;
-		const gchar *name;
 		gchar *primary;
 
-		name = _("Personal");
 		source = e_source_new (name, PERSONAL_RELATIVE_URI);
 		e_source_group_add_source (on_this_computer, source, -1);
 		g_object_unref (source);
@@ -202,21 +206,32 @@
 		g_slist_foreach (selected, (GFunc) g_free, NULL);
 		g_slist_free (selected);
 		g_free (primary);
+	} else {
+		/* Force the source name to the current locale. */
+		e_source_set_name (personal, name);
 	}
 
+	name = _("On The Web");
+
 	if (on_the_web == NULL) {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("On The Web");
 		source_group = e_source_group_new (name, WEB_BASE_URI);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
+	} else {
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (on_the_web, name);
 	}
 
+	name = _("Contacts");
+
 	if (contacts != NULL) {
 		GSList *sources;
 
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (contacts, name);
+
 		sources = e_source_group_peek_sources (contacts);
 
 		if (sources != NULL) {
@@ -239,9 +254,7 @@
 		}
 	} else {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("Contacts");
 		source_group = e_source_group_new (name, CONTACTS_BASE_URI);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
@@ -258,6 +271,8 @@
 		e_source_group_set_property (contacts, "create_source", "no");
 	g_free (property);
 
+	name = _("Birthdays & Anniversaries");
+
 	if (birthdays == NULL) {
 		ESource *source;
 		const gchar *name;
@@ -269,6 +284,9 @@
 
 		/* This is now a borrowed reference. */
 		birthdays = source;
+	} else {
+		/* Force the source name to the current locale. */
+		e_source_set_name (birthdays, name);
 	}
 
 	if (e_source_get_property (birthdays, "delete") == NULL)
@@ -277,14 +295,17 @@
 	if (e_source_peek_color_spec (birthdays) == NULL)
 		e_source_set_color_spec (birthdays, "#DDBECE");
 
+	name = _("Weather");
+
 	if (weather == NULL) {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("Weather");
 		source_group = e_source_group_new (name, WEATHER_BASE_URI);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
+	} else {
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (weather, name);
 	}
 
 	g_free (base_uri);

Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-module.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-module.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-module.c	Sat Jan 31 19:03:12 2009
@@ -63,6 +63,7 @@
 	ESource *personal;
 	GSList *groups, *iter;
 	const gchar *data_dir;
+	const gchar *name;
 	gchar *base_uri;
 	gchar *filename;
 
@@ -109,10 +110,15 @@
 			on_the_web = source_group;
 	}
 
+	name = _("On This Computer");
+
 	if (on_this_computer != NULL) {
 		GSList *sources;
 		const gchar *group_base_uri;
 
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (on_this_computer, name);
+
 		sources = e_source_group_peek_sources (on_this_computer);
 		group_base_uri = e_source_group_peek_base_uri (on_this_computer);
 
@@ -148,21 +154,19 @@
 
 	} else {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("On This Computer");
 		source_group = e_source_group_new (name, base_uri);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
 	}
 
+	name = _("Personal");
+
 	if (personal == NULL) {
 		ESource *source;
 		GSList *selected;
-		const gchar *name;
 		gchar *primary;
 
-		name = _("Personal");
 		source = e_source_new (name, PERSONAL_RELATIVE_URI);
 		e_source_group_add_source (on_this_computer, source, -1);
 		g_object_unref (source);
@@ -183,16 +187,22 @@
 		g_slist_foreach (selected, (GFunc) g_free, NULL);
 		g_slist_free (selected);
 		g_free (primary);
+	} else {
+		/* Force the source name to the current locale. */
+		e_source_set_name (personal, name);
 	}
 
+	name = _("On The Web");
+
 	if (on_the_web == NULL) {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("On The Web");
 		source_group = e_source_group_new (name, WEB_BASE_URI);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
+	} else {
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (on_the_web, name);
 	}
 
 	g_free (base_uri);

Modified: branches/kill-bonobo/calendar/modules/e-task-shell-module.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-module.c	(original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-module.c	Sat Jan 31 19:03:12 2009
@@ -63,6 +63,7 @@
 	ESource *personal;
 	GSList *groups, *iter;
 	const gchar *data_dir;
+	const gchar *name;
 	gchar *base_uri;
 	gchar *filename;
 
@@ -109,10 +110,15 @@
 			on_the_web = source_group;
 	}
 
+	name = _("On This Computer");
+
 	if (on_this_computer != NULL) {
 		GSList *sources;
 		const gchar *group_base_uri;
 
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (on_this_computer, name);
+
 		sources = e_source_group_peek_sources (on_this_computer);
 		group_base_uri = e_source_group_peek_base_uri (on_this_computer);
 
@@ -148,21 +154,20 @@
 
 	} else {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("On This Computer");
 		source_group = e_source_group_new (name, base_uri);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
 	}
 
+	name = _("Personal");
+
 	if (personal == NULL) {
 		ESource *source;
 		GSList *selected;
 		const gchar *name;
 		gchar *primary;
 
-		name = _("Personal");
 		source = e_source_new (name, PERSONAL_RELATIVE_URI);
 		e_source_group_add_source (on_this_computer, source, -1);
 		g_object_unref (source);
@@ -183,16 +188,22 @@
 		g_slist_foreach (selected, (GFunc) g_free, NULL);
 		g_slist_free (selected);
 		g_free (primary);
+	} else {
+		/* Force the source name to the current locale. */
+		e_source_set_name (personal, name);
 	}
 
+	name = _("On The Web");
+
 	if (on_the_web == NULL) {
 		ESourceGroup *source_group;
-		const gchar *name;
 
-		name = _("On The Web");
 		source_group = e_source_group_new (name, WEB_BASE_URI);
 		e_source_list_add_group (source_list, source_group, -1);
 		g_object_unref (source_group);
+	} else {
+		/* Force the group name to the current locale. */
+		e_source_group_set_name (on_the_web, name);
 	}
 
 	g_free (base_uri);

Modified: branches/kill-bonobo/configure.in
==============================================================================
--- branches/kill-bonobo/configure.in	(original)
+++ branches/kill-bonobo/configure.in	Sat Jan 31 19:03:12 2009
@@ -3,7 +3,7 @@
 
 m4_define([evo_major_version], [2])
 m4_define([evo_minor_version], [25])
-m4_define([evo_micro_version], [5])
+m4_define([evo_micro_version], [90])
 m4_define([evo_version],
           [evo_major_version.evo_minor_version.evo_micro_version])
 m4_define([evo_stable_version],
@@ -215,29 +215,26 @@
 AC_ARG_WITH([libiconv],
 	    AC_HELP_STRING([--with-libiconv=PATH],
 			   [Prefix where libiconv is installed]))
-case $withval in
-/*)
+if test -d $withval; then
 	ICONV_CFLAGS="-I$withval/include"
 	ICONV_LIBS="-L$withval/lib"
-	;;
-esac
+fi
 
 save_CFLAGS="$CFLAGS"
 save_LIBS="$LIBS"
 CFLAGS="$CFLAGS $ICONV_CFLAGS"
 LIBS="$LIBS $ICONV_LIBS -liconv"
 AC_CACHE_CHECK(for iconv in -liconv, ac_cv_libiconv,
-	       AC_TRY_RUN([
+	       AC_TRY_LINK([
 #include <iconv.h>
-#include <stdlib.h>
-
+#include <stdlib.h>],[
 int main (int argc, char **argv)
 {
         iconv_t cd;
         cd = iconv_open ("UTF-8", "ISO-8859-1");
         exit (0);
 }
-], [ac_cv_libiconv=yes], [ac_cv_libiconv=no], [ac_cv_libiconv=no]))
+], [ac_cv_libiconv=yes], [ac_cv_libiconv=no]))
 
 if test $ac_cv_libiconv = yes; then
         ICONV_LIBS="$ICONV_LIBS -liconv"
@@ -290,34 +287,48 @@
                 exit (1);
 
         exit (0);
-}], ac_cv_libiconv_utf8=yes, [ac_cv_libiconv_utf8=no; have_iconv=no], [ac_cv
-_libiconv_utf8=no; have_iconv=no]))
+}], ac_cv_libiconv_utf8=yes, [ac_cv_libiconv_utf8=no; have_iconv=no], [ac_cv_libiconv_utf8=hopefully]))
 fi
 
 if test "$have_iconv" = no; then
-        AC_MSG_ERROR([You need to install a working iconv implementation, su
-ch as ftp://ftp.gnu.org/pub/gnu/libiconv])
+        AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv])
 fi
 AC_SUBST(ICONV_CFLAGS)
 AC_SUBST(ICONV_LIBS)
 
 CFLAGS="$CFLAGS -I$srcdir"
 
-AC_MSG_CHECKING(preferred charset formats for system iconv)
+AC_MSG_CHECKING(preferred charset name formats for system iconv)
 AC_TRY_RUN([
 #define CONFIGURE_IN
 #include "iconv-detect.c"
 ],[
         AC_MSG_RESULT(found)
 ],[
-        AC_MSG_RESULT(not found)
-        AC_WARN([
-        *** The iconv-detect program was unable to determine the
-        *** preferred charset formats recognized by your system
-        *** iconv library. It is suggested that you install a
-        *** working iconv library such as the one found at
-        *** ftp://ftp.gnu.org/pub/gnu/libiconv
-        ])
+	AC_MSG_RESULT(not found)
+	AC_WARN([
+	*** The iconv-detect program was unable to determine the
+	*** preferred charset name formats recognized by your
+	*** iconv library. It is suggested that you install a
+	*** working iconv library such as the one found at
+	*** ftp://ftp.gnu.org/pub/gnu/libiconv
+])],[
+	if test x$os_win32 = xyes; then
+		AC_MSG_RESULT([using known win32 result])
+		echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h
+		echo  >>iconv-detect.h
+		echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h
+		echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h
+		echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h
+	else
+		AC_MSG_RESULT(unknown)
+		AC_WARN([
+	*** We can't determine the preferred charset name formats
+	*** recognized by your iconv library. You are
+	*** cross-compiling and supposed to know what you are doing.
+	*** Please construct the iconv-detect.h file manually.
+		])
+	fi
 ])
 
 CFLAGS="$save_CFLAGS"
@@ -326,20 +337,25 @@
 dnl alloca()
 AC_CHECK_HEADERS(alloca.h)
 
-dnl check for socklen_t (in Unix98)
-AC_MSG_CHECKING(for socklen_t)
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>
-socklen_t x;
-],[],[AC_MSG_RESULT(yes)],[
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>
-int accept (int, struct sockaddr *, size_t *);
-],[],[
-AC_MSG_RESULT(size_t)
-AC_DEFINE(socklen_t,size_t,[Define to appropriate type if socklen_t is not defined])], [
-AC_MSG_RESULT(int)
-AC_DEFINE(socklen_t,int)])])
+dnl waitpid() etc
+AC_CHECK_HEADERS(sys/wait.h)
+
+if test x$os_win32 != xyes; then
+	dnl check for socklen_t (in Unix98)
+	AC_MSG_CHECKING(for socklen_t)
+	AC_TRY_COMPILE([#include <sys/types.h>
+	#include <sys/socket.h>
+	socklen_t x;
+	],[],[AC_MSG_RESULT(yes)],[
+	AC_TRY_COMPILE([#include <sys/types.h>
+	#include <sys/socket.h>
+	int accept (int, struct sockaddr *, size_t *);
+	],[],[
+	AC_MSG_RESULT(size_t)
+	AC_DEFINE(socklen_t,size_t,[Define to appropriate type if socklen_t is not defined])], [
+	AC_MSG_RESULT(int)
+	AC_DEFINE(socklen_t,int)])])
+fi
 
 dnl
 dnl Purify support

Modified: branches/kill-bonobo/mail/em-format-html-display.c
==============================================================================
--- branches/kill-bonobo/mail/em-format-html-display.c	(original)
+++ branches/kill-bonobo/mail/em-format-html-display.c	Sat Jan 31 19:03:12 2009
@@ -2353,7 +2353,8 @@
 	EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)efh;
 	struct _EMFormatHTMLDisplayPrivate *priv = efhd->priv;
 
-	e_attachment_bar_refresh (E_ATTACHMENT_BAR (priv->attachment_bar));
+	if (priv->attachment_bar)
+		e_attachment_bar_refresh (E_ATTACHMENT_BAR (priv->attachment_bar));
 
 	return TRUE;
 }
@@ -2436,7 +2437,7 @@
 	EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *) emf;
 	const char *classid = "attachment-bar-refresh";
 
-	if (efhd->nobar || efhd->priv->updated || !efhd->priv->attachment_bar)
+	if (efhd->nobar || efhd->priv->updated)
 		return;
 
 	efhd->priv->files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);

Modified: branches/kill-bonobo/mail/em-format-html-print.c
==============================================================================
--- branches/kill-bonobo/mail/em-format-html-print.c	(original)
+++ branches/kill-bonobo/mail/em-format-html-print.c	Sat Jan 31 19:03:12 2009
@@ -52,7 +52,7 @@
 static void
 efhp_class_init (GObjectClass *class)
 {
-	parent_class = g_type_class_ref(EM_TYPE_FORMAT_HTML_PRINT);
+	parent_class = g_type_class_peek_parent (class);
 	class->finalize = efhp_finalize;
 }
 

Modified: branches/kill-bonobo/mail/em-format.c
==============================================================================
--- branches/kill-bonobo/mail/em-format.c	(original)
+++ branches/kill-bonobo/mail/em-format.c	Sat Jan 31 19:03:12 2009
@@ -1109,7 +1109,7 @@
 	camel_object_unref(filter_stream);
 	camel_stream_reset (mem_stream);
 
-	if (max == -1 || size < (max * 1024) || emf->composer) {
+	if (max == -1 || size == -1 || size < (max * 1024) || emf->composer) {
 		camel_stream_write_to_stream(mem_stream, (CamelStream *)stream);
 		camel_stream_flush((CamelStream *)stream);
 	} else {

Modified: branches/kill-bonobo/mail/message-list.c
==============================================================================
--- branches/kill-bonobo/mail/message-list.c	(original)
+++ branches/kill-bonobo/mail/message-list.c	Sat Jan 31 19:03:12 2009
@@ -41,6 +41,7 @@
 #include <camel/camel-folder.h>
 #include <camel/camel-folder-thread.h>
 #include <camel/camel-vee-folder.h>
+#include <camel/camel-string-utils.h>
 
 #include <libedataserver/e-memory.h>
 
@@ -4060,7 +4061,7 @@
 				   on the flag whether we can view deleted messages or not. */
 
 				if (!was_deleted || (was_deleted && !m->hidedel))
-					g_ptr_array_add (uids, g_strdup (looking_for));
+					g_ptr_array_add (uids, (gpointer) camel_pstring_strdup (looking_for));
 			}
 		}
 	}

Modified: branches/kill-bonobo/plugins/backup-restore/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/backup-restore/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/backup-restore/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -6,6 +6,7 @@
 	-DDATADIR=\""$(datadir)"\"			\
 	-DLIBDIR=\""$(libdir)"\"			\
 	-I$(top_srcdir)					\
+	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(SHELL_CFLAGS)					\
 	$(E_UTIL_CFLAGS)				
 
@@ -20,7 +21,8 @@
 liborg_gnome_backup_restore_la_SOURCES = backup-restore.c
 liborg_gnome_backup_restore_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 liborg_gnome_backup_restore_la_LIBADD =	\
-	$(EVOLUTION_MAIL_LIBS)
+	$(EVOLUTION_MAIL_LIBS) \
+	$(top_builddir)/e-util/libeutil.la
 
 privlibexec_PROGRAMS = evolution-backup
 evolution_backup_SOURCES = backup.c

Modified: branches/kill-bonobo/plugins/backup-restore/backup-restore.c
==============================================================================
--- branches/kill-bonobo/plugins/backup-restore/backup-restore.c	(original)
+++ branches/kill-bonobo/plugins/backup-restore/backup-restore.c	Sat Jan 31 19:03:12 2009
@@ -18,9 +18,16 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <unistd.h>
 #include <sys/types.h>
-#include <sys/wait.h>
+#ifdef HAVE_SYS_WAIT_H
+#  include <sys/wait.h>
+#endif
+#include <stdlib.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
@@ -71,9 +78,13 @@
 	result = system (command);
 	g_free (command);
 
+#ifdef HAVE_SYS_WAIT_H
 	g_message ("Sanity check result %d:%d %d", WIFEXITED (result), WEXITSTATUS (result), result);
 
 	return WIFEXITED (result) && (WEXITSTATUS (result) == 0);
+#else	
+	return result;
+#endif
 }
 
 static guint32

Modified: branches/kill-bonobo/plugins/backup-restore/backup.c
==============================================================================
--- branches/kill-bonobo/plugins/backup-restore/backup.c	(original)
+++ branches/kill-bonobo/plugins/backup-restore/backup.c	Sat Jan 31 19:03:12 2009
@@ -26,7 +26,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/wait.h>
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>

Modified: branches/kill-bonobo/plugins/bogo-junk-plugin/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/bogo-junk-plugin/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/bogo-junk-plugin/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -10,6 +10,9 @@
 
 liborg_gnome_bogo_junk_plugin_la_SOURCES = bf-junk-filter.c
 liborg_gnome_bogo_junk_plugin_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_bogo_junk_plugin_la_LIBADD =	\
+	$(GNOME_PLATFORM_LIBS) \
+	$(top_builddir)/e-util/libeutil.la
 
 schemadir       = $(GCONF_SCHEMA_FILE_DIR)
 schema_in_files = bogo-junk-plugin.schemas.in

Modified: branches/kill-bonobo/plugins/bogo-junk-plugin/bf-junk-filter.c
==============================================================================
--- branches/kill-bonobo/plugins/bogo-junk-plugin/bf-junk-filter.c	(original)
+++ branches/kill-bonobo/plugins/bogo-junk-plugin/bf-junk-filter.c	Sat Jan 31 19:03:12 2009
@@ -25,7 +25,6 @@
 #include "config.h"
 #endif
 
-#include <sys/wait.h>
 #include <signal.h>
 #include <unistd.h>
 #include <errno.h>
@@ -34,6 +33,13 @@
 #define G_LOG_DOMAIN "bf-junk-filter"
 
 #include <glib.h>
+
+#ifndef G_OS_WIN32
+#  include <sys/wait.h>
+#else
+#  include <windows.h>
+#endif
+
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <e-util/e-plugin.h>
@@ -163,6 +169,7 @@
 	camel_stream_close (stream);
 	camel_object_unref (stream);
 
+#ifndef G_OS_WIN32
 	waitres = waitpid (child_pid, &status, 0);
 	if (waitres < 0 && errno == EINTR) {
 		/* child process is hanging... */
@@ -181,13 +188,17 @@
 			g_set_error (error, EM_JUNK_ERROR, -3, _("Wait for Bogofilter child process interrupted, terminating..."));
 	}
 
-	g_spawn_close_pid (child_pid);
-
 	if (waitres >= 0 && WIFEXITED (status)) {
 		res = WEXITSTATUS (status);
 	} else {
 		res = BOGOFILTER_ERROR;
 	}
+#else
+	WaitForSingleObject (child_pid, INFINITE);
+	GetExitCodeProcess (child_pid, &res);
+#endif
+
+	g_spawn_close_pid (child_pid);
 
 	if (res < 0 || res > 2) {
 		if (!only_once) {

Modified: branches/kill-bonobo/plugins/external-editor/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/external-editor/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/external-editor/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -1,3 +1,11 @@
+if OS_WIN32
+NO_UNDEFINED_REQUIRED_LIBS = \
+	$(EVOLUTION_MAIL_LIBS) \
+	$(GNOME_PLATFORM_LIBS) \
+	$(top_builddir)/e-util/libeutil.la \
+	$(top_builddir)/mail/libevolution-mail.la
+endif
+
 INCLUDES =						\
 	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"	\
 	-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\"	\
@@ -25,7 +33,10 @@
 liborg_gnome_external_editor_la_SOURCES = 		\
 	external-editor.c
 
-liborg_gnome_external_editor_la_LDFLAGS = -module -avoid-version
+liborg_gnome_external_editor_la_LDFLAGS = \
+	-module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_external_editor_la_LIBADD = \
+	$(NO_UNDEFINED_REQUIRED_LIBS)
 
 schemadir       = $(GCONF_SCHEMA_FILE_DIR)
 schema_in_files = apps-evolution-external-editor.schemas.in

Modified: branches/kill-bonobo/plugins/external-editor/external-editor.c
==============================================================================
--- branches/kill-bonobo/plugins/external-editor/external-editor.c	(original)
+++ branches/kill-bonobo/plugins/external-editor/external-editor.c	Sat Jan 31 19:03:12 2009
@@ -38,7 +38,9 @@
 #include <glib/gstdio.h>
 
 #include <sys/stat.h>
-#include <sys/wait.h>
+#ifdef HAVE_SYS_WAIT_H
+#  include <sys/wait.h>
+#endif
 
 #include <stdlib.h>
 #include <string.h>
@@ -151,7 +153,11 @@
 		return ;
 	}
 	
+#ifdef HAVE_SYS_WAIT_H
 	if (WEXITSTATUS (status) != 0) {
+#else
+	if (status) {
+#endif
 		d(printf ("\n\nsome problem here with external editor\n\n"));
 		return ;
 	} else {

Modified: branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.c
==============================================================================
--- branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.c	(original)
+++ branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.c	Sat Jan 31 19:03:12 2009
@@ -37,36 +37,64 @@
 
 #include "google-contacts-source.h"
 
-
-void
-ensure_google_contacts_source_group (void)
+/**
+ * manage_google_group:
+ * Searches for a 'Google' source group and ensures it has the correct
+ * name. If only_return is set to true, then only returns found group.
+ * Otherwise returns NULL.
+ **/
+ESourceGroup *
+manage_google_group (ESourceList *slist, gboolean only_return)
 {
-    ESourceList  *source_list;
-    ESourceGroup *group;
+	GSList *groups, *g;
+	ESourceGroup *group = NULL;
 
-    source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
+	g_return_val_if_fail (slist != NULL, NULL);
 
-    if (source_list == NULL) {
-        return;
-    }
+	groups = e_source_list_peek_groups (slist);
+	for (g = groups; g; g = g->next) {
+		group = E_SOURCE_GROUP (g->data);
 
-    group = e_source_list_peek_group_by_name (source_list, _("Google"));
+		if (group && e_source_group_peek_base_uri (group) &&
+		    g_ascii_strncasecmp ("google://", e_source_group_peek_base_uri (group), 9) == 0)
+			break;
 
-    if (group == NULL) {
-        gboolean res;
+		group = NULL;
+	}
 
-        group = e_source_group_new (_("Google"), "google://");
-        res = e_source_list_add_group (source_list, group, -1);
+	if (only_return)
+		return group;
 
-        if (res == FALSE) {
-            g_warning ("Could not add Google source group!");
-        } else {
-            e_source_list_sync (source_list, NULL);
-        }
+	if (group) {
+		e_source_group_set_name (group, _("Google"));
+	} else {
+		group = e_source_group_new (_("Google"), "google://");
 
-        g_object_unref (group);
-    }
-    g_object_unref (source_list);
+		if (!e_source_list_add_group (slist, group, -1)) {
+			g_warning ("Could not add Google source group!");
+		} else {
+			e_source_list_sync (slist, NULL);
+		}
+
+		g_object_unref (group);
+	}
+
+	return NULL;
+}
+
+void
+ensure_google_contacts_source_group (void)
+{
+	ESourceList  *source_list;
+
+	source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
+
+	if (source_list == NULL) {
+		return;
+	}
+
+	manage_google_group (source_list, FALSE);
+	g_object_unref (source_list);
 }
 
 void
@@ -81,7 +109,7 @@
         return;
     }
 
-    group = e_source_list_peek_group_by_name (source_list, _("Google"));
+    group = manage_google_group (source_list, TRUE);
 
     if (group) {
         GSList *sources;

Modified: branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.h
==============================================================================
--- branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.h	(original)
+++ branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.h	Sat Jan 31 19:03:12 2009
@@ -28,4 +28,6 @@
 
 void       remove_google_contacts_source_group (void);
 
+ESourceGroup *manage_google_group (ESourceList *slist, gboolean only_return);
+
 #endif

Modified: branches/kill-bonobo/plugins/google-account-setup/google-source.c
==============================================================================
--- branches/kill-bonobo/plugins/google-account-setup/google-source.c	(original)
+++ branches/kill-bonobo/plugins/google-account-setup/google-source.c	Sat Jan 31 19:03:12 2009
@@ -69,36 +69,17 @@
 
 
 static void
-ensure_google_source_group ()
+ensure_google_source_group (void)
 {
 	ESourceList  *slist;
-	ESourceGroup *group;
-
 
 	if (!e_cal_get_sources (&slist, E_CAL_SOURCE_TYPE_EVENT, NULL)) {
 		g_warning ("Could not get calendar source list from GConf!");
 		return;
 	}
 
-	group = e_source_list_peek_group_by_name (slist, _("Google"));
-
-	if (group == NULL)
-		 g_message ("\n Google Group Not found ");
-
-	if (group == NULL) {
-		gboolean res;
-		group = e_source_group_new (_("Google"), "Google://");
-		res = e_source_list_add_group (slist, group, -1);
-
-		if (res == FALSE) {
-			g_warning ("Could not add Google source group!");
-		} else {
-			e_source_list_sync (slist, NULL);
-		}
-
-		g_object_unref (group);
-		g_object_unref (slist);
-	}
+	manage_google_group (slist, FALSE);
+	g_object_unref (slist);
 }
 
 int

Modified: branches/kill-bonobo/plugins/groupwise-account-setup/groupwise-account-setup.c
==============================================================================
--- branches/kill-bonobo/plugins/groupwise-account-setup/groupwise-account-setup.c	(original)
+++ branches/kill-bonobo/plugins/groupwise-account-setup/groupwise-account-setup.c	Sat Jan 31 19:03:12 2009
@@ -51,17 +51,9 @@
 {
 	ESourceList *list;
         GSList *groups;
-	char *old_relative_uri;
-	const char *poa_address;
-	CamelURL *url = camel_url_new (a->source->url, NULL);
 	
-	old_relative_uri =  g_strdup_printf ("%s %s/", url->user, poa_address);
         list = e_source_list_new_for_gconf (client, path);
 	groups = e_source_list_peek_groups (list);
-	poa_address = url->host;
-
-	if (!poa_address || !*poa_address)
-		return;
 
 	for ( ; groups != NULL; groups = g_slist_next (groups)) {
 		ESourceGroup *group = E_SOURCE_GROUP (groups->data);
@@ -87,9 +79,6 @@
 	e_source_list_sync (list, NULL);
 
 	g_object_unref (list);
-	g_free (old_relative_uri);
-	camel_url_free (url);
-
 }
 
 void

Modified: branches/kill-bonobo/plugins/groupwise-features/send-options.c
==============================================================================
--- branches/kill-bonobo/plugins/groupwise-features/send-options.c	(original)
+++ branches/kill-bonobo/plugins/groupwise-features/send-options.c	Sat Jan 31 19:03:12 2009
@@ -454,7 +454,7 @@
 		if (gopts->delay_enabled) {
 				tt = icaltime_today ();
 				icaltime_adjust (&tt, gopts->delay_until, 0, 0, 0);
-				val = icaltime_as_ical_string (tt);
+				val = icaltime_as_ical_string_r (tt);
 		} else
 			val = "none";
 		e_source_set_property (source, "delay-delivery", val);

Modified: branches/kill-bonobo/plugins/import-ics-attachments/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/import-ics-attachments/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/import-ics-attachments/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -3,6 +3,7 @@
 	-I$(top_srcdir)/camel                           \
 	-I$(top_srcdir)/widgets/misc			\
 	$(EVOLUTION_MAIL_CFLAGS)			\
+	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	-DEVOLUTION_DATADIR=\""$(datadir)"\"		\
 	-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\"	\
 	-DEVOLUTION_ICONSDIR=\""$(imagesdir)"\"		\

Modified: branches/kill-bonobo/plugins/ipod-sync/ical-format.c
==============================================================================
--- branches/kill-bonobo/plugins/ipod-sync/ical-format.c	(original)
+++ branches/kill-bonobo/plugins/ipod-sync/ical-format.c	Sat Jan 31 19:03:12 2009
@@ -89,7 +89,7 @@
 		stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target->selector))), dest_uri, &error);
 
 		if (stream && !error) {
-			char *ical_str = icalcomponent_as_ical_string (top_level);
+			char *ical_str = icalcomponent_as_ical_string_r (top_level);
 
 			g_output_stream_write_all (stream, ical_str, strlen (ical_str), NULL, NULL, &error);
 			g_output_stream_close (stream, NULL, NULL);

Modified: branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c
==============================================================================
--- branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c	(original)
+++ branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c	Sat Jan 31 19:03:12 2009
@@ -169,7 +169,7 @@
 		char *attendee;
 		char *text;
 
-		attendee = icalproperty_get_value_as_string (prop);
+		attendee = icalproperty_get_value_as_string_r (prop);
 
 		 if (!attendee)
 			continue;
@@ -253,7 +253,7 @@
 				if (param)
 					pitip->to_name = g_strdup (icalparameter_get_cn (param));
 
-				text = icalproperty_get_value_as_string (prop);
+				text = icalproperty_get_value_as_string_r (prop);
 
 				pitip->to_address = g_strdup (itip_strip_mailto (text));
 				g_free (text);
@@ -309,7 +309,7 @@
 				if (param)
 					pitip->to_name = g_strdup (icalparameter_get_cn (param));
 
-				text = icalproperty_get_value_as_string (prop);
+				text = icalproperty_get_value_as_string_r (prop);
 
 				pitip->to_address = g_strdup (itip_strip_mailto (text));
 				g_free (text);
@@ -352,7 +352,7 @@
 	if (!prop)
 		return;
 
-	organizer = icalproperty_get_value_as_string (prop);
+	organizer = icalproperty_get_value_as_string_r (prop);
 	if (organizer) {
 		organizer_clean = g_strdup (itip_strip_mailto (organizer));
 		organizer_clean = g_strstrip (organizer_clean);
@@ -992,7 +992,7 @@
 	 * and you then look at it in Outlook).
 	 */
 	stamp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
-	str = icaltime_as_ical_string (stamp);
+	str = icaltime_as_ical_string_r (stamp);
 	prop = icalproperty_new_x (str);
 	g_free (str);
 	icalproperty_set_x_name (prop, "X-MICROSOFT-CDO-REPLYTIME");

Modified: branches/kill-bonobo/plugins/mail-notification/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/mail-notification/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/mail-notification/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -1,3 +1,10 @@
+if OS_WIN32
+NO_UNDEFINED_REQUIRED_LIBS =				\
+	$(top_builddir)/mail/libevolution-mail.la	\
+	$(top_builddir)/e-util/libeutil.la		\
+	$(GNOME_PLATFORM_LIBS)
+endif
+
 INCLUDES =					\
 	-I$(top_srcdir)				\
 	$(EVOLUTION_MAIL_CFLAGS)		\
@@ -16,8 +23,10 @@
 
 liborg_gnome_mail_notification_la_SOURCES = mail-notification.c
 liborg_gnome_mail_notification_la_LDFLAGS = 	\
-	-module -avoid-version			\
-	$(LIBNOTIFY_LIBS)			
+	-module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_mail_notification_la_LIBADD = 	\
+	$(LIBNOTIFY_LIBS)			\
+	$(NO_UNDEFINED_REQUIRED_LIBS)
 
 if ENABLE_DBUS
 liborg_gnome_mail_notification_la_LDFLAGS += $(NMN_LIBS)

Modified: branches/kill-bonobo/plugins/mail-to-meeting/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/mail-to-meeting/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/mail-to-meeting/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -1,5 +1,6 @@
-INCLUDES =						\
-	-I$(top_srcdir)					\
+INCLUDES =				\
+	-I$(top_srcdir)			\
+	$(EVOLUTION_CALENDAR_CFLAGS)	\
 	$(EVOLUTION_MAIL_CFLAGS)
 
 @EVO_PLUGIN_RULE@

Modified: branches/kill-bonobo/plugins/mail-to-task/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/mail-to-task/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/mail-to-task/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -1,5 +1,6 @@
 INCLUDES =						\
 	-I$(top_srcdir)					\
+	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(EVOLUTION_MAIL_CFLAGS)
 
 @EVO_PLUGIN_RULE@
@@ -12,7 +13,7 @@
 liborg_gnome_mail_to_task_la_LIBADD =	\
 	$(top_builddir)/e-util/libeutil.la				\
 	$(top_builddir)/calendar/common/libevolution-calendarprivate.la	\
-	$(top_builddir)/mail/libevolution-mail.la			\ 
+	$(top_builddir)/mail/libevolution-mail.la			\
 	$(EVOLUTION_CALENDAR_LIBS)					\
 	$(EVOLUTION_MAIL_LIBS)
 

Modified: branches/kill-bonobo/plugins/mono/mono-plugin.c
==============================================================================
--- branches/kill-bonobo/plugins/mono/mono-plugin.c	(original)
+++ branches/kill-bonobo/plugins/mono/mono-plugin.c	Sat Jan 31 19:03:12 2009
@@ -28,6 +28,7 @@
 #include <mono/metadata/object.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/assembly.h>
+#include <mono/metadata/threads.h>
 #include <mono/jit/jit.h>
 
 #define d(x) (x)

Modified: branches/kill-bonobo/plugins/pst-import/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/pst-import/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/pst-import/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -1,10 +1,19 @@
+if OS_WIN32
+NO_UNDEFINED_REQUIRED_LIBS =				\
+	$(top_builddir)/mail/libevolution-mail.la	\
+	$(top_builddir)/e-util/libeutil.la		\
+	$(EVOLUTION_CALENDAR_LIBS)			\
+	$(EVOLUTION_MAIL_LIBS)
+endif
+
 INCLUDES =						\
 	-I$(EVOLUTION_SOURCE)				\
 	-I$(top_srcdir)					\
 	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""	\
 	-DLOCALEDIR="\"$(LOCALEDIR)\""			\
 	$(EVOLUTION_CFLAGS)				\
-	$(EVOLUTION_MAIL_CFLAGS)			
+	$(EVOLUTION_MAIL_CFLAGS)			\
+	$(LIBPST_CFLAGS)
 
 @EVO_PLUGIN_RULE@
 
@@ -12,8 +21,10 @@
 plugin_LTLIBRARIES = liborg-gnome-pst-import.la
 
 liborg_gnome_pst_import_la_SOURCES = pst-importer.c
-liborg_gnome_pst_import_la_LDFLAGS = -module -avoid-version
-liborg_gnome_pst_import_la_LIBADD = \
+liborg_gnome_pst_import_la_LDFLAGS = \
+	-module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_pst_import_la_LIBADD =	\
+	$(NO_UNDEFINED_REQUIRED_LIBS)	\
 	$(LIBPST_LIBS)
 
 EXTRA_DIST = org-gnome-pst-import.eplug.xml

Modified: branches/kill-bonobo/plugins/pst-import/pst-importer.c
==============================================================================
--- branches/kill-bonobo/plugins/pst-import/pst-importer.c	(original)
+++ branches/kill-bonobo/plugins/pst-import/pst-importer.c	Sat Jan 31 19:03:12 2009
@@ -66,8 +66,8 @@
 #include <mail/mail-tools.h>
 #include <mail/em-utils.h>
 
-#include <libpst/libpst.h>
 #include <libpst/define.h>
+#include <libpst/libpst.h>
 #include <libpst/timeconv.h>
 
 typedef struct _PstImporter PstImporter;

Modified: branches/kill-bonobo/plugins/publish-calendar/publish-format-fb.c
==============================================================================
--- branches/kill-bonobo/plugins/publish-calendar/publish-format-fb.c	(original)
+++ branches/kill-bonobo/plugins/publish-calendar/publish-format-fb.c	Sat Jan 31 19:03:12 2009
@@ -84,7 +84,7 @@
 			objects = g_list_remove (objects, comp);
 		}
 
-		ical_string = icalcomponent_as_ical_string (top_level);
+		ical_string = icalcomponent_as_ical_string_r (top_level);
 		res = g_output_stream_write_all (stream, ical_string, strlen (ical_string), NULL, NULL, &error);
 
 		g_free (ical_string);

Modified: branches/kill-bonobo/plugins/publish-calendar/publish-format-ical.c
==============================================================================
--- branches/kill-bonobo/plugins/publish-calendar/publish-format-ical.c	(original)
+++ branches/kill-bonobo/plugins/publish-calendar/publish-format-ical.c	Sat Jan 31 19:03:12 2009
@@ -113,7 +113,7 @@
 		g_hash_table_destroy (tdata.zones);
 		tdata.zones = NULL;
 
-		ical_string = icalcomponent_as_ical_string (top_level);
+		ical_string = icalcomponent_as_ical_string_r (top_level);
 		res = g_output_stream_write_all (stream, ical_string, strlen (ical_string), NULL, NULL, &error);
 		g_free (ical_string);
 	}

Modified: branches/kill-bonobo/plugins/save-attachments/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/save-attachments/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/save-attachments/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -1,3 +1,11 @@
+if OS_WIN32
+NO_UNDEFINED_REQUIRED_LIBS =				\
+	$(top_builddir)/mail/libevolution-mail.la	\
+	$(EVOLUTION_MAIL_LIBS)				\
+	$(GNOME_PLATFORM_LIBS)				\
+	$(top_builddir)/e-util/libeutil.la
+endif
+
 INCLUDES =						\
 	-I$(top_srcdir)					\
 	$(EVOLUTION_MAIL_CFLAGS)
@@ -8,7 +16,12 @@
 plugin_LTLIBRARIES = liborg-gnome-save-attachments.la
 
 liborg_gnome_save_attachments_la_SOURCES = save-attachments.c
-liborg_gnome_save_attachments_la_LDFLAGS = -module -avoid-version
+liborg_gnome_save_attachments_la_LDFLAGS = -module \
+	-avoid-version $(NO_UNDEFINED)
+
+liborg_gnome_save_attachments_la_LIBADD =	\
+	$(NO_UNDEFINED_REQUIRED_LIBS)
+
 
 EXTRA_DIST = 					\
 	org-gnome-save-attachments.eplug.xml	\

Modified: branches/kill-bonobo/plugins/save-calendar/ical-format.c
==============================================================================
--- branches/kill-bonobo/plugins/save-calendar/ical-format.c	(original)
+++ branches/kill-bonobo/plugins/save-calendar/ical-format.c	Sat Jan 31 19:03:12 2009
@@ -136,7 +136,7 @@
 		stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target->selector))), dest_uri, &error);
 
 		if (stream) {
-			char *ical_str = icalcomponent_as_ical_string (top_level);
+			char *ical_str = icalcomponent_as_ical_string_r (top_level);
 
 			g_output_stream_write_all (stream, ical_str, strlen (ical_str), NULL, NULL, &error);
 			g_output_stream_close (stream, NULL, NULL);

Modified: branches/kill-bonobo/plugins/startup-wizard/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/startup-wizard/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/startup-wizard/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -1,6 +1,7 @@
 INCLUDES = -I .						\
 	-I$(top_srcdir)	                                \
 	-I$(top_builddir)/shell				\
+	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(EVOLUTION_MAIL_CFLAGS)
 
 @EVO_PLUGIN_RULE@

Modified: branches/kill-bonobo/plugins/tnef-attachments/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/tnef-attachments/Makefile.am	(original)
+++ branches/kill-bonobo/plugins/tnef-attachments/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -1,3 +1,11 @@
+if OS_WIN32
+NO_UNDEFINED_REQUIRED_LIBS = 				\
+	$(EVOLUTION_MAIL_LIBS)				\
+	$(GNOME_PLATFORM_LIBS)				\
+	$(top_builddir)/e-util/libeutil.la		\
+	$(top_builddir)/mail/libevolution-mail.la
+endif
+
 INCLUDES =						\
 	-I$(top_srcdir)					\
 	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""	\
@@ -11,7 +19,10 @@
 plugin_LTLIBRARIES = liborg-gnome-tnef-attachments.la
 
 liborg_gnome_tnef_attachments_la_SOURCES = tnef-plugin.c
-liborg_gnome_tnef_attachments_la_LDFLAGS = -module -avoid-version -lytnef
+liborg_gnome_tnef_attachments_la_LDFLAGS = -module -avoid-version  $(NO_UNDEFINED)
+liborg_gnome_tnef_attachments_la_LIBADD = 		\
+	$(NO_UNDEFINED_REQUIRED_LIBS)			\
+	-lytnef
 
 EXTRA_DIST = org-gnome-tnef-attachments.eplug.xml
 

Modified: branches/kill-bonobo/plugins/tnef-attachments/tnef-plugin.c
==============================================================================
--- branches/kill-bonobo/plugins/tnef-attachments/tnef-plugin.c	(original)
+++ branches/kill-bonobo/plugins/tnef-attachments/tnef-plugin.c	Sat Jan 31 19:03:12 2009
@@ -31,7 +31,6 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <sys/stat.h>
-#include <sys/wait.h>
 #include <fcntl.h>
 #include <ctype.h>
 #include <stdlib.h>

Modified: branches/kill-bonobo/plugins/webdav-account-setup/webdav-contacts-source.c
==============================================================================
--- branches/kill-bonobo/plugins/webdav-account-setup/webdav-contacts-source.c	(original)
+++ branches/kill-bonobo/plugins/webdav-account-setup/webdav-contacts-source.c	Sat Jan 31 19:03:12 2009
@@ -54,6 +54,28 @@
 int
 e_plugin_lib_enable(EPluginLib *ep, int enable);
 
+static ESourceGroup *
+find_webdav_group (ESourceList *slist)
+{
+	GSList *groups, *g;
+	ESourceGroup *group = NULL;
+
+	g_return_val_if_fail (slist != NULL, NULL);
+
+	groups = e_source_list_peek_groups (slist);
+	for (g = groups; g; g = g->next) {
+		group = E_SOURCE_GROUP (g->data);
+
+		if (group && e_source_group_peek_base_uri (group) &&
+		    g_ascii_strncasecmp (BASE_URI, e_source_group_peek_base_uri (group), strlen (BASE_URI)) == 0)
+			break;
+
+		group = NULL;
+	}
+
+	return group;
+}
+
 static void
 ensure_webdav_contacts_source_group(void)
 {
@@ -66,7 +88,7 @@
 		return;
 	}
 
-	group = e_source_list_peek_group_by_name(source_list, _("WebDAV"));
+	group = find_webdav_group (source_list);
 
 	if (group == NULL) {
 		gboolean res;
@@ -81,7 +103,10 @@
 		}
 
 		g_object_unref(group);
+	} else {
+		e_source_group_set_name (group, _("WebDAV"));
 	}
+
 	g_object_unref(source_list);
 }
 
@@ -97,7 +122,7 @@
 		return;
 	}
 
-	group = e_source_list_peek_group_by_name(source_list, _("WebDAV"));
+	group = find_webdav_group (source_list);
 
 	if (group) {
 		GSList *sources;

Modified: branches/kill-bonobo/po/POTFILES.in
==============================================================================
--- branches/kill-bonobo/po/POTFILES.in	(original)
+++ branches/kill-bonobo/po/POTFILES.in	Sat Jan 31 19:03:12 2009
@@ -398,6 +398,7 @@
 plugins/prefer-plain/prefer-plain.c
 plugins/profiler/org-gnome-evolution-profiler.eplug.xml
 plugins/pst-import/org-gnome-pst-import.eplug.xml
+plugins/pst-import/pst-importer.c
 plugins/publish-calendar/org-gnome-publish-calendar.eplug.xml
 plugins/publish-calendar/org-gnome-publish-calendar.xml
 plugins/publish-calendar/publish-calendar.c

Modified: branches/kill-bonobo/tools/killev.c
==============================================================================
--- branches/kill-bonobo/tools/killev.c	(original)
+++ branches/kill-bonobo/tools/killev.c	Sat Jan 31 19:03:12 2009
@@ -83,7 +83,7 @@
 }
 
 static const char *patterns[] = {
-	"%s", "%.16s", "lt-%s", "lt-%.13s"
+	"%s", "%.16s", "lt-%s", "lt-%.13s", "%s.bin"
 };
 static const int n_patterns = G_N_ELEMENTS (patterns);
 

Modified: branches/kill-bonobo/widgets/misc/e-calendar-item.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-calendar-item.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-calendar-item.c	Sat Jan 31 19:03:12 2009
@@ -1395,7 +1395,7 @@
 	gboolean today, selected, has_focus, drop_target = FALSE;
 	gboolean bold, draw_day, finished = FALSE;
 	gint today_year, today_month, today_mday, month_offset;
-	gchar buffer[2];
+	gchar buffer[9];
 	gint day_style = 0;
 	PangoContext *pango_context;
 	PangoFontMetrics *font_metrics;
@@ -1505,12 +1505,12 @@
 			if (week_num >= 10) {
 				digit = week_num / 10;
 				text_x -= calitem->week_number_digit_widths[digit];
-				buffer[num_chars++] = digit + '0';
+				num_chars += sprintf (&buffer[num_chars], "%Id", digit);
 			}
 
 			digit = week_num % 10;
 			text_x -= calitem->week_number_digit_widths[digit] + 6;
-			buffer[num_chars++] = digit + '0';
+			num_chars += sprintf (&buffer[num_chars], "%Id", digit);
 
 			cairo_save (cr);
 			gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_ACTIVE]);
@@ -1618,12 +1618,12 @@
 				if (day_num >= 10) {
 					digit = day_num / 10;
 					day_x -= calitem->digit_widths[digit];
-					buffer[num_chars++] = digit + '0';
+					num_chars += sprintf (&buffer[num_chars], "%Id", digit);
 				}
 
 				digit = day_num % 10;
 				day_x -= calitem->digit_widths[digit];
-				buffer[num_chars++] = digit + '0';
+				num_chars += sprintf (&buffer[num_chars], "%Id", digit);
 
 				cairo_save (cr);
 				if (fg_color) {
@@ -1913,7 +1913,6 @@
 {
 	GnomeCanvasItem *canvas_item;
 	GtkStyle *style;
-	gchar *digits = "0123456789";
 	gint day, max_day_width, digit, max_digit_width, max_week_number_digit_width;
 	gint char_height, width, min_cell_width, min_cell_height;
 	PangoFontDescription *font_desc, *wkfont_desc;
@@ -1956,7 +1955,12 @@
 	max_digit_width = 0;
 	max_week_number_digit_width = 0;
 	for (digit = 0; digit < 10; digit++) {
-		pango_layout_set_text (layout, &digits [digit], 1);
+		gchar locale_digit[5];
+		int locale_digit_len;
+		
+		locale_digit_len = sprintf (locale_digit, "%Id", digit);
+
+		pango_layout_set_text (layout, locale_digit, locale_digit_len);
 		pango_layout_get_pixel_size (layout, &width, NULL);
 
 		calitem->digit_widths[digit] = width;
@@ -1966,7 +1970,7 @@
 			pango_context_set_font_description (pango_context, wkfont_desc);
 			pango_layout_context_changed (layout);
 
-			pango_layout_set_text (layout, &digits [digit], 1);
+			pango_layout_set_text (layout, locale_digit, locale_digit_len);
 			pango_layout_get_pixel_size (layout, &width, NULL);
 
 			calitem->week_number_digit_widths[digit] = width;
@@ -3352,7 +3356,9 @@
 
 	gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition);
 
-	*x -= 2;
+	*x -= (gtk_widget_get_direction(GTK_WIDGET(menu)) == GTK_TEXT_DIR_RTL)
+		? requisition.width - 2
+		: 2;
 	*y -= requisition.height / 2;
 
 	screen_width = gdk_screen_width ();

Modified: branches/kill-bonobo/win32/Makefile.am
==============================================================================
--- branches/kill-bonobo/win32/Makefile.am	(original)
+++ branches/kill-bonobo/win32/Makefile.am	Sat Jan 31 19:03:12 2009
@@ -29,36 +29,36 @@
 libemiscwidgets.la: dummy.la libemiscwidgets.def
 	sed -e s!%DLL%!libemiscwidgets-0! -e s!%LIB%!libemiscwidgets! -e s!%PFX%!$(prefix)! <dummy.la >$@
 	mkdir -p .libs
-	dlltool --output-lib=.libs/libemiscwidgets.dll.a --dllname=libemiscwidgets-0.dll --input-def=libemiscwidgets.def
+	$(DLLTOOL) --output-lib=.libs/libemiscwidgets.dll.a --dllname=libemiscwidgets-0.dll --input-def=libemiscwidgets.def
 
 libetable.la: dummy.la libetable.def
 	sed -e s!%DLL%!libetable-0! -e s!%LIB%!libetable! -e s!%PFX%!$(prefix)! <dummy.la >$@
 	mkdir -p .libs
-	dlltool --output-lib=.libs/libetable.dll.a --dllname=libetable-0.dll --input-def=libetable.def
+	$(DLLTOOL) --output-lib=.libs/libetable.dll.a --dllname=libetable-0.dll --input-def=libetable.def
 
 libetext.la: dummy.la libetext.def
 	sed -e s!%DLL%!libetext-0! -e s!%LIB%!libetext! -e s!%PFX%!$(prefix)! <dummy.la >$@
 	mkdir -p .libs
-	dlltool --output-lib=.libs/libetext.dll.a --dllname=libetext-0.dll --input-def=libetext.def
+	$(DLLTOOL) --output-lib=.libs/libetext.dll.a --dllname=libetext-0.dll --input-def=libetext.def
 
 libevolution-addressbook.la: dummy.la libevolution-addressbook.def
 	sed -e s!%DLL%!libevolution-addressbook! -e s!%LIB%!libevolution-addressbook! -e s!%PFX%!$(prefix)! <dummy.la >$@
 	mkdir -p .libs
-	dlltool --output-lib=.libs/libevolution-addressbook.dll.a --dllname=libevolution-addressbook.dll --input-def=libevolution-addressbook.def
+	$(DLLTOOL) --output-lib=.libs/libevolution-addressbook.dll.a --dllname=libevolution-addressbook.dll --input-def=libevolution-addressbook.def
 
 libevolution-calendar.la: dummy.la libevolution-calendar.def
 	sed -e s!%DLL%!libevolution-calendar! -e s!%LIB%!libevolution-calendar! -e s!%PFX%!$(prefix)! <dummy.la >$@
 	mkdir -p .libs
-	dlltool --output-lib=.libs/libevolution-calendar.dll.a --dllname=libevolution-calendar.dll --input-def=libevolution-calendar.def
+	$(DLLTOOL) --output-lib=.libs/libevolution-calendar.dll.a --dllname=libevolution-calendar.dll --input-def=libevolution-calendar.def
 
 libevolution-mail.la: dummy.la libevolution-mail.def
 	sed -e s!%DLL%!libevolution-mail! -e s!%LIB%!libevolution-mail! -e s!%PFX%!$(prefix)! <dummy.la >$@
 	mkdir -p .libs
-	dlltool --output-lib=.libs/libevolution-mail.dll.a --dllname=libevolution-mail.dll --input-def=libevolution-mail.def
+	$(DLLTOOL) --output-lib=.libs/libevolution-mail.dll.a --dllname=libevolution-mail.dll --input-def=libevolution-mail.def
 
 libfilter.la: dummy.la libfilter.def
 	sed -e s!%DLL%!libfilter-0! -e s!%LIB%!libfilter! -e s!%PFX%!$(prefix)! <dummy.la >$@
 	mkdir -p .libs
-	dlltool --output-lib=.libs/libfilter.dll.a --dllname=libfilter-0.dll --input-def=libfilter.def
+	$(DLLTOOL) --output-lib=.libs/libfilter.dll.a --dllname=libfilter-0.dll --input-def=libfilter.def
 
 CLEANFILES = $(BOOTSTRAP_LIBS)



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