]> saetta.ns0.it Git - solipa/libsolipa/commitdiff
Rimossi alcuni warning e deprecazioni.
authorAndrea Zagli <azagli@libero.it>
Sat, 15 Apr 2017 07:29:28 +0000 (09:29 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 15 Apr 2017 07:29:28 +0000 (09:29 +0200)
src/allegato.c
src/utils.c
tests/mail.c

index 159419777116d32ed90dc6ff7a3ac46f59d62e58..8dc722ac39c64a84d2355989eba56625802dbb76 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2017 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,7 @@
 #include <sql-parser/gda-sql-parser.h>
 #include <libgdaex/libgdaex.h>
 
+#include <libzakutils/libzakutils.h>
 #include <libgtkform/field.h>
 #include <libgtkform/fielddatetime.h>
 #include <libgtkform/fieldinteger.h>
@@ -406,7 +407,7 @@ solipa_allegato_add_to_zakformgtk (SolipaAllegato *solipa_allegato,
 
        element = zak_form_gtk_form_element_entry_new ();
        zak_form_gtk_form_element_set_widget_from_gtkbuilder (ZAK_FORM_GTK_FORM_ELEMENT (element), priv->gtkbuilder, "entry42");
-       zak_form_gtk_form_element_set_label (ZAK_FORM_GTK_FORM_ELEMENT (element), gtk_builder_get_object (priv->gtkbuilder, "label139"));
+       zak_form_gtk_form_element_set_label (ZAK_FORM_GTK_FORM_ELEMENT (element), GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "label139")));
        zak_form_element_set_name (element, percorso_field);
        zak_form_element_set_provider_type (element, "string");
        validator = zak_form_element_validator_notempty_new ();
@@ -417,7 +418,7 @@ solipa_allegato_add_to_zakformgtk (SolipaAllegato *solipa_allegato,
                {
                        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"));
+                       zak_form_gtk_form_element_set_label (ZAK_FORM_GTK_FORM_ELEMENT (element), GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "label141")));
                        zak_form_element_set_name (element, data_field);
                        zak_form_element_set_provider_type (element, "datetime");
 
@@ -437,7 +438,7 @@ solipa_allegato_add_to_zakformgtk (SolipaAllegato *solipa_allegato,
                {
                        element = zak_form_gtk_form_element_entry_new ();
                        zak_form_gtk_form_element_set_widget_from_gtkbuilder (element, priv->gtkbuilder, "entry8");
-                       zak_form_gtk_form_element_set_label (ZAK_FORM_GTK_FORM_ELEMENT (element), gtk_builder_get_object (priv->gtkbuilder, "label142"));
+                       zak_form_gtk_form_element_set_label (ZAK_FORM_GTK_FORM_ELEMENT (element), GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "label142")));
                        zak_form_element_set_name (element, dimensione_field);
                        zak_form_element_set_provider_type (element, "integer");
 
@@ -493,7 +494,7 @@ solipa_allegato_on_txt_dimensione_nascosto_changed (GtkEditable *editable,
        SolipaAllegatoPrivate *priv = SOLIPA_ALLEGATO_GET_PRIVATE (allegato);
 
        gtk_entry_set_text (GTK_ENTRY (priv->txt_dimensione),
-                           solipa_format_money (g_strtod (gtk_entry_get_text (GTK_ENTRY (priv->txt_dimensione_nascosto)), NULL), 0, FALSE));
+                           zak_utils_format_money (g_strtod (gtk_entry_get_text (GTK_ENTRY (priv->txt_dimensione_nascosto)), NULL), 0, FALSE));
 }
 
 static void
index 05327e5161c07ec2fd7c65cd7105f5b2d465fb76..993f9cb1446420958e729dd08aed2db7073ba8a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2017 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -1021,7 +1021,7 @@ solipa_chk_codice_fiscale (const gchar *codice_fiscale, gboolean empty_good)
 
        for (i = 0; i < 16; i++)
                {
-                       if (!isdigit (cf[i]) && !('A' <= cf[i] && cf[i] <= 'Z'))
+                       if (!g_ascii_isdigit (cf[i]) && !('A' <= cf[i] && cf[i] <= 'Z'))
                                {
                                        g_warning ("Caratteri non validi (%c).", cf[i]);
                                        return FALSE;
@@ -1031,7 +1031,7 @@ solipa_chk_codice_fiscale (const gchar *codice_fiscale, gboolean empty_good)
        s = 0;
        for (i = 1; i <= 13; i += 2)
                {
-                       if (isdigit (cf[i]))
+                       if (g_ascii_isdigit (cf[i]))
                                {
                                        s += cf[i] - '0';
                                }
@@ -1044,7 +1044,7 @@ solipa_chk_codice_fiscale (const gchar *codice_fiscale, gboolean empty_good)
        for (i = 0; i <= 14; i += 2)
                {
                        c = cf[i];
-                       if (isdigit (c))
+                       if (g_ascii_isdigit (c))
                                {
                                        c = c - '0' + 'A';
                                }
@@ -1093,7 +1093,7 @@ solipa_chk_partita_iva (const gchar *partita_iva, gboolean empty_good)
 
        for (i = 0; i < 11; i++)
                {
-                       if (!isdigit(piva[i]))
+                       if (!g_ascii_isdigit(piva[i]))
                                {
                                        return FALSE;
                                }
@@ -1343,7 +1343,7 @@ GtkWidget
 
        gchar *stock;
 
-       hbox = gtk_hbox_new (FALSE, 10);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
        switch (type)
                {
                        case GTK_MESSAGE_INFO:
index f61ae1f928f935c4e12dfebe1bb8afbfa7034cf0..0397316ae00be38df114a9e0a3d5891ecf43d6ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2017 Andrea Zagli <azagli@libero.it>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -77,7 +77,7 @@ main (int argc, char **argv)
                        return 0;
                }
 
-       if (from == NULL || strcmp (g_strstrip (from), "") == 0)
+       if (from == NULL || g_strcmp0 (g_strstrip (from), "") == 0)
                {
                        g_error ("Occorre specificare il parametro from.\n");
                        return 0;
@@ -91,7 +91,7 @@ main (int argc, char **argv)
                                        return 0;
                                }
                }
-       if (to == NULL || strcmp (g_strstrip (to), "") == 0)
+       if (to == NULL || g_strcmp0 (g_strstrip (to), "") == 0)
                {
                        g_error ("Occorre specificare il parametro to.\n");
                        return 0;
@@ -105,7 +105,7 @@ main (int argc, char **argv)
                                        return 0;
                                }
                }
-       if (url == NULL || strcmp (g_strstrip (url), "") == 0)
+       if (url == NULL || g_strcmp0 (g_strstrip (url), "") == 0)
                {
                        g_error ("Occorre specificare il parametro url.\n");
                        return 0;