soylent r171 - trunk/src



Author: treitter
Date: Mon Jun 23 02:58:25 2008
New Revision: 171
URL: http://svn.gnome.org/viewvc/soylent?rev=171&view=rev

Log:
make blog editing work again

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

Modified: trunk/src/soylent-browser-person-view.c
==============================================================================
--- trunk/src/soylent-browser-person-view.c	(original)
+++ trunk/src/soylent-browser-person-view.c	Mon Jun 23 02:58:25 2008
@@ -1396,6 +1396,42 @@
       }
   }
 
+  {
+    guint context = 0;
+
+    /* Prep the phone numbers for saving */
+    for (context = 0; context < ARRAY_LEN (CONTEXT_LIST_WEB); context++)
+      {
+        gchar *contents_new = NULL;
+        gchar *widget_name = NULL;
+        GtkHBox *hbox_web = NULL;
+
+        widget_name = g_strdup_printf ("hbox_person_web_%s",
+                                       CONTEXT_LIST_WEB[context]); 
+        hbox_web = GTK_HBOX (glade_xml_get_widget (wtree, widget_name)); 
+        g_free (widget_name);
+
+        /* By convention, the hbox is only visible if there's something
+         * useful in it */
+        if (GTK_WIDGET_VISIBLE (hbox_web))
+          {
+            GtkEntry *entry_web = NULL;
+
+            widget_name = g_strdup_printf ("entry_person_web_%s",
+                                           CONTEXT_LIST_WEB[context]); 
+            entry_web = GTK_ENTRY (glade_xml_get_widget (wtree, widget_name));
+            g_free (widget_name);
+
+            contents_new = g_strdup (gtk_entry_get_text (entry_web));
+            soylent_browser_person_set_field_simple
+                                              (e_contact,
+                                               E_CONTACT_FIELDS_WEB[context],
+                                               contents_new);
+            g_free (contents_new);
+          }
+      }
+  }
+
   /* FIXME: handle web address fields */
 
   soylent_browser_person_view_prep_changes_im (browser, e_contact);
@@ -3321,14 +3357,6 @@
   e_contact = soylent_person_get_e_contact (person);
   frame_web = GTK_FRAME (glade_xml_get_widget (wtree, "frame_person_web"));
 
-  /* XXX: for some reason, if we don't do this, e_contact_get_const() below does
-   * not see newly-added web URL details, even though we call this function
-   * right before we hit the function you're in now.
-   *
-   * I've narrowed it down to the ebook commit, but I'm not sure why that would
-   * change anything. */
-  soylent_browser_person_view_save_changes (NULL, browser);
-
   for (context = 0; context < ARRAY_LEN (CONTEXT_LIST_WEB); context++)
     {
       widget_name = g_strdup_printf ("entry_person_web_%s",



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