From d1a03a7d97f934a1f4cb8f23940403a4c9415ecd Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 25 Apr 2010 23:45:44 -0400 Subject: Fix a potential crasher in e_contact_quick_add_email(). --- addressbook/gui/contact-editor/e-contact-quick-add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index d10ceeac6f..6a8a5fd19d 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -606,7 +606,7 @@ e_contact_quick_add_email (const gchar *email, EContactQuickAddCallback cb, gpoi name = g_strndup (email, lt - email); addr = g_strndup (lt + 1, gt - lt - 1); } else { - addr = email; + addr = g_strdup (email); } e_contact_quick_add (name, addr, cb, closure); -- cgit From a8801c8c87269d0d98b9915f0268097c8117f297 Mon Sep 17 00:00:00 2001 From: Bharath Acharya Date: Thu, 29 Apr 2010 14:10:25 +0530 Subject: Bug #617150 - Crash printing contacts in List View The returned widget does not have a reference added, so you do not need to unref it. --- addressbook/gui/widgets/e-addressbook-view.c | 1 - 1 file changed, 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 6ffeee56a0..d3538899ba 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1237,7 +1237,6 @@ e_addressbook_view_print (EAddressbookView *view, widget = gtk_bin_get_child (GTK_BIN (view)); printable = e_table_get_printable (E_TABLE (widget)); g_object_ref_sink (printable); - g_object_unref (widget); e_contact_print_button (printable, action); -- cgit From a7f1c9d0f86bd6ec035c151969216656af4f8bae Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 10 May 2010 12:12:06 +0200 Subject: Bug #618177 - Mobile Phone of imported contacts not shown in preview --- addressbook/importers/evolution-vcard-importer.c | 31 +++++++++++++++--------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'addressbook') diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c index 1222566387..080ef940f2 100644 --- a/addressbook/importers/evolution-vcard-importer.c +++ b/addressbook/importers/evolution-vcard-importer.c @@ -138,6 +138,7 @@ vcard_import_contact(VCardImporter *gci, EContact *contact) EVCardAttribute *a = attr->data; gboolean location_only = TRUE; gboolean no_location = TRUE; + gboolean is_work_home = FALSE; GList *params, *param; if (g_ascii_strcasecmp (e_vcard_attribute_get_name (a), @@ -155,6 +156,10 @@ vcard_import_contact(VCardImporter *gci, EContact *contact) vs = e_vcard_attribute_param_get_values (p); for (v = vs; v; v = v->next) { + is_work_home = is_work_home || + !g_ascii_strcasecmp ((gchar *)v->data, "WORK") || + !g_ascii_strcasecmp ((gchar *)v->data, "HOME"); + if (!g_ascii_strcasecmp ((gchar *)v->data, "WORK") || !g_ascii_strcasecmp ((gchar *)v->data, "HOME") || !g_ascii_strcasecmp ((gchar *)v->data, "OTHER")) @@ -164,17 +169,21 @@ vcard_import_contact(VCardImporter *gci, EContact *contact) } } - if (location_only) { - /* add VOICE */ - e_vcard_attribute_add_param_with_value (a, - e_vcard_attribute_param_new (EVC_TYPE), - "VOICE"); - } - if (no_location) { - /* add OTHER */ - e_vcard_attribute_add_param_with_value (a, - e_vcard_attribute_param_new (EVC_TYPE), - "OTHER"); + if (is_work_home) { + /* only WORK and HOME phone numbers require locations, + the rest should be kept as is */ + if (location_only) { + /* add VOICE */ + e_vcard_attribute_add_param_with_value (a, + e_vcard_attribute_param_new (EVC_TYPE), + "VOICE"); + } + if (no_location) { + /* add OTHER */ + e_vcard_attribute_add_param_with_value (a, + e_vcard_attribute_param_new (EVC_TYPE), + "OTHER"); + } } } -- cgit