Remove duplicate items.
authordcarbery
Wed, 31 Oct 2007 11:55:07 +0000
changeset 11089 b2d890b6ad95
parent 11088 57c8964e9d29
child 11090 5f950faf4ef9
Remove duplicate items.
patches/evolution-08-unions.diff
--- a/patches/evolution-08-unions.diff	Wed Oct 31 11:29:09 2007 +0000
+++ b/patches/evolution-08-unions.diff	Wed Oct 31 11:55:07 2007 +0000
@@ -1,115 +1,3 @@
---- evolution-2.21.1/addressbook/conduit/address-conduit.c.orig	2007-10-29 02:02:13.000000000 +0000
-+++ evolution-2.21.1/addressbook/conduit/address-conduit.c	2007-10-31 07:42:19.663710440 +0000
-@@ -63,6 +63,8 @@
- #define WARN g_warning
- #define INFO g_message
- 
-+gchar *pilot_charset = NULL;
-+
- enum {
- 	LABEL_WORK,
- 	LABEL_HOME,
-@@ -748,7 +750,7 @@
- 	char *text = NULL;
- 	
- 	if (address.entry[entry])
--		text = e_pilot_utf8_from_pchar (address.entry[entry]);
-+		text = e_pilot_utf8_from_pchar (address.entry[entry], pilot_charset);
- 
- 	e_contact_set (contact, field, text);
- 	
-@@ -759,7 +761,7 @@
- get_entry_text (struct Address address, int entry)
- {
- 	if (address.entry[entry])
--		return e_pilot_utf8_from_pchar (address.entry[entry]);
-+		return e_pilot_utf8_from_pchar (address.entry[entry], pilot_charset);
- 
- 	return NULL;	
- }
-@@ -918,10 +920,10 @@
- #endif
- 	}
- 
--	local->addr->entry[entryFirstname] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_GIVEN_NAME));
--	local->addr->entry[entryLastname] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_FAMILY_NAME));
--	local->addr->entry[entryCompany] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_ORG));
--	local->addr->entry[entryTitle] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_TITLE));
-+	local->addr->entry[entryFirstname] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_GIVEN_NAME), pilot_charset);
-+	local->addr->entry[entryLastname] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_FAMILY_NAME), pilot_charset);
-+	local->addr->entry[entryCompany] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_ORG), pilot_charset);
-+	local->addr->entry[entryTitle] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_TITLE), pilot_charset);
- 	
- 	/* See if the default has something in it */
- 	if ((address = e_contact_get (contact, ctxt->cfg->default_address))) {
-@@ -947,13 +949,13 @@
- 			add = g_strdup (address->street);
- 			LOG (g_warning ("Address has only one line: [%s]\n", add));
- 		}
--		local->addr->entry[entryAddress] = e_pilot_utf8_to_pchar (add);
-+		local->addr->entry[entryAddress] = e_pilot_utf8_to_pchar (add, pilot_charset);
- 		g_free (add);
- 		
--		local->addr->entry[entryCity] = e_pilot_utf8_to_pchar (address->locality);
--		local->addr->entry[entryState] = e_pilot_utf8_to_pchar (address->region);
--		local->addr->entry[entryZip] = e_pilot_utf8_to_pchar (address->code);
--		local->addr->entry[entryCountry] = e_pilot_utf8_to_pchar (address->country);
-+		local->addr->entry[entryCity] = e_pilot_utf8_to_pchar (address->locality, pilot_charset);
-+		local->addr->entry[entryState] = e_pilot_utf8_to_pchar (address->region, pilot_charset);
-+		local->addr->entry[entryZip] = e_pilot_utf8_to_pchar (address->code, pilot_charset);
-+		local->addr->entry[entryCountry] = e_pilot_utf8_to_pchar (address->country, pilot_charset);
- 		
- 		e_contact_address_free (address);
- 	}
-@@ -974,7 +976,7 @@
- 			phone_str = e_contact_get_const (contact, priority[i]);
- 			if (phone_str && *phone_str) {
- 				clear_entry_text (*local->addr, phone);
--				local->addr->entry[phone] = e_pilot_utf8_to_pchar (phone_str);
-+				local->addr->entry[phone] = e_pilot_utf8_to_pchar (phone_str, pilot_charset);
- 				local->addr->phoneLabel[phone - entryPhone1] = priority_label[i];
- 				phone++;
- 			}
-@@ -1023,13 +1025,13 @@
- 			
- 			if (phone_str && *phone_str) {
- 				clear_entry_text (*local->addr, i);
--				local->addr->entry[i] = e_pilot_utf8_to_pchar (phone_str);
-+				local->addr->entry[i] = e_pilot_utf8_to_pchar (phone_str, pilot_charset);
- 			}
- 		}
- 	}
- 	
- 	/* Note */
--	local->addr->entry[entryNote] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_NOTE));
-+	local->addr->entry[entryNote] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_NOTE), pilot_charset);
- }
- 
- static void 
-@@ -1303,6 +1305,13 @@
- 	/* g_message ("Addressbook Conduit v.%s", CONDUIT_VERSION); */
- 
- 	ctxt->dbi = dbi;
-+
-+#ifdef PILOT_LINK_0_12
-+	if(NULL == dbi->pilotInfo->sync_options.pilot_charset)
-+		pilot_charset = NULL;
-+	else
-+		pilot_charset = g_strdup(dbi->pilotInfo->sync_options.pilot_charset);
-+#endif
- 	
- 	if (ctxt->cfg->source) {
- 		ctxt->ebook = e_book_new (ctxt->cfg->source, NULL);
-@@ -1440,7 +1449,8 @@
- 	if (e_book_get_changes (ctxt->ebook, change_id, &changed, NULL))
- 		e_book_free_change_list (changed);
- 	g_free (change_id);
--
-+	if (pilot_charset)
-+		g_free (pilot_charset);
- 	LOG (g_message ( "---------------------------------------------------------\n" ));
- 	
- 	return 0;
 --- evolution-2.21.1/calendar/gui/e-itip-control.c.orig	2007-10-31 09:35:53.516093583 +0000
 +++ evolution-2.21.1/calendar/gui/e-itip-control.c	2007-10-31 09:38:43.883637396 +0000
 @@ -76,15 +76,15 @@
@@ -356,298 +244,6 @@
  
  	return TRUE;
  }
