r3011 - in trunk/src/target/OM-2007.2/libraries/libmokoui2: . libmokoui

chris at sita.openmoko.org chris at sita.openmoko.org
Wed Sep 19 12:14:38 CEST 2007


Author: chris
Date: 2007-09-19 12:14:36 +0200 (Wed, 19 Sep 2007)
New Revision: 3011

Modified:
   trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog
   trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-hint-entry.c
Log:
        * libmokoui/moko-hint-entry.c: (update):
        Don't clear entry when user-entered text matches hint text


Modified: trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog	2007-09-19 09:47:48 UTC (rev 3010)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog	2007-09-19 10:14:36 UTC (rev 3011)
@@ -1,5 +1,10 @@
 2007-09-19  Chris Lord  <chris at openedhand.com>
 
+	* libmokoui/moko-hint-entry.c: (update):
+	Don't clear entry when user-entered text matches hint text
+
+2007-09-19  Chris Lord  <chris at openedhand.com>
+
 	* libmokoui/moko-finger-scroll.c: (moko_finger_scroll_refresh):
 	Take the border-width property of the container into account when
 	calculating if scroll-indicators should be visible

Modified: trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-hint-entry.c
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-hint-entry.c	2007-09-19 09:47:48 UTC (rev 3010)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-hint-entry.c	2007-09-19 10:14:36 UTC (rev 3011)
@@ -24,7 +24,7 @@
 #include <gtk/gtk.h>
 #include "moko-hint-entry.h"
 
-G_DEFINE_TYPE (MokoHintEntry, moko_hint_entry, GTK_TYPE_ENTRY);
+G_DEFINE_TYPE (MokoHintEntry, moko_hint_entry, GTK_TYPE_ENTRY)
 
 #define GET_PRIVATE(o) \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), MOKO_TYPE_HINT_ENTRY, MokoHintEntryPrivate))
@@ -58,9 +58,9 @@
   text = gtk_entry_get_text (GTK_ENTRY (entry));
 
   if (GTK_WIDGET_HAS_FOCUS (entry)) {
-    priv->state = STATE_ENTRY;
-    gtk_widget_modify_text (widget, GTK_STATE_NORMAL, NULL);
-    if (strcmp (text, priv->hint) == 0) {
+    if (priv->state == STATE_HINTING) {
+      priv->state = STATE_ENTRY;
+      gtk_widget_modify_text (widget, GTK_STATE_NORMAL, NULL);
       gtk_entry_set_text (GTK_ENTRY (entry), "");
     }
   } else {





More information about the commitlog mailing list