soylent r169 - trunk/src
- From: treitter svn gnome org
- To: svn-commits-list gnome org
- Subject: soylent r169 - trunk/src
- Date: Mon, 23 Jun 2008 02:39:33 +0000 (UTC)
Author: treitter
Date: Mon Jun 23 02:39:33 2008
New Revision: 169
URL: http://svn.gnome.org/viewvc/soylent?rev=169&view=rev
Log:
add back support for editing phone numbers
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:39:33 2008
@@ -1354,7 +1354,6 @@
}
}
-#if 0
{
guint context = 0;
@@ -1362,42 +1361,34 @@
for (context = 0; context < ARRAY_LEN (CONTEXT_LIST_PHONE); context++)
{
gchar *contents_new = NULL;
- guint phone_pos = 0;
gchar *widget_name = NULL;
GtkHBox *hbox_phone = NULL;
- widget_name = g_strdup_printf ("hbox_person_phone_%d", email_num);
- hbox_email = GTK_HBOX (glade_xml_get_widget (wtree, widget_name));
+ widget_name = g_strdup_printf ("hbox_person_phone_%s",
+ CONTEXT_LIST_PHONE[context]);
+ hbox_phone = 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_email))
+ if (GTK_WIDGET_VISIBLE (hbox_phone))
{
- GtkEntry *entry_email = NULL;
+ GtkEntry *entry_phone = NULL;
- widget_name = g_strdup_printf ("entry_person_email_%d", email_num);
- entry_email = GTK_ENTRY (glade_xml_get_widget (wtree, widget_name));
+ widget_name = g_strdup_printf ("entry_person_phone_%s",
+ CONTEXT_LIST_PHONE[context]);
+ entry_phone = GTK_ENTRY (glade_xml_get_widget (wtree, widget_name));
g_free (widget_name);
- contents_new = g_strdup (gtk_entry_get_text (entry_email));
-
- /* Ensure name is set to something useful, to prevent blanking the
- * name the first time it's edited */
- if (contents_new && !g_str_equal (contents_new, ""))
- {
- soylent_browser_person_set_field_simple
- (e_contact,
- (E_CONTACT_EMAIL_1 - 1 + email_num),
- contents_new);
- }
-
+ contents_new = g_strdup (gtk_entry_get_text (entry_phone));
+ soylent_browser_person_set_field_simple
+ (e_contact,
+ E_CONTACT_FIELDS_PHONE[context],
+ contents_new);
g_free (contents_new);
}
- /* FIXME: handle phone fields */
}
}
-#endif
/* FIXME: handle web address fields */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]