]> saetta.ns0.it Git - libgtkform/commitdiff
Deprecation of g_strcasecmp.\n\nAnd a little bugfix.
authorAndrea Zagli <azagli@libero.it>
Sun, 9 Sep 2012 10:15:53 +0000 (12:15 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 9 Sep 2012 10:15:53 +0000 (12:15 +0200)
libgtkform/fielddatetime.c
libgtkform/fieldtext.c

index 720d51de86a34a7d1d9d2a252debfaad03269550..9810e7c038f1ea1be317246cbeb16b6e0011bf8c 100644 (file)
@@ -423,7 +423,7 @@ gtk_form_field_datetime_is_valid (GtkFormField *field)
                        if (min_value != NULL
                                && g_strcmp0 (min_value, "") != 0)
                                {
-                                       if (g_strcasecmp (min_value, "now") == 0)
+                                       if (g_strcmp0 (g_utf8_casefold (min_value, -1), "now") == 0)
                                                {
                                                        gdt_tmp = g_date_time_new_now_local ();
 
@@ -462,7 +462,7 @@ gtk_form_field_datetime_is_valid (GtkFormField *field)
                            && max_value != NULL
                            && g_strcmp0 (max_value, "") != 0)
                                {
-                                       if (g_strcasecmp (max_value, "now") == 0)
+                                       if (g_strcmp0 (g_utf8_casefold (max_value, -1), "now") == 0)
                                                {
                                                        gdt_tmp = g_date_time_new_now_local ();
 
index b7629712a44f6b4ff7ceb459ab4b30977857a8cd..15f07dd5a837db17dd6215288e54faafa51f51c1 100644 (file)
@@ -173,7 +173,7 @@ gchar
        gchar *ret;
        gchar *value;
 
-       ret = g_strup ("");
+       ret = g_strdup ("");
 
        value = gtk_form_field_text_get_value_stringify (field);