[meego-commits] 23541: Changes to MeeGo:1.2.0:oss:Update:Testing/evolution

Alban Crequy no_reply at build.meego.com
Wed Aug 3 14:01:39 UTC 2011


Hi,
I have made the following changes to evolution in project MeeGo:1.2.0:oss:Update:Testing. Please review and accept ASAP.

Thank You,
Alban Crequy

[This message was auto-generated]

---

Request #23541:

  submit:   home:albanc:branches:MeeGo:1.2.0:oss:Update:Testing/evolution(r3)(cleanup) -> MeeGo:1.2.0:oss:Update:Testing/evolution


Message:
    * Wed Aug 03 2011 Alban Crequy <alban.crequy at collabora.co.uk> - 2.32.3
- Do not duplicate google address book (BMC#1429, upstream bug: BGO#653358)

State:   new          2011-08-03T07:01:32 albanc
Comment: None



changes files:
--------------
--- evolution.changes
+++ evolution.changes
@@ -0,0 +1,3 @@
+* Wed Aug 03 2011 Alban Crequy <alban.crequy at collabora.co.uk> - 2.32.3
+- Do not duplicate google address book (BMC#1429, upstream bug: BGO#653358)
+

new:
----
  0001-Do-not-duplicate-google-address-book.patch

spec files:
-----------
--- evolution.spec
+++ evolution.spec
@@ -55,6 +55,7 @@
 Patch8: evolution-encryption-l10n-bug-7203.patch
 Patch9: 0001-Make-sure-the-contacts-container-is-scrollable-when-.patch
 Patch10: 0001-Limit-the-size-of-tab-labels-to-a-reasonable-size.patch
+Patch11: 0001-Do-not-duplicate-google-address-book.patch
 
 ## Dependencies ###
 
@@ -171,6 +172,7 @@
 %patch8 -p1 -b .evolution-encryption-l10n-bug-7203
 %patch9 -p1 -b .0001-Make-sure-the-contacts-container-is-scrollable-when-
 %patch10 -p1 -b .0001-Limit-the-size-of-tab-labels-to-a-reasonable-size
+%patch11 -p1 -b .0001-Do-not-duplicate-google-address-book
 
 mkdir -p krb5-fakeprefix/include
 mkdir -p krb5-fakeprefix/lib

other changes:
--------------

++++++ 0001-Do-not-duplicate-google-address-book.patch (new)
--- 0001-Do-not-duplicate-google-address-book.patch
+++ 0001-Do-not-duplicate-google-address-book.patch
+From c286d907d14283d734af2f752551cc553df359ff Mon Sep 17 00:00:00 2001
+From: Gustavo Noronha Silva <gustavo.noronha at collabora.com>
+Date: Fri, 24 Jun 2011 15:16:33 -0300
+Subject: [PATCH] Do not duplicate google address book
+
+When a GMail account check that the address book does not already
+exist before creating an ESource for it, and adding it to the list.
+
+Fixes https://bugs.meego.com/show_bug.cgi?id=1429
+---
+ capplet/settings/mail-account-view.c |   67 ++++++++++++++++++++++------------
+ 1 files changed, 44 insertions(+), 23 deletions(-)
+
+diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
+index 1dc638e..23cafbe 100644
+--- a/capplet/settings/mail-account-view.c
++++ b/capplet/settings/mail-account-view.c
+@@ -407,36 +407,57 @@ setup_google_accounts (MailAccountView *mav)
+ 	if (mav->priv->do_gcontacts) {
+ 		ESourceList *slist;
+ 		ESourceGroup *sgrp;
+-		ESource *abook;
+-		gchar *rel_uri;;
++		GSList *sources;
++		gboolean source_already_exists = FALSE;
+ 
+ 		slist = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources" );
+ 
+ 		sgrp = e_source_list_peek_group_by_base_uri (slist, "google://");
+ 
+-		/* FIXME: Not sure if we should localize 'Contacts' */
+-		abook = e_source_new ("Contacts", "");
+-		e_source_set_property (abook, "default", "true");
+-		e_source_set_property (abook, "offline_sync", "1");
+-		e_source_set_property (abook, "auth", "plain/password");
+-		e_source_set_property (abook, "use-ssl", "true");
+-		e_source_set_property (abook, "remember_password", "true");
+-		e_source_set_property (abook, "refresh-interval", "86400");
+-		e_source_set_property (abook, "completion", "true");
+-		e_source_set_property (abook, "username", mav->priv->username);
+-		e_source_set_relative_uri (abook, mav->priv->username);
++		sources = e_source_group_peek_sources (sgrp);
++		for (; sources; sources = sources->next)
++		{
++			ESource *existing = (ESource*) sources->data;
+ 
+-		rel_uri = g_strdup_printf("google://%s/", mav->priv->username);
+-		e_passwords_add_password (rel_uri, gtk_entry_get_text((GtkEntry *)mav->password));
+-		e_passwords_remember_password ("Addressbook", rel_uri);
+-		e_source_group_add_source (sgrp, abook, -1);
+-		e_source_list_sync (slist, NULL);
++			if (!g_strcmp0 (e_source_peek_relative_uri (existing),
++					mav->priv->username))
++			{
++				source_already_exists = TRUE;
++				break;
++			}
++		}
+ 
+-		g_free(rel_uri);
+-		g_object_unref(slist);
+-		g_object_unref(sgrp);
+-		g_object_unref(abook);
++		if (!source_already_exists)
++                {
++			ESource *abook;
++			gchar *rel_uri;
++
++			/* FIXME: Not sure if we should localize 'Contacts' */
++			abook = e_source_new ("Contacts", "");
++			e_source_set_property (abook, "default", "true");
++			e_source_set_property (abook, "offline_sync", "1");
++			e_source_set_property (abook, "auth", "plain/password");
++			e_source_set_property (abook, "use-ssl", "true");
++			e_source_set_property (abook, "remember_password", "true");
++			e_source_set_property (abook, "refresh-interval", "86400");
++			e_source_set_property (abook, "completion", "true");
++			e_source_set_property (abook, "username", mav->priv->username);
++
++			e_source_group_add_source (sgrp, abook, -1);
++
++			e_source_set_relative_uri (abook, mav->priv->username);
++
++			rel_uri = g_strdup_printf ("google://%s/", mav->priv->username);
++			e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *) mav->password));
++			e_passwords_remember_password ("Addressbook", rel_uri);
++			e_source_list_sync (slist, NULL);
++
++			g_free (rel_uri);
++			g_object_unref (abook);
++		}
+ 
++		g_object_unref (slist);
++		g_object_unref (sgrp);
+ 	}
+ 
+ 	g_object_unref (gconf);
+-- 
+1.7.5.4
+



More information about the MeeGo-commits mailing list