* hildon-widgets/hildon-time-editor.c (validated_conversion): return the minimum...
authorLuc Pionchon <luc.pionchon@nokia.com>
Mon, 5 Jun 2006 19:48:09 +0000 (19:48 +0000)
committerLuc Pionchon <luc.pionchon@nokia.com>
Mon, 5 Jun 2006 19:48:09 +0000 (19:48 +0000)
NB#30937

ChangeLog
hildon-widgets/hildon-time-editor.c

index 5db0e1f..87d09d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2006-06-05  Luc Pionchon  <luc.pionchon@nokia.com>
 
+       * hildon-widgets/hildon-time-editor.c
+       (validated_conversion): return the minimum allowed value for the
+       entry when the user types an empty text into an entry and moves
+       the focus, instead of returning -1. This change implies that the
+       minimum allowed value for the entry is set into the entry instead
+       of leaving it empty.
+
+       NB#30937
+
+
+2006-06-05  Luc Pionchon  <luc.pionchon@nokia.com>
+
        * hildon-widgets/hildon-grid.c (hildon_grid_class_init): do not
        use accumulator for "popup-context-menu"
 
index 5948738..9efe5d2 100644 (file)
@@ -1320,6 +1320,13 @@ static gint validated_conversion(HildonTimeEditorPrivate *priv,
     else if (allow_intermediate) 
         return -1;  /* Empty field while user is still editing. No error, but
                        cannot validate either... */
+    else /* Empty field: show error and set value to minimum allowed */
+      {
+        g_string_printf(error_string, _("ckct_ib_set_a_value_within_range"), min, max);
+        priv->error_widget = field;
+        *error_code = WITHIN_RANGE;
+        return min;
+      }
 
     /* Empty field and not allowed intermediated OR failed conversion */
     g_string_printf(error_string, _("ckct_ib_set_a_value_within_range"), min, max);