From f5084a3695f0ec083228bcd07c3a41b2dcc2ebe2 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 15 May 2016 11:45:23 +0200 Subject: [PATCH] First test of cgi_ini save. --- data/zakformtests/xml/cgi.xml | 2 ++ src/cgi_ini.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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 { -- 2.49.0