]> saetta.ns0.it Git - solipa/libsolipa/commitdiff
Azzerata proprietà thousands_separator in SolipaAllegato::add_to_zakformgtk.
authorAndrea Zagli <azagli@libero.it>
Tue, 13 Dec 2016 08:01:44 +0000 (09:01 +0100)
committerAndrea Zagli <azagli@libero.it>
Tue, 13 Dec 2016 08:01:44 +0000 (09:01 +0100)
src/allegato.c

index 8dfd344a67d1e4a3c195cab32bce9bf25045294f..1f84c418d0943dce1ac4ac6a4299c04724b91812 100644 (file)
@@ -388,6 +388,8 @@ solipa_allegato_add_to_zakformgtk (SolipaAllegato *solipa_allegato,
        GtkFormField *fdatetime;
        GtkFormField *fint;
 
+       GHashTable *ht;
+
        g_return_if_fail (IS_SOLIPA_ALLEGATO (solipa_allegato));
        g_return_if_fail (ZAK_FORM_GTK_IS_FORM (form));
        g_return_if_fail (percorso_field != NULL);
@@ -401,12 +403,10 @@ solipa_allegato_add_to_zakformgtk (SolipaAllegato *solipa_allegato,
        zak_form_element_set_provider_type (element, "string");
        validator = zak_form_element_validator_notempty_new ();
        zak_form_element_add_validator (element, validator);
-       zak_form_form_add_element (form, element);
+       zak_form_form_add_element (ZAK_FORM_FORM (form), element);
 
        if (data_field != NULL)
                {
-                       GHashTable *ht;
-
                        element = zak_form_gtk_form_element_entry_new ();
                        zak_form_gtk_form_element_set_widget_from_gtkbuilder (element, priv->gtkbuilder, "entry44");
                        zak_form_gtk_form_element_set_label (ZAK_FORM_GTK_FORM_ELEMENT (element), gtk_builder_get_object (priv->gtkbuilder, "label141"));
@@ -421,7 +421,8 @@ solipa_allegato_add_to_zakformgtk (SolipaAllegato *solipa_allegato,
                        validator = zak_form_element_validator_date_new ();
                        zak_form_element_validator_date_set_format (ZAK_FORM_ELEMENT_VALIDATOR_DATE (validator), "%d/%m/%Y %H.%M.%S");
                        zak_form_element_add_validator (element, validator);
-                       zak_form_form_add_element (form, element);
+
+                       zak_form_form_add_element (ZAK_FORM_FORM (form), element);
                }
 
        if (dimensione_field != NULL)
@@ -431,7 +432,13 @@ solipa_allegato_add_to_zakformgtk (SolipaAllegato *solipa_allegato,
                        zak_form_gtk_form_element_set_label (ZAK_FORM_GTK_FORM_ELEMENT (element), gtk_builder_get_object (priv->gtkbuilder, "label142"));
                        zak_form_element_set_name (element, dimensione_field);
                        zak_form_element_set_provider_type (element, "integer");
-                       zak_form_form_add_element (form, element);
+
+                       ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+                       g_hash_table_insert (ht, "thousands_separator", "");
+                       zak_form_element_set_format (element, ht);
+                       g_hash_table_unref (ht);
+
+                       zak_form_form_add_element (ZAK_FORM_FORM (form), element);
                }
 }