]> saetta.ns0.it Git - zakform/cgi/commitdiff
Make public ZakFormElement::xml_parsing.
authorAndrea Zagli <azagli@libero.it>
Mon, 12 Jun 2017 15:42:12 +0000 (17:42 +0200)
committerAndrea Zagli <azagli@libero.it>
Thu, 15 Jun 2017 07:36:35 +0000 (09:36 +0200)
22 files changed:
src/formelementcheck.c
src/formelementcheck.h
src/formelementemail.c
src/formelementemail.h
src/formelementfile.c
src/formelementfile.h
src/formelementhidden.c
src/formelementhidden.h
src/formelementpassword.c
src/formelementpassword.h
src/formelementradio.c
src/formelementradio.h
src/formelementselect.c
src/formelementselect.h
src/formelementstring.c
src/formelementstring.h
src/formelementsubmit.c
src/formelementsubmit.h
src/formelementtext.c
src/formelementtext.h
src/formelementtextarea.c
src/formelementtextarea.h

index c8cb55c7d768702b1ea1c86bc29798f4c9bdf9a2..157b23bf24e999cb69de4cac7a4336c9987c9b7b 100644 (file)
@@ -57,6 +57,7 @@ static void
 zak_form_cgi_form_element_check_class_init (ZakFormCgiFormElementCheckClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_check_set_property;
@@ -64,6 +65,8 @@ zak_form_cgi_form_element_check_class_init (ZakFormCgiFormElementCheckClass *kla
        object_class->dispose = zak_form_cgi_form_element_check_dispose;
        object_class->finalize = zak_form_cgi_form_element_check_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_check_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_check_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementCheckPrivate));
