From: Michael Dominic Kostrzewa Date: Wed, 1 Aug 2007 10:19:54 +0000 (+0000) Subject: When the date editor entry has been changed but the numbers of characters < max,... X-Git-Tag: 2.1.66-1~825 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=2457aad067514b17041dde51b5e37f14fdf36f01;p=hildon 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. --- diff --git a/ChangeLog b/ChangeLog index 46e4e83..db26f5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-08-01 Michael Dominic Kostrzewa + + * 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 * src/hildon-code-dialog.c: Fixing the dialog button alignment inside the diff --git a/src/hildon-date-editor.c b/src/hildon-date-editor.c index e74e722..dd0cc08 100644 --- a/src/hildon-date-editor.c +++ b/src/hildon-date-editor.c @@ -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; } }