From: Andrea Zagli Date: Sun, 15 May 2016 09:45:23 +0000 (+0200) Subject: First test of cgi_ini save. X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=f5084a3695f0ec083228bcd07c3a41b2dcc2ebe2;p=zakform%2Ftests First test of cgi_ini save. --- diff --git a/data/zakformtests/xml/cgi.xml b/data/zakformtests/xml/cgi.xml index 81fa1cf..a2bdede 100644 --- a/data/zakformtests/xml/cgi.xml +++ b/data/zakformtests/xml/cgi.xml @@ -117,6 +117,8 @@ and some tabs submit + FALSE + FALSE Submit diff --git a/src/cgi_ini.c b/src/cgi_ini.c index b0d35e2..8c30eda 100644 --- a/src/cgi_ini.c +++ b/src/cgi_ini.c @@ -24,6 +24,7 @@ #include #include +#include int main (int argc, char *argv[]) @@ -36,7 +37,8 @@ main (int argc, char *argv[]) gchar *filename; ZakCgiForm *form; - ZakCgiFormElement *element; + + ZakFormIniProvider *provider; zakcgimain = zak_cgi_main_new (); @@ -71,6 +73,12 @@ main (int argc, char *argv[]) if (zak_form_form_is_valid (ZAK_FORM_FORM (form))) { g_string_append (str, "
Form is valid!!!
"); + provider = zak_form_ini_provider_new_from_file (filename); + if (provider != NULL) + { + zak_form_form_insert (ZAK_FORM_FORM (form), ZAK_FORM_IPROVIDER (provider)); + g_object_unref (provider); + } } else {