Changeset 4293


Ignore:
Timestamp:
04/01/08 21:53:59 (5 years ago)
Author:
thomas
Message:

2008-04-01 Thomas Wood <thomas@…>

  • src/sms-contacts.c: (openmoko_contacts_util_dial_number):
  • src/sms-utils.c:

Remove functions copied from libhito which now conflict with built in
version of libhito.

Location:
trunk/src/target/OM-2007.2/applications/openmoko-messages2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog

    r4292 r4293  
     12008-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 
    192008-04-01  Thomas Wood  <thomas@openedhand.com> 
    210 
  • trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-contacts.c

    r4265 r4293  
    9191} 
    9292 
    93  
    94 /* hito_vcard_attribute_get_type() taken from hito-vcard-util.c 
    95  * 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     else 
    112     { 
    113       result = g_strdup (l->data); 
    114     } 
    115   } 
    116  
    117   return result; 
    118 } 
    119  
    120  
    12193static void 
    12294on_dial_number_clicked (GtkWidget *eb, GdkEventButton *event, GtkDialog *dialog) 
  • trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-utils.c

    r3918 r4293  
    2626#  include <config.h> 
    2727#endif 
    28  
    29 /* Following two functions taken from contacts hito branch, written by 
    30  * Ross Burton, copyright OpenedHand 2007 
    31  */ 
    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 seperated 
    57  * string for multivalue attributes 
    58  */ 
    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       else 
    75         attr_value = g_strdup (l->data); 
    76       g_free (old); 
    77     } 
    78   } 
    79   return attr_value; 
    80 } 
    8128 
    8229void 
Note: See TracChangeset for help on using the changeset viewer.