Changeset 4293
- Timestamp:
- 04/01/08 21:53:59 (5 years ago)
- Location:
- trunk/src/target/OM-2007.2/applications/openmoko-messages2
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
src/sms-contacts.c (modified) (1 diff)
-
src/sms-utils.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
r4292 r4293 1 2008-04-01 Thomas Wood <thomas@openedhand.com> 2 3 * src/sms-contacts.c: (openmoko_contacts_util_dial_number): 4 * src/sms-utils.c: 5 6 Remove functions copied from libhito which now conflict with built in 7 version of libhito. 8 1 9 2008-04-01 Thomas Wood <thomas@openedhand.com> 2 10 -
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-contacts.c
r4265 r4293 91 91 } 92 92 93 94 /* hito_vcard_attribute_get_type() taken from hito-vcard-util.c95 * Copyright 2007 OpenedHand Ltd, licensed under GPL */96 gchar*97 hito_vcard_attribute_get_type (EVCardAttribute *attr)98 {99 GList *list, *l;100 gchar *result = NULL;101 list = e_vcard_attribute_get_param (attr, "TYPE");102 103 for (l = list; l; l = g_list_next (l))104 {105 if (result)106 {107 gchar *old_result = result;108 result = g_strconcat (l->data, ";", old_result, NULL);109 g_free (old_result);110 }111 else112 {113 result = g_strdup (l->data);114 }115 }116 117 return result;118 }119 120 121 93 static void 122 94 on_dial_number_clicked (GtkWidget *eb, GdkEventButton *event, GtkDialog *dialog) -
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-utils.c
r3918 r4293 26 26 # include <config.h> 27 27 #endif 28 29 /* Following two functions taken from contacts hito branch, written by30 * Ross Burton, copyright OpenedHand 200731 */32 GList *33 hito_vcard_get_named_attributes (EVCard *contact, const char *name)34 {35 GList *attrs = NULL, *l;36 37 g_return_val_if_fail (E_IS_VCARD (contact), NULL);38 g_return_val_if_fail (name != NULL, NULL);39 40 for (l = e_vcard_get_attributes (E_VCARD (contact)); l; l = l->next)41 {42 EVCardAttribute *attr;43 const char *n;44 45 attr = (EVCardAttribute *) l->data;46 n = e_vcard_attribute_get_name (attr);47 48 if (strcmp (n, name) == 0)49 attrs = g_list_prepend (attrs, attr);50 }51 52 return g_list_reverse (attrs);53 }54 55 /*56 * load the attribute value, returning a newly allocated semicolon seperated57 * string for multivalue attributes58 */59 gchar*60 hito_vcard_attribute_get_value_string (EVCardAttribute *attr)61 {62 gchar *attr_value = NULL;63 GList *l;64 l = e_vcard_attribute_get_values (attr);65 if (l)66 {67 attr_value = g_strdup (l->data);68 69 while ((l = g_list_next (l)))70 {71 gchar *old = attr_value;72 if (old)73 attr_value = g_strdup_printf ("%s; %s", old, (gchar*) l->data);74 else75 attr_value = g_strdup (l->data);76 g_free (old);77 }78 }79 return attr_value;80 }81 28 82 29 void
Note: See TracChangeset
for help on using the changeset viewer.