@@ -165,11 +168,9 @@ zak_form_cgi_form_element_check_set_in_line (ZakFormCgiFormElementCheck *element
        priv->in_line = in_line;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_check_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -178,8 +179,6 @@ zak_form_cgi_form_element_check_xml_parsing (ZakFormElement *element, xmlNodePtr
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_check_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "checkbox");
 
@@ -220,14 +219,7 @@ zak_form_cgi_form_element_check_xml_parsing (ZakFormElement *element, xmlNodePtr
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_check_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                     id,
                                                     ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 static gchar
index 666a3c3361e2c1037f6de8bf6b798ad61936e917..53ba5334a778b9266dc831d1a2f43518540d41a0 100644 (file)
@@ -62,7 +62,7 @@ void zak_form_cgi_form_element_check_set_text (ZakFormCgiFormElementCheck *eleme
 gboolean zak_form_cgi_form_element_check_get_in_line (ZakFormCgiFormElementCheck *element);
 void zak_form_cgi_form_element_check_set_in_line (ZakFormCgiFormElementCheck *element, gboolean in_line);
 
-gboolean zak_form_cgi_form_element_check_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_check_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index efbbe48476d501512bd06ef0c302285e2d5290cf..96160e08bc03183dff982c67c1048b1ab2862d8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2016-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
@@ -54,6 +54,7 @@ static void
 zak_form_cgi_form_element_email_class_init (ZakFormCgiFormElementEmailClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_email_set_property;
@@ -61,6 +62,8 @@ zak_form_cgi_form_element_email_class_init (ZakFormCgiFormElementEmailClass *kla
        object_class->dispose = zak_form_cgi_form_element_email_dispose;
        object_class->finalize = zak_form_cgi_form_element_email_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_email_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_email_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementEmailPrivate));
@@ -119,11 +122,9 @@ ZakFormCgiFormElement
        return zak_form_cgi_form_element_email;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_email_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -132,8 +133,6 @@ zak_form_cgi_form_element_email_xml_parsing (ZakFormElement *element, xmlNodePtr
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_email_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "email");
 
@@ -164,14 +163,7 @@ zak_form_cgi_form_element_email_xml_parsing (ZakFormElement *element, xmlNodePtr
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_email_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                                                                                                                                                                id,
                                                                                                                                                                                                ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 static gchar
index 5a9b9fa088c89146f6df57c0d4a498e6d6d4c30c..d09d82c7a8071a7937b9036cf4f4e2fb19b4a8f9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2016-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
@@ -56,7 +56,7 @@ GType zak_form_cgi_form_element_email_get_type (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_email_new ();
 ZakFormCgiFormElement *zak_form_cgi_form_element_email_new_attrs (const gchar *id, ...);
 
-gboolean zak_form_cgi_form_element_email_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_email_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index af4a1fbcbb7d460f5de1ec2514eb0c7f644f4033..caa1d4f0baf592253e10d1eb3e8d1b03a835c28e 100644 (file)
@@ -69,6 +69,8 @@ zak_form_cgi_form_element_file_class_init (ZakFormCgiFormElementFileClass *klass
        object_class->dispose = zak_form_cgi_form_element_file_dispose;
        object_class->finalize = zak_form_cgi_form_element_file_finalize;
 
+       elem_class->xml_parsing = zak_form_cgi_form_element_file_xml_parsing;
+
        cgi_elem_class->render = zak_form_cgi_form_element_file_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementFilePrivate));
@@ -129,11 +131,9 @@ ZakFormCgiFormElement
        return zak_form_cgi_form_element_file;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_file_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -142,8 +142,6 @@ zak_form_cgi_form_element_file_xml_parsing (ZakFormElement *element, xmlNodePtr
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_file_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;
@@ -186,14 +184,7 @@ zak_form_cgi_form_element_file_xml_parsing (ZakFormElement *element, xmlNodePtr
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_file_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                    id,
                                                    ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 void
index 2a16a25b16929b19626eb212ed12380cc74d40c4..0d245c649eacba1a29bc13015630180d3666e887 100644 (file)
@@ -56,7 +56,7 @@ GType zak_form_cgi_form_element_file_get_type (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_file_new (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_file_new_attrs (const gchar *id, ...);
 
-gboolean zak_form_cgi_form_element_file_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_file_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 void zak_form_cgi_form_element_file_set_size_min (ZakFormElement *element, guint min);
 guint zak_form_cgi_form_element_file_get_size_min (ZakFormElement *element);
index a5d763c4c48fa87711b3b1ab74d09bfd52fa031c..1e1b7285b3d28404d943488d23a9c9f44421d85c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -54,6 +54,7 @@ static void
 zak_form_cgi_form_element_hidden_class_init (ZakFormCgiFormElementHiddenClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_hidden_set_property;
@@ -61,6 +62,8 @@ zak_form_cgi_form_element_hidden_class_init (ZakFormCgiFormElementHiddenClass *k
        object_class->dispose = zak_form_cgi_form_element_hidden_dispose;
        object_class->finalize = zak_form_cgi_form_element_hidden_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_hidden_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_hidden_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementHiddenPrivate));
@@ -119,12 +122,9 @@ ZakFormCgiFormElement
        return zak_form_cgi_form_element_hidden;
 }
 
-
-gboolean
+void
 zak_form_cgi_form_element_hidden_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -133,8 +133,6 @@ zak_form_cgi_form_element_hidden_xml_parsing (ZakFormElement *element, xmlNodePt
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_hidden_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "hidden");
 
@@ -161,14 +159,7 @@ zak_form_cgi_form_element_hidden_xml_parsing (ZakFormElement *element, xmlNodePt
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_hidden_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                                                                                                                                                          id,
                                                                                                                                                                                          ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 static gchar
index 0060225f61c6de3a3919cceb6ba4b44617a74484..7c02ba960011f07495f12e6aa811f51676f60dd7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -56,7 +56,7 @@ GType zak_form_cgi_form_element_hidden_get_type (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_hidden_new (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_hidden_new_attrs (const gchar *id, ...);
 
-gboolean zak_form_cgi_form_element_hidden_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_hidden_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index 994f4590e58868caafe30e517d56586acc8b6802..8a21d2dfc38b6d66441bdf902fe24c8958760496 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -54,6 +54,7 @@ static void
 zak_form_cgi_form_element_password_class_init (ZakFormCgiFormElementPasswordClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_password_set_property;
@@ -61,6 +62,8 @@ zak_form_cgi_form_element_password_class_init (ZakFormCgiFormElementPasswordClas
        object_class->dispose = zak_form_cgi_form_element_password_dispose;
        object_class->finalize = zak_form_cgi_form_element_password_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_password_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_password_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementPasswordPrivate));
@@ -119,11 +122,9 @@ ZakFormCgiFormElement
        return zak_form_cgi_form_element_password;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_password_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -132,8 +133,6 @@ zak_form_cgi_form_element_password_xml_parsing (ZakFormElement *element, xmlNode
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_password_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "password");
 
@@ -164,14 +163,7 @@ zak_form_cgi_form_element_password_xml_parsing (ZakFormElement *element, xmlNode
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_password_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                                                                                                                                                                id,
                                                                                                                                                                                                ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 static gchar
index 3bd2f87926acb6049cc84a025c35da2573d0285f..d10cace8320eeb8f8769056e26610540fb51eff6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -56,7 +56,7 @@ GType zak_form_cgi_form_element_password_get_type (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_password_new ();
 ZakFormCgiFormElement *zak_form_cgi_form_element_password_new_attrs (const gchar *id, ...);
 
-gboolean zak_form_cgi_form_element_password_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_password_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index ed7df41ef1f37a00941d371a92d790c879208dbc..49c18ce4a04f893cf956e0bd1abd5820a81f98e6 100644 (file)
@@ -63,6 +63,7 @@ static void
 zak_form_cgi_form_element_radio_class_init (ZakFormCgiFormElementRadioClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_radio_set_property;
@@ -70,6 +71,8 @@ zak_form_cgi_form_element_radio_class_init (ZakFormCgiFormElementRadioClass *kla
        object_class->dispose = zak_form_cgi_form_element_radio_dispose;
        object_class->finalize = zak_form_cgi_form_element_radio_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_radio_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_radio_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementRadioPrivate));
@@ -146,11 +149,9 @@ zak_form_cgi_form_element_radio_set_in_line (ZakFormCgiFormElementRadio *element
        priv->in_line = in_line;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_radio_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -161,8 +162,6 @@ zak_form_cgi_form_element_radio_xml_parsing (ZakFormElement *element, xmlNodePtr
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_radio_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
        g_hash_table_replace (ht_attrs, "type", "radio");
 
@@ -218,14 +217,7 @@ zak_form_cgi_form_element_radio_xml_parsing (ZakFormElement *element, xmlNodePtr
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_radio_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                     id,
                                                     ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 static gchar
index aad6fd2085a55562b0c5f01c55f6c0b87bad82d4..945f3985d01c38b97c2121d5550a5c5028acf5f9 100644 (file)
@@ -59,7 +59,7 @@ ZakFormCgiFormElement *zak_form_cgi_form_element_radio_new_attrs (const gchar *i
 gboolean zak_form_cgi_form_element_radio_get_in_line (ZakFormCgiFormElementRadio *element);
 void zak_form_cgi_form_element_radio_set_in_line (ZakFormCgiFormElementRadio *element, gboolean in_line);
 
-gboolean zak_form_cgi_form_element_radio_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_radio_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index ccce41cfd33352d30536606d3f37a52dd6225f89..1a4dd7434d9d2528731ec8604c3195d03664b1e5 100644 (file)
@@ -54,6 +54,7 @@ static void
 zak_form_cgi_form_element_select_class_init (ZakFormCgiFormElementSelectClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_select_set_property;
@@ -61,6 +62,8 @@ zak_form_cgi_form_element_select_class_init (ZakFormCgiFormElementSelectClass *k
        object_class->dispose = zak_form_cgi_form_element_select_dispose;
        object_class->finalize = zak_form_cgi_form_element_select_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_select_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_select_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementSelectPrivate));
@@ -145,11 +148,9 @@ zak_form_cgi_form_element_select_add_option (ZakFormCgiFormElementSelect *elemen
        g_hash_table_replace (priv->ht_options, g_strdup (value), ht_attrs);
 }
 
-gboolean
+void
 zak_form_cgi_form_element_select_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -158,8 +159,6 @@ zak_form_cgi_form_element_select_xml_parsing (ZakFormElement *element, xmlNodePt
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_select_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;
@@ -193,14 +192,7 @@ zak_form_cgi_form_element_select_xml_parsing (ZakFormElement *element, xmlNodePt
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_select_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                      id,
                                                      ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 static gchar
index 1c5e4a0d38251c76631c0ecc9292e83739803a68..452003ee29e6c5f98782238cbdfdb76c7bb93987 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -58,7 +58,7 @@ ZakFormCgiFormElement *zak_form_cgi_form_element_select_new_attrs (const gchar *
 
 void zak_form_cgi_form_element_select_add_option (ZakFormCgiFormElementSelect *element, const gchar *value, const gchar *content, ...);
 
-gboolean zak_form_cgi_form_element_select_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_select_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index a76aa4444183ff43d71135c51d5e2a95b5d20982..26732ee6be236ced89f5a1646246fa696ed57d51 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -56,6 +56,7 @@ static void
 zak_form_cgi_form_element_string_class_init (ZakFormCgiFormElementStringClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_string_set_property;
@@ -63,6 +64,8 @@ zak_form_cgi_form_element_string_class_init (ZakFormCgiFormElementStringClass *k
        object_class->dispose = zak_form_cgi_form_element_string_dispose;
        object_class->finalize = zak_form_cgi_form_element_string_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_string_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_string_render;
        //elem_class->is_valid = zak_form_cgi_form_element_string_is_valid;
 
@@ -112,19 +115,13 @@ ZakFormCgiFormElement
        return zak_form_cgi_form_element_string;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_string_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        xmlNode *cur;
 
        ZakFormCgiFormElementStringPrivate *priv;
 
-       ret = FALSE;
-
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_string_parent_class)->xml_parsing (element, xmlnode);
-
        cur = xmlnode->children;
        while (cur != NULL)
                {
@@ -132,14 +129,11 @@ zak_form_cgi_form_element_string_xml_parsing (ZakFormElement *element, xmlNodePt
                                {
                                        priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (ZAK_FORM_CGI_FORM_ELEMENT_STRING (element));
                                        priv->str = g_strdup ((gchar *)xmlNodeGetContent (cur));
-                                       ret = TRUE;
                                        break;
                                }
 
                        cur = cur->next;
                }
-
-       return ret;
 }
 
 static gchar
index 9b39fde6ac63bed095664788b7eaa9b478db2e0a..5783e97cbb0948d6542c3c96931794dc0fba1e73 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -56,7 +56,7 @@ GType zak_form_cgi_form_element_string_get_type (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_string_new (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_string_new_attrs (const gchar *str);
 
-gboolean zak_form_cgi_form_element_string_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_string_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index 7f547d9bd9e1335e5724fa8f951d03f5b6daad14..67f091d14a480ce3efc089d5dd079e41d73112b9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -54,6 +54,7 @@ static void
 zak_form_cgi_form_element_submit_class_init (ZakFormCgiFormElementSubmitClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_submit_set_property;
@@ -61,6 +62,8 @@ zak_form_cgi_form_element_submit_class_init (ZakFormCgiFormElementSubmitClass *k
        object_class->dispose = zak_form_cgi_form_element_submit_dispose;
        object_class->finalize = zak_form_cgi_form_element_submit_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_submit_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_submit_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementSubmitPrivate));
@@ -114,11 +117,9 @@ ZakFormCgiFormElement
        return zak_form_cgi_form_element_submit;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_submit_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -127,8 +128,6 @@ zak_form_cgi_form_element_submit_xml_parsing (ZakFormElement *element, xmlNodePt
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_submit_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;
@@ -158,14 +157,7 @@ zak_form_cgi_form_element_submit_xml_parsing (ZakFormElement *element, xmlNodePt
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_submit_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                                                                                                                                                          id,
                                                                                                                                                                                          ht_attrs);
-                       ret = TRUE;
-               }
-       else
-               {
-                       ret = FALSE;
                }
-
-       return ret;
 }
 
 static gchar
index 077730fca6f3003ec8598a6d2c10c4ffa832f618..e1f0846603056f6b3e52979c6197d7ed90c902dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -56,7 +56,7 @@ GType zak_form_cgi_form_element_submit_get_type (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_submit_new (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_submit_new_attrs (const gchar *id, ...);
 
-gboolean zak_form_cgi_form_element_submit_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_submit_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index c1d45d35646c512947b8c7e77ae1defab4fe2de7..abb771286d288b33ccd4e48d8b2aea211e676f79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -54,6 +54,7 @@ static void
 zak_form_cgi_form_element_text_class_init (ZakFormCgiFormElementTextClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_text_set_property;
@@ -61,6 +62,8 @@ zak_form_cgi_form_element_text_class_init (ZakFormCgiFormElementTextClass *klass
        object_class->dispose = zak_form_cgi_form_element_text_dispose;
        object_class->finalize = zak_form_cgi_form_element_text_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_text_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_text_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementTextPrivate));
@@ -114,11 +117,9 @@ ZakFormCgiFormElement
        return zak_form_cgi_form_element_text;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_text_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -127,8 +128,6 @@ zak_form_cgi_form_element_text_xml_parsing (ZakFormElement *element, xmlNodePtr
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_text_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;
@@ -158,14 +157,7 @@ zak_form_cgi_form_element_text_xml_parsing (ZakFormElement *element, xmlNodePtr
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_text_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                                                                                                                                                        id,
                                                                                                                                                                                        ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 static gchar
index b716fa2e8461e888c28162ee5a392bf1b6207b98..a61885aaaa8a3043bc0cca95f35c15422883b5d7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -56,7 +56,7 @@ GType zak_form_cgi_form_element_text_get_type (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_text_new (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_text_new_attrs (const gchar *id, ...);
 
-gboolean zak_form_cgi_form_element_text_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_text_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS
index 13368cade6b8500a83448b2ad74478b37e806903..a41efcdd379f78ded825c826e0a040b852b0a304 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -54,6 +54,7 @@ static void
 zak_form_cgi_form_element_text_area_class_init (ZakFormCgiFormElementTextAreaClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
+       ZakFormElementClass *form_elem_class = ZAK_FORM_ELEMENT_CLASS (klass);
        ZakFormCgiFormElementClass *elem_class = ZAK_FORM_CGI_FORM_ELEMENT_CLASS (klass);
 
        object_class->set_property = zak_form_cgi_form_element_text_area_set_property;
@@ -61,6 +62,8 @@ zak_form_cgi_form_element_text_area_class_init (ZakFormCgiFormElementTextAreaCla
        object_class->dispose = zak_form_cgi_form_element_text_area_dispose;
        object_class->finalize = zak_form_cgi_form_element_text_area_finalize;
 
+       form_elem_class->xml_parsing = zak_form_cgi_form_element_text_area_xml_parsing;
+
        elem_class->render = zak_form_cgi_form_element_text_area_render;
 
        g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementTextAreaPrivate));
@@ -114,11 +117,9 @@ ZakFormCgiFormElement
        return zak_form_cgi_form_element_text_area;
 }
 
-gboolean
+void
 zak_form_cgi_form_element_text_area_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode)
 {
-       gboolean ret;
-
        gchar *id;
 
        GHashTable *ht_attrs;
@@ -127,8 +128,6 @@ zak_form_cgi_form_element_text_area_xml_parsing (ZakFormElement *element, xmlNod
 
        id = NULL;
 
-       ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_text_area_parent_class)->xml_parsing (element, xmlnode);
-
        ht_attrs = g_hash_table_new (g_str_hash, g_str_equal);
 
        cur = xmlnode->children;
@@ -158,14 +157,7 @@ zak_form_cgi_form_element_text_area_xml_parsing (ZakFormElement *element, xmlNod
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_text_area_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
                                                                                                                                                                                                 id,
                                                                                                                                                                                                 ht_attrs);
-                       ret = TRUE;
                }
-       else
-               {
-                       ret = FALSE;
-               }
-
-       return ret;
 }
 
 static gchar
index 560792a2a5c2d37093f452a1ba63c83e7555a5f6..1698e359cc943fbaf27ff2cbd5b6de7f46a6e028 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-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
@@ -56,7 +56,7 @@ GType zak_form_cgi_form_element_text_area_get_type (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_text_area_new (void);
 ZakFormCgiFormElement *zak_form_cgi_form_element_text_area_new_attrs (const gchar *id, ...);
 
-gboolean zak_form_cgi_form_element_text_area_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
+void zak_form_cgi_form_element_text_area_xml_parsing (ZakFormElement *element, xmlNodePtr xmlnode);
 
 
 G_END_DECLS