+2006-10-05 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+
+ * hildon-widgets/hildon-time-editor.c
+ (validated_conversion): Modifications to check the '-'
+ input and change value to the default min. Fixes NB#40059.
+
2006-10-04 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
* hildon-widgets/hildon-set-password-dialog.c: Turning off the
value = strtol(text, &tail, 10);
/* Check if conversion succeeded */
- if (tail[0] == 0)
+ if ((tail[0] == 0) && !(text[0] == '-'))
{
if (value > max) {
g_string_printf(error_string, _("ckct_ib_maximum_value"), max);
return value;
}
/* We'll handle failed conversions soon */
+ else
+ {
+ if ((tail[0] == '-') || (text[0] == '-'))
+ {
+ g_string_printf(error_string, _("ckct_ib_minimum_value"), min);
+ priv->error_widget = field;
+ *error_code = MIN_VALUE;
+ return min;
+ }
+ }
}
else if (allow_intermediate)
return -1; /* Empty field while user is still editing. No error, but