[maemo-commits] [maemo-commits] r12978 - in projects/haf/trunk/hildon-1: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Aug 1 13:19:55 EEST 2007
Author: mdk
Date: 2007-08-01 13:19:54 +0300 (Wed, 01 Aug 2007)
New Revision: 12978

Modified:
   projects/haf/trunk/hildon-1/ChangeLog
   projects/haf/trunk/hildon-1/src/hildon-date-editor.c
Log:
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.


Modified: projects/haf/trunk/hildon-1/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-1/ChangeLog	2007-08-01 09:57:06 UTC (rev 12977)
+++ projects/haf/trunk/hildon-1/ChangeLog	2007-08-01 10:19:54 UTC (rev 12978)
@@ -1,3 +1,10 @@
+2007-08-01  Michael Dominic Kostrzewa  <michael.kostrzewa at 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 at nokia.com> 
 
 	* src/hildon-code-dialog.c: Fixing the dialog button alignment inside the

Modified: projects/haf/trunk/hildon-1/src/hildon-date-editor.c
===================================================================
--- projects/haf/trunk/hildon-1/src/hildon-date-editor.c	2007-08-01 09:57:06 UTC (rev 12977)
+++ projects/haf/trunk/hildon-1/src/hildon-date-editor.c	2007-08-01 10:19:54 UTC (rev 12978)
@@ -1073,10 +1073,13 @@
 {
     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 @@
         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;
     }
 }
 


More information about the maemo-commits mailing list