When the date editor entry has been changed but the numbers of characters < max,...
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Wed, 1 Aug 2007 10:19:54 +0000 (10:19 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Wed, 1 Aug 2007 10:19:54 +0000 (10:19 +0000)
ChangeLog
src/hildon-date-editor.c

index 46e4e83..db26f5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-01  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
+       * src/hildon-date-editor.c: When the date editor entry has been changed
+       but the numbers of characters < max, turn off the skip validation flag.
+       Prevents a situation when we enter first a valid year and later re-write
+       it with an invalid one. Fixes NB#60154.
+
 2007-07-26  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
        * src/hildon-code-dialog.c: Fixing the dialog button alignment inside the
index e74e722..dd0cc08 100644 (file)
@@ -1073,10 +1073,13 @@ hildon_date_editor_entry_changed                (GtkEditable *ed,
 {
     GtkEntry *entry;
     gint error_code;
+    
     HildonDateEditorPrivate *priv;
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE (HILDON_DATE_EDITOR (data));
 
     g_assert (GTK_IS_ENTRY (ed));
     g_assert (HILDON_IS_DATE_EDITOR (data));
+    g_assert (priv);
 
     entry = GTK_ENTRY (ed);
 
@@ -1086,11 +1089,11 @@ hildon_date_editor_entry_changed                (GtkEditable *ed,
         error_code = hildon_date_editor_entry_validate (GTK_WIDGET (entry), data);
         if (error_code == HILDON_DATE_TIME_ERROR_NO_ERROR)
         {
-            priv = HILDON_DATE_EDITOR_GET_PRIVATE (HILDON_DATE_EDITOR (data));
-            g_assert (priv);
             priv->skip_validation = TRUE;
             gtk_widget_child_focus (GTK_WIDGET (data), GTK_DIR_RIGHT);
         }
+    } else {
+        priv->skip_validation = FALSE;
     }
 }