From 9b474534b65b944b8a5eed89bc182210f80cc031 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 05 2015 13:34:47 +0000 Subject: import gnome-contacts-3.8.2-6.el7 --- diff --git a/SOURCES/gnome-contacts-3.8.2-show-address-fields.patch b/SOURCES/gnome-contacts-3.8.2-show-address-fields.patch new file mode 100644 index 0000000..f7b3c74 --- /dev/null +++ b/SOURCES/gnome-contacts-3.8.2-show-address-fields.patch @@ -0,0 +1,44 @@ +From 23ba9b75ee77fc3eebfec7daffef9310063b3fb0 Mon Sep 17 00:00:00 2001 +From: David King +Date: Wed, 17 Dec 2014 14:25:17 +0000 +Subject: [PATCH] Show address fields when adding the first contact + +The new contact dialog iterates over the list of address fields, which +are declared as static in the Contact class. Static data in Vala is +implemented by initializing the data during class_init(), or in other +words, the first time that the class is instantiated. When adding the +first contact, there are no instances of Contact, and so the address +fields have not been initialized. This leads to a blank space in the new +contact dialog, where the list of address fields should be. + +Ensure that class_init() of the Contact class has been called by +calling g_type_class_ref() on the Type before iterating over the address +fields. + +https://bugzilla.gnome.org/show_bug.cgi?id=702810 +--- + src/contacts-new-contact-dialog.vala | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/contacts-new-contact-dialog.vala b/src/contacts-new-contact-dialog.vala +index 816c863..c98f305 100644 +--- a/src/contacts-new-contact-dialog.vala ++++ b/src/contacts-new-contact-dialog.vala +@@ -176,6 +176,14 @@ public class Contacts.NewContactDialog : Dialog { + sub_grid.set_hexpand (true); + entries.add (sub_grid); + ++ /* Ensure that class_init() of Contact has been called, to initialize the ++ * static members, including postal_element_props. */ ++ var contact_type = Type.from_name ("ContactsContact"); ++ if (contact_type != 0) { ++ // Type has been registered, make sure that class_init() has been called. ++ contact_type.class_ref (); ++ } ++ + for (int i = 0; i < Contact.postal_element_props.length; i++) { + var entry = new Entry (); + entry.set ("placeholder-text", Contact.postal_element_names[i]); +-- +1.8.3.1 + diff --git a/SPECS/gnome-contacts.spec b/SPECS/gnome-contacts.spec index d9be26a..439ad35 100644 --- a/SPECS/gnome-contacts.spec +++ b/SPECS/gnome-contacts.spec @@ -1,6 +1,6 @@ Name: gnome-contacts Version: 3.8.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Contacts manager for GNOME License: GPLv2+ @@ -11,6 +11,10 @@ Source0: http://download.gnome.org/sources/%{name}/3.8/%{name}-%{version} # upstream fix Patch0: 0001-Add-a-man-page.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1053654 +# https://bugzilla.gnome.org/show_bug.cgi?id=702810 +Patch1: gnome-contacts-3.8.2-show-address-fields.patch + BuildRequires: folks-devel BuildRequires: gtk3-devel BuildRequires: vala-devel @@ -34,6 +38,7 @@ Provides: contacts %prep %setup -q %patch0 -p1 +%patch1 -p1 autoreconf -i -f intltoolize -f @@ -70,6 +75,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %changelog +* Wed Dec 17 2014 David King - 3.8.2-6 +- Fix display of address fields when adding the first contact (#1053654) + * Fri Jan 24 2014 Daniel Mach - 3.8.2-5 - Mass rebuild 2014-01-24