2008-09-16 Claudio Saavedra <csaavedra@igalia.com>
authorClaudio Saavedra <csaavedra@igalia.com>
Tue, 16 Sep 2008 12:58:06 +0000 (12:58 +0000)
committerClaudio Saavedra <csaavedra@igalia.com>
Tue, 16 Sep 2008 12:58:06 +0000 (12:58 +0000)
* src/hildon-touch-selector-entry.c:
(hildon_touch_selector_entry_changed): Check if there is no text
selected before setting the entry text.
Fixes: NB#88576

ChangeLog
src/hildon-touch-selector-entry.c

index 64ba675..01a618a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-16  Claudio Saavedra  <csaavedra@igalia.com>
+
+       * src/hildon-touch-selector-entry.c:
+       (hildon_touch_selector_entry_changed): Check if there is no text
+       selected before setting the entry text.
+       Fixes: NB#88576
+
 2008-09-15  Alberto Garcia  <agarcia@igalia.com>
 
        * src/hildon-touch-selector.h
index fed7de7..b426f38 100644 (file)
@@ -315,9 +315,11 @@ hildon_touch_selector_entry_changed (HildonTouchSelector * selector,
   priv = HILDON_TOUCH_SELECTOR_ENTRY_GET_PRIVATE (selector);
 
   text = hildon_touch_selector_get_text_from_model (HILDON_TOUCH_SELECTOR_ENTRY (selector));
-  gtk_entry_set_text (GTK_ENTRY (priv->entry), text);
-  gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1);
-  g_free (text);
+  if (text != NULL) {
+    gtk_entry_set_text (GTK_ENTRY (priv->entry), text);
+    gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1);
+    g_free (text);
+  }
 }
 
 static void