---- evolution-2.21.1/calendar/conduits/todo/todo-conduit.c.orig	2007-10-29 02:02:17.000000000 +0000
-+++ evolution-2.21.1/calendar/conduits/todo/todo-conduit.c	2007-10-31 07:42:19.665191100 +0000
-@@ -66,6 +66,8 @@
- #define WARN g_warning
- #define INFO g_message
- 
-+gchar *pilot_charset = NULL;
-+
- typedef struct _EToDoLocalRecord EToDoLocalRecord;
- typedef struct _EToDoConduitCfg EToDoConduitCfg;
- typedef struct _EToDoConduitGui EToDoConduitGui;
-@@ -431,9 +433,9 @@
- 		    todo.priority,
- 		    todo.complete,
- 		    todo.description ?
--		    e_pilot_utf8_from_pchar(todo.description) : "",
-+		    e_pilot_utf8_from_pchar(todo.description, pilot_charset) : "",
- 		    todo.note ?
--		    e_pilot_utf8_from_pchar(todo.note) : "",
-+		    e_pilot_utf8_from_pchar(todo.note, pilot_charset) : "",
- 		    remote->category);
- 
- 	free_ToDo (&todo);
-@@ -710,19 +712,19 @@
- 	}
- 	
- 	/*Category support*/
--	e_pilot_local_category_to_remote(&(local->local.category), comp, &(ctxt->ai.category));
-+	e_pilot_local_category_to_remote(&(local->local.category), comp, &(ctxt->ai.category), pilot_charset);
- 
- 	/* STOP: don't replace these with g_strdup, since free_ToDo
- 	   uses free to deallocate */
- 	e_cal_component_get_summary (comp, &summary);
- 	if (summary.value) 
--		local->todo->description = e_pilot_utf8_to_pchar (summary.value);
-+		local->todo->description = e_pilot_utf8_to_pchar (summary.value, pilot_charset);
- 
- 	e_cal_component_get_description_list (comp, &d_list);
- 	if (d_list) {
- 		description = (ECalComponentText *) d_list->data;
- 		if (description && description->value)
--			local->todo->note = e_pilot_utf8_to_pchar (description->value);
-+			local->todo->note = e_pilot_utf8_to_pchar (description->value, pilot_charset);
- 		else
- 			local->todo->note = NULL;
- 	} else {
-@@ -864,12 +866,12 @@
- 
- 	e_cal_component_set_last_modified (comp, &now);
- 
--	summary.value = txt = e_pilot_utf8_from_pchar (todo.description);
-+	summary.value = txt = e_pilot_utf8_from_pchar (todo.description, pilot_charset);
- 	e_cal_component_set_summary (comp, &summary);
- 	free (txt);
- 	
- 	/*Category support*/
--	e_pilot_remote_category_to_local(remote->category, comp, &(ai->category));
-+	e_pilot_remote_category_to_local(remote->category, comp, &(ai->category), pilot_charset);
- 	
- 	/* The iCal description field */
- 	if (!todo.note) {
-@@ -878,7 +880,7 @@
- 		GSList l;
- 		ECalComponentText text;
- 
--		text.value = txt = e_pilot_utf8_from_pchar (todo.note);
-+		text.value = txt = e_pilot_utf8_from_pchar (todo.note, pilot_charset);
- 		text.altrep = NULL;
- 		l.data = &text;
- 		l.next = NULL;
-@@ -1004,6 +1006,13 @@
- 	ctxt->dbi = dbi;	
- 	ctxt->client = NULL;
- 
-+#ifdef PILOT_LINK_0_12
-+	if(NULL == dbi->pilotInfo->sync_options.pilot_charset)
-+		pilot_charset = NULL;
-+	else
-+		pilot_charset = g_strdup(dbi->pilotInfo->sync_options.pilot_charset);
-+#endif
-+
- 	/* Get the timezone */
- 	ctxt->timezone = get_default_timezone ();
- 	if (ctxt->timezone == NULL)
-@@ -1165,7 +1174,8 @@
- 	if (e_cal_get_changes (ctxt->client, change_id, &changed, NULL))
- 		e_cal_free_change_list (changed);
- 	g_free (change_id);
--	
-+	if (pilot_charset)
-+		g_free (pilot_charset);	
- 	LOG (g_message ( "---------------------------------------------------------\n" ));
- 
- 	return 0;
---- evolution-2.21.1/calendar/conduits/memo/memo-conduit.c.orig	2007-10-31 07:42:19.664526060 +0000
-+++ evolution-2.21.1/calendar/conduits/memo/memo-conduit.c	2007-10-31 07:42:19.669100063 +0000
-@@ -518,7 +518,9 @@
- 	const char *uid;
- 	GSList *d_list = NULL;
- 	ECalComponentText *description;
-+	ECalComponentText summary;
- 	ECalComponentClassification classif;
-+	char *textstr = NULL;
- 	
- 	LOG (g_message ( "local_record_from_comp\n" ));
- 
-@@ -585,20 +587,31 @@
- 
- 	/* STOP: don't replace these with g_strdup, since free_Memo
- 	   uses free to deallocate */
-+        e_cal_component_get_summary (comp, &summary);
-+        if (summary.value)
-+                textstr = g_strdup (summary.value);
- 
- 	e_cal_component_get_description_list (comp, &d_list);
- 	if (d_list) {
- 		description = (ECalComponentText *) d_list->data;
- 		if (description && description->value){
--			local->memo->text = e_pilot_utf8_to_pchar (description->value, pilot_charset);
-+			if (textstr) {
-+				char *tmp = textstr;
-+				textstr = g_strconcat (textstr, "\n", description->value, NULL);
-+				g_free (tmp);
-+			} else
-+				textstr = g_strdup (description->value);
- 		}
--		else{
--			local->memo->text = NULL;
--		}
--	} else {
--		local->memo->text = NULL;
-+		e_cal_component_free_text_list (d_list);
- 	}
--	
-+
-+	if (textstr)
-+		local->memo->text = e_pilot_utf8_to_pchar (textstr, pilot_charset);
-+	else
-+		local->memo->text = NULL;
-+
-+	g_free (textstr);
-+
- 	e_cal_component_get_classification (comp, &classif);
- 
- 	if (classif == E_CAL_COMPONENT_CLASS_PRIVATE)
-@@ -704,36 +717,25 @@
- 		e_cal_component_set_summary(comp, NULL);
- 	} else {
- 		int idxToUse = -1, ntext = strlen(memo.text);
--		gboolean foundNL = FALSE;
-+		gchar * NLchar = NULL;
- 		GSList l;
- 		ECalComponentText text, sumText;
- 
--		for(i = 0; i<ntext && i<50; i++){
--			if(memo.text[i] == '\n'){
--				idxToUse = i;
--				foundNL = TRUE;
--				break;
--			}
--		}
--		
--		if(foundNL == FALSE){
--			if(ntext > 50){
--				txt2 = g_strndup(memo.text, 50);
--			}
--			else{
--				txt2 = g_strdup(memo.text);
--				
--			}
--		}
--		else{
--			txt2 = g_strndup(memo.text, idxToUse); /* cuts off '\n' */
--			
-+		NLchar = strchr(memo.text, '\n');
-+		if (NLchar) {
-+			txt2 = g_strndup(memo.text, NLchar - memo.text);
-+			txt = g_strdup (NLchar + 1);
-+		} else {
-+			txt2 = g_strdup(memo.text);
-+			txt = NULL;
- 		}
- 
- 		sumText.value = txt3 = e_pilot_utf8_from_pchar(txt2, pilot_charset);
- 		sumText.altrep = NULL;
--
--		text.value = txt = e_pilot_utf8_from_pchar (memo.text, pilot_charset);
-+		if (txt)	
-+			text.value = e_pilot_utf8_from_pchar (txt, pilot_charset);
-+		else 
-+			text.value = g_strdup("");
- 		text.altrep = NULL;
- 		l.data = &text;
- 		l.next = NULL;
---- evolution-2.21.1/calendar/conduits/calendar/calendar-conduit.c.orig	2007-10-29 02:02:17.000000000 +0000
-+++ evolution-2.21.1/calendar/conduits/calendar/calendar-conduit.c	2007-10-31 07:42:19.655858456 +0000
-@@ -61,6 +61,8 @@
- #define WARN g_warning
- #define INFO g_message
- 
-+gchar *pilot_charset = NULL;
-+
- #define PILOT_MAX_ADVANCE 99
- 
- typedef struct _ECalLocalRecord ECalLocalRecord;
-@@ -944,19 +946,19 @@
- 	}
- 	
- 	/*Category support*/
--	e_pilot_local_category_to_remote(&(local->local.category), comp, &(ctxt->ai.category));
-+	e_pilot_local_category_to_remote(&(local->local.category), comp, &(ctxt->ai.category), pilot_charset);
- 
- 	/* STOP: don't replace these with g_strdup, since free_Appointment
- 	   uses free to deallocate */
- 	e_cal_component_get_summary (comp, &summary);
- 	if (summary.value) 
--		local->appt->description = e_pilot_utf8_to_pchar (summary.value);
-+		local->appt->description = e_pilot_utf8_to_pchar (summary.value, pilot_charset);
- 
- 	e_cal_component_get_description_list (comp, &d_list);
- 	if (d_list) {
- 		description = (ECalComponentText *) d_list->data;
- 		if (description && description->value)
--			local->appt->note = e_pilot_utf8_to_pchar (description->value);
-+			local->appt->note = e_pilot_utf8_to_pchar (description->value, pilot_charset);
- 		else
- 			local->appt->note = NULL;
- 	} else {
-@@ -1234,12 +1236,12 @@
- 
- 	e_cal_component_set_last_modified (comp, &now);
- 
--	summary.value = txt = e_pilot_utf8_from_pchar (appt.description);
-+	summary.value = txt = e_pilot_utf8_from_pchar (appt.description, pilot_charset);
- 	e_cal_component_set_summary (comp, &summary);
- 	free (txt);
- 	
- 	/*Category support*/
--	e_pilot_remote_category_to_local(remote->category, comp, category);
-+	e_pilot_remote_category_to_local(remote->category, comp, category, pilot_charset);
- 
- 	/* The iCal description field */
- 	if (!appt.note) {
-@@ -1248,7 +1250,7 @@
- 		GSList l;
- 		ECalComponentText text;
- 
--		text.value = txt = e_pilot_utf8_from_pchar (appt.note);
-+		text.value = txt = e_pilot_utf8_from_pchar (appt.note, pilot_charset);
- 		text.altrep = NULL;
- 		l.data = &text;
- 		l.next = NULL;
-@@ -1503,6 +1505,12 @@
- 	LOG (g_message ( "pre_sync: Calendar Conduit v.%s", CONDUIT_VERSION ));
- 
- 	ctxt->dbi = dbi;	
-+#ifdef PILOT_LINK_0_12
-+	if(NULL == dbi->pilotInfo->sync_options.pilot_charset)
-+		pilot_charset = NULL;
-+	else
-+		 pilot_charset = g_strdup(dbi->pilotInfo->sync_options.pilot_charset);
-+#endif
- 	ctxt->client = NULL;
- 
- 	/* Get the timezone */
-@@ -1688,6 +1696,8 @@
- 	if (e_cal_get_changes (ctxt->client, change_id, &changed, NULL))
- 		e_cal_free_change_list (changed);
- 	g_free (change_id);
-+	if (pilot_charset)
-+		g_free (pilot_charset);
- 	
- 	LOG (g_message ( "---------------------------------------------------------\n" ));
- 
---- evolution-2.21.1/mail/em-folder-browser.c.orig	2007-10-23 11:06:27.000000000 +0100
-+++ evolution-2.21.1/mail/em-folder-browser.c	2007-10-31 07:42:19.647428738 +0000
-@@ -614,6 +614,7 @@
- 
- void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
- {
-+#if 0
- 	if ((emfb->view.preview_active ^ state) == 0
- 	    || emfb->view.list == NULL) {
- 		if (state && emfb->priv->scope_restricted && emfb->view.list->cursor_uid && *(emfb->view.list->cursor_uid)) {
-@@ -623,6 +624,7 @@
- 			
- 		return;
- 	}
-+#endif
- 	
- 	emfb->view.preview_active = state;
- 	
 --- evolution-2.21.1/widgets/table/e-table-header-item.h.orig	2007-10-31 09:05:13.939190595 +0000
 +++ evolution-2.21.1/widgets/table/e-table-header-item.h	2007-10-31 09:05:44.759548067 +0000
 @@ -100,7 +100,7 @@
@@ -696,28 +292,6 @@
  		     "full_header", info->ethi->full_header,
  		     "header", info->ethi->eth,
  		     "dnd_code", info->ethi->dnd_code,
---- evolution-2.21.1/composer/e-msg-composer.c.orig	2007-10-29 02:02:16.000000000 +0000
-+++ evolution-2.21.1/composer/e-msg-composer.c	2007-10-31 07:42:19.689280513 +0000
-@@ -5410,8 +5410,6 @@
- 	EMsgComposerPrivate *p = composer->priv;
- 	
- 	/* always save drafts as HTML to preserve formatting */
--	old_send_html = p->send_html;
--	p->send_html = TRUE;
- 	old_flags[0] = p->pgp_sign;
- 	p->pgp_sign = FALSE;
- 	old_flags[1] = p->pgp_encrypt;
-@@ -5421,9 +5419,8 @@
- 	old_flags[3] = p->smime_encrypt;
- 	p->smime_encrypt = FALSE;
- 	
--	msg = build_message (composer, TRUE);
-+	msg = build_message (composer, p->send_html);
- 	
--	p->send_html = old_send_html;
- 	p->pgp_sign = old_flags[0];
- 	p->pgp_encrypt = old_flags[1];
- 	p->smime_sign = old_flags[2];
 --- evolution-2.21.1/shell/e-shell-window.c.orig	2007-10-31 09:28:49.023848460 +0000
 +++ evolution-2.21.1/shell/e-shell-window.c	2007-10-31 09:31:07.474483361 +0000
 @@ -91,7 +91,7 @@