r1807 - in trunk/src/target/OM-2007/applications/openmoko-contacts: . src
thomas at sita.openmoko.org
thomas at sita.openmoko.org
Thu Apr 19 17:47:08 CEST 2007
Author: thomas
Date: 2007-04-19 17:47:07 +0200 (Thu, 19 Apr 2007)
New Revision: 1807
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
Log:
* src/contacts-callbacks-ebook.c: (contacts_added_cb),
(contacts_changed_cb):
* src/contacts-contact-pane.c: (field_changed), (make_widget):
Plug some leaks and other potential problems
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog 2007-04-19 11:47:35 UTC (rev 1806)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog 2007-04-19 15:47:07 UTC (rev 1807)
@@ -1,5 +1,13 @@
2007-04-19 Thomas Wood <thomas at openedhand.com>
+ * src/contacts-callbacks-ebook.c: (contacts_added_cb),
+ (contacts_changed_cb):
+ * src/contacts-contact-pane.c: (field_changed), (make_widget):
+
+ Plug some leaks and other potential problems
+
+2007-04-19 Thomas Wood <thomas at openedhand.com>
+
* src/contacts-contact-pane.c: (make_widget), (update_ui):
- Add support for internally tagging multi line fields
- Add address, birthday and notes fields
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c 2007-04-19 11:47:35 UTC (rev 1806)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c 2007-04-19 15:47:07 UTC (rev 1807)
@@ -98,6 +98,7 @@
(data->contacts_groups, group->data);
}
}
+ g_list_foreach (contact_groups, (GFunc) g_free, NULL);
g_list_free (contact_groups);
}
}
@@ -134,7 +135,7 @@
/* TODO: There's some funniness going on here... */
/* Replace contact */
- g_object_unref (hash->contact);
+ /* g_object_unref (hash->contact); */
hash->contact = g_object_ref (contact);
hash->contacts_data = data;
g_hash_table_steal (data->contacts_table, uid);
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c 2007-04-19 11:47:35 UTC (rev 1806)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c 2007-04-19 15:47:07 UTC (rev 1807)
@@ -215,15 +215,18 @@
/* don't save the value if we're just displaying the field name */
if (value && !strcmp (info->display_name, value))
return;
-
- /* TODO: this only handles single-valued attributes at the moment */
+
+ /* remove the current attributes */
e_vcard_attribute_remove_values (attr);
+ /* add the new attributes */
int i = 0;
gchar* s;
gchar** values = g_strsplit (value, ";", 0);
while ((s = values[i])) {
- e_vcard_attribute_add_value (attr, g_strstrip (s));
+ g_strstrip (s);
+ if (s)
+ e_vcard_attribute_add_value (attr, s);
i++;
}
g_strfreev (values);
@@ -513,7 +516,7 @@
if (type == NULL && info->types != NULL)
{
- type = info->types[0].vcard;
+ type = g_strdup (info->types[0].vcard);
}
/* insert add/remove buttons */
@@ -672,6 +675,7 @@
gtk_widget_show_all (box);
g_free (attr_value);
+ g_free (type);
return box;
}
More information about the commitlog
mailing list