[gnome-contacts/gnome-3-4] Fix retrieving Personal evo group name



commit 0ce0d3f23698986a1ae21b91c6aea984e411d391
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Wed Apr 18 20:01:08 2012 +0200

    Fix retrieving Personal evo group name
    
    The code building the domain was always building odd (unstable)
    versions, and was not initializing the localedir appropriately.
    This resulted in "Personal" instead of the right group name and
    therefore did not recognize the system group.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674347
    (cherry picked from commit dfda1ee01e7c326696df6be233d560f3667cf55d)
    
    Conflicts:
    
    	src/main.vala

 src/contacts-esd-setup.c |    9 +++++++--
 src/main.vala            |    3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/contacts-esd-setup.c b/src/contacts-esd-setup.c
index 858a654..dc95b34 100644
--- a/src/contacts-esd-setup.c
+++ b/src/contacts-esd-setup.c
@@ -621,9 +621,14 @@ eds_personal_google_group_name (void)
   char *domain;
 
   if (name == NULL) {
-    domain = g_strdup_printf ("evolution-data-server-%d.%d\n",
+    domain = g_strdup_printf ("evolution-data-server-%d.%d",
 			      EDS_MAJOR_VERSION,
-			      EDS_MINOR_VERSION + ((EDS_MINOR_VERSION + 1) % 2));
+			      EDS_MINOR_VERSION + ((EDS_MINOR_VERSION) % 2));
+
+    /* Let's assume e-d-s is installed in the same prefix as gnome-contacts
+       (which works for system and jhbuild setups) */
+    bindtextdomain (domain, LOCALEDIR);
+
     name = dgettext (domain, "Personal");
     g_free (domain);
   }
diff --git a/src/main.vala b/src/main.vala
index a0459ec..18bf03b 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -21,11 +21,12 @@ using Contacts;
 
 public static int
 main (string[] args) {
-  Notify.init (_("Contacts"));
   Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
   Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
   Intl.textdomain (Config.GETTEXT_PACKAGE);
 
+  Notify.init (_("Contacts"));
+
   Gtk.init (ref args);
 
   var app = new App ();



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