r2298 - in trunk/src/target/OM-2007/applications/openmoko-contacts: . src
thomas at sita.openmoko.org
thomas at sita.openmoko.org
Mon Jun 18 19:32:06 CEST 2007
Author: thomas
Date: 2007-06-18 19:32:04 +0200 (Mon, 18 Jun 2007)
New Revision: 2298
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
Log:
* src/contacts-contact-pane.c: (make_widget): Add a button for telephone
fields that can be used to launch the dialer
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog 2007-06-18 17:26:28 UTC (rev 2297)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog 2007-06-18 17:32:04 UTC (rev 2298)
@@ -1,3 +1,8 @@
+2007-06-18 Thomas Wood <thomas at openedhand.com>
+
+ * src/contacts-contact-pane.c: (make_widget): Add a button for telephone
+ fields that can be used to launch the dialer
+
2007-05-18 Thomas Wood <thomas at openedhand.com>
Patch by: Neil J Patel <njp at o-hand.com>
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c 2007-06-18 17:26:28 UTC (rev 2297)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c 2007-06-18 17:32:04 UTC (rev 2298)
@@ -779,16 +779,26 @@
if (!attr_value)
attr_value = g_strdup ("");
- if (info->format)
+
+ if (!strcmp (info->vcard_field, EVC_TEL))
{
- escaped_str = g_markup_printf_escaped (info->format, attr_value);
- label = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (label), escaped_str);
- g_free (escaped_str);
+ /* telephone fields are buttons to launch dialer */
+ label = gtk_button_new_with_label (attr_value);
+ gtk_widget_set_name (label, "mokofingerbutton-white");
+ /* TODO: add some callback to launch dialer */
}
else
- label = gtk_label_new (attr_value);
-
+ {
+ if (info->format)
+ {
+ escaped_str = g_markup_printf_escaped (info->format, attr_value);
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label), escaped_str);
+ g_free (escaped_str);
+ }
+ else
+ label = gtk_label_new (attr_value);
+ }
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
/* Load the correct pixbuf */
More information about the commitlog
mailing list