soylent r118 - trunk/src



Author: treitter
Date: Wed Apr  2 08:20:43 2008
New Revision: 118
URL: http://svn.gnome.org/viewvc/soylent?rev=118&view=rev

Log:
cut debugging code from last commit

Modified:
   trunk/src/eds-utils.c
   trunk/src/soylent-browser-person-view.c

Modified: trunk/src/eds-utils.c
==============================================================================
--- trunk/src/eds-utils.c	(original)
+++ trunk/src/eds-utils.c	Wed Apr  2 08:20:43 2008
@@ -158,11 +158,10 @@
                              const gchar *value)
 {
   gboolean retval = FALSE;
-  GList *attr_list = NULL;
-  GList *attr_list_prev = NULL;
+  GList *l = NULL;
+  GList *attr_node = NULL;
   GList *attr_list_head = NULL;
   EVCardAttribute *attr = NULL;
-  EVCardAttribute *attr_prev = NULL;
   GList *type_existing = NULL;
 
   g_return_val_if_fail (e_contact, retval);
@@ -174,50 +173,40 @@
   g_return_val_if_fail (abs_num > 0, retval);
   /* value may be NULL */
 
-  g_debug ("abs_num passed in: %d", abs_num);
-
   attr_list_head = e_contact_get_attributes (e_contact, field_id);
   if (attr_list_head)
     {
       /* FIXME: there's got to be a cleaner way to do this */
-      for (attr_list = attr_list_head;
-           attr_list && (abs_num > 0);
-           attr_list = g_list_next (attr_list))
+      for (l = attr_list_head;
+           l && (abs_num > 0);
+           l = g_list_next (l))
         {
-          attr = attr_list->data;
-          type_existing = e_vcard_attribute_get_param (attr, EVC_TYPE);
+          EVCardAttribute *attr_cur = NULL;
+
+          attr_cur = l->data;
+          type_existing = e_vcard_attribute_get_param (attr_cur, EVC_TYPE);
           /* FIXME: apparently an attribute could have multiple types; handle it
            * */
           if (type_existing && g_str_equal (type, type_existing->data))
             {
               abs_num--;
-              attr_prev = attr;
-              attr_list_prev = attr_list;
+              attr_node = l;
+              attr = attr_cur;
             }
         }
 
-      g_debug ("attr_list: %p", attr_list);
-      g_debug ("attr: %p", attr);
-      g_debug ("attr_list_prev: %p", attr_list_prev);
-      g_debug ("attr_prev: %p", attr_prev);
-      g_debug ("abs_num: %d", abs_num);
       /* XXX: the abs_num >= 0 check seems unnecessary */
-      if (attr_prev && abs_num >= 0)
+      if (attr && abs_num >= 0)
         {
           if (value && !g_str_equal (value, ""))
             {
-              e_vcard_attribute_remove_values (attr_prev);
-              e_vcard_attribute_add_value (attr_prev, value);
+              e_vcard_attribute_remove_values (attr);
+              e_vcard_attribute_add_value (attr, value);
             }
           else
             {
-              g_debug ("deleting link: %p: %s", attr_list_prev,
-                       (gchar*) e_vcard_attribute_get_value
-                                                        (attr_list_prev->data));
-              g_debug ("attr_list_head before delete: %p", attr_list_head);
               attr_list_head = g_list_delete_link (attr_list_head,
-                                                   attr_list_prev);
-              g_debug ("attr_list_head after delete: %p", attr_list_head);
+                                                   attr_node);
             }
 
           e_contact_set_attributes (e_contact, field_id, attr_list_head);

Modified: trunk/src/soylent-browser-person-view.c
==============================================================================
--- trunk/src/soylent-browser-person-view.c	(original)
+++ trunk/src/soylent-browser-person-view.c	Wed Apr  2 08:20:43 2008
@@ -363,13 +363,6 @@
       {
         gboolean view_update_retval = FALSE;
 
-        /* FIXME: cut this */
-          {
-            EContact *e_contact = soylent_person_get_e_contact (person);
-            soylent_debug ("\n%s\n", e_vcard_to_string (E_VCARD (e_contact),
-                                                        EVC_FORMAT_VCARD_30));
-          }
-
         view_update_retval = soylent_browser_person_view_update (browser,
                                                                  person);
         if (view_update_retval)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]