]> saetta.ns0.it Git - libgtkform/commitdiff
Added functions GtkForm::get_form_field_value_by_name,
authorAndrea Zagli <azagli@libero.it>
Wed, 28 Jul 2010 07:40:16 +0000 (09:40 +0200)
committerAndrea Zagli <azagli@libero.it>
Wed, 28 Jul 2010 07:40:16 +0000 (09:40 +0200)
GtkForm::get_form_widget_value_by_name, GtkForm::get_form_field_value_stringify_by_name,
GtkForm::get_form_widget_value_stringify_by_name, GtkForm::get_form_field_value_sql_by_name
and GtkForm::get_form_widget_value_sql_by_name.

docs/reference/libgtkform-decl-list.txt
docs/reference/libgtkform-decl.txt
docs/reference/libgtkform-undocumented.txt
docs/reference/libgtkform-unused.txt
src/field.c
src/form.c
src/form.h

index c70119db12fd86c52d8b77ef39a89c4771552e4a..4e24d6847002aaa5cd9f6e2222de12595a311cbd 100644 (file)
@@ -311,6 +311,12 @@ gtk_form_set_sensitive_by_name
 gtk_form_set_editable
 gtk_form_set_visible_by_name
 gtk_form_set_form_widget_visible_by_name
+gtk_form_get_form_field_value_by_name
+gtk_form_get_form_widget_value_by_name
+gtk_form_get_form_field_value_stringify_by_name
+gtk_form_get_form_widget_value_stringify_by_name
+gtk_form_get_form_field_value_sql_by_name
+gtk_form_get_form_widget_value_sql_by_name
 GtkFormSqlType
 gtk_form_get_sql
 gtk_form_fill_from_datamodel
index 772b30c75e89d6e54537a8475a7623ce43594f9a..9f318709c97dd0b05f05094474ce1a7ceceb8ef8 100644 (file)
@@ -1323,6 +1323,36 @@ GtkForm *form, gboolean visible, ...
 <RETURNS>void </RETURNS>
 GtkForm *form, gboolean visible, ... 
 </FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_get_form_field_value_by_name</NAME>
+<RETURNS>GValue *</RETURNS>
+GtkForm *form, const gchar *field_name 
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_get_form_widget_value_by_name</NAME>
+<RETURNS>GValue *</RETURNS>
+GtkForm *form, const gchar *widget_name 
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_get_form_field_value_stringify_by_name</NAME>
+<RETURNS>const gchar *</RETURNS>
+GtkForm *form, const gchar *field_name 
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_get_form_widget_value_stringify_by_name</NAME>
+<RETURNS>const gchar *</RETURNS>
+GtkForm *form, const gchar *widget_name 
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_get_form_field_value_sql_by_name</NAME>
+<RETURNS>const gchar *</RETURNS>
+GtkForm *form, const gchar *field_name 
+</FUNCTION>
+<FUNCTION>
+<NAME>gtk_form_get_form_widget_value_sql_by_name</NAME>
+<RETURNS>const gchar *</RETURNS>
+GtkForm *form, const gchar *widget_name 
+</FUNCTION>
 <ENUM>
 <NAME>GtkFormSqlType</NAME>
 typedef enum
index a57870d3ff0a8e2868268c06025dd45e69e8f30a..48f1965ca3551dd2348d27b20e8c378c7548feeb 100644 (file)
@@ -1,7 +1,7 @@
 8% symbol docs coverage.
 28 symbols documented.
 2 symbols incomplete.
-315 not documented.
+321 not documented.
 
 
 GTK_FORM
@@ -199,8 +199,14 @@ gtk_form_fill_from_table
 gtk_form_get_field_from_name
 gtk_form_get_form_field_from_name
 gtk_form_get_form_field_from_widget
+gtk_form_get_form_field_value_by_name
+gtk_form_get_form_field_value_sql_by_name
+gtk_form_get_form_field_value_stringify_by_name
 gtk_form_get_form_widget_from_name
 gtk_form_get_form_widget_from_widget
+gtk_form_get_form_widget_value_by_name
+gtk_form_get_form_widget_value_sql_by_name
+gtk_form_get_form_widget_value_stringify_by_name
 gtk_form_get_group_by_name
 gtk_form_get_gtkbuilder
 gtk_form_get_key
index 0497419c8f5f57c29ae70a507e798e4a42d910ab..7755fe5e23baac7157ea94b3c37444e05aec6c10 100644 (file)
@@ -48,8 +48,14 @@ gtk_form_fill_from_hashtable
 gtk_form_fill_from_table
 gtk_form_get_form_field_from_name
 gtk_form_get_form_field_from_widget
+gtk_form_get_form_field_value_by_name
+gtk_form_get_form_field_value_sql_by_name
+gtk_form_get_form_field_value_stringify_by_name
 gtk_form_get_form_widget_from_name
 gtk_form_get_form_widget_from_widget
+gtk_form_get_form_widget_value_by_name
+gtk_form_get_form_widget_value_sql_by_name
+gtk_form_get_form_widget_value_stringify_by_name
 gtk_form_get_group_by_name
 gtk_form_get_gtkbuilder
 gtk_form_get_key
index a0d7fe642329589f2071579ad1629931393ec2f8..92daa517af5826d4165ef5a10187d75d6af456d9 100644 (file)
@@ -212,6 +212,8 @@ GValue
 {
        GValue *ret;
 
+       ret = NULL;
+
        if (IS_GTK_FORM_FIELD (field) && GTK_FORM_FIELD_GET_CLASS (field)->get_value != NULL)
                {
                        ret = GTK_FORM_FIELD_GET_CLASS (field)->get_value (field);
@@ -250,6 +252,8 @@ gtk_form_field_clear (GtkFormField *field)
 {
        gboolean ret;
 
+       ret = FALSE;
+
        if (IS_GTK_FORM_FIELD (field) && GTK_FORM_FIELD_GET_CLASS (field)->clear != NULL)
                {
                        ret = GTK_FORM_FIELD_GET_CLASS (field)->clear (field);
index 4672e3fb755510942788296a329def8dd6cf00d5..cf4cd16563ac19697b6c48940e013d612ca7ad45 100644 (file)
@@ -1531,7 +1531,7 @@ gtk_form_set_visible_by_name (GtkForm *form, gboolean visible, ...)
 
 /**
  * gtk_form_set_form_widgets_visible_by_name:
- * @ a #GtkForm object.
+ * @form: a #GtkForm object.
  * @visible: whether to set every #GtkFormWidget visible or not.
  * @...: a #NULL terminated list of #GtkFormWidgets's names.
  *
@@ -1570,6 +1570,141 @@ gtk_form_set_form_widgets_visible_by_name (GtkForm *form, gboolean visible, ...)
        va_end (vargs);
 }
 
+/**
+ * gtk_form_get_form_field_value_by_name:
+ * @form: a #GtkForm object.
+ * @field_name:
+ *
+ */
+GValue
+*gtk_form_get_form_field_value_by_name (GtkForm *form, const gchar *field_name)
+{
+       GValue *ret;
+       GtkFormField *field;
+
+       ret = NULL;
+
+       field = gtk_form_get_form_field_from_name (form, field_name);
+       ret = gtk_form_field_get_value (field);
+
+       return ret;
+}
+
+/**
+ * gtk_form_get_form_widget_value_by_name:
+ * @form: a #GtkForm object.
+ * @widget_name:
+ *
+ */
+GValue
+*gtk_form_get_form_widget_value_by_name (GtkForm *form, const gchar *widget_name)
+{
+       GValue *ret;
+       GtkFormWidget *fwidget;
+       GtkFormField *field;
+
+       ret = NULL;
+
+       fwidget = gtk_form_get_form_widget_from_name (form, widget_name);
+       if (IS_GTK_FORM_WIDGET (fwidget))
+               {
+                       g_object_get (G_OBJECT (fwidget), "field", &field, NULL);
+                       ret = gtk_form_field_get_value (field);
+               }
+
+       return ret;
+}
+
+/**
+ * gtk_form_get_form_field_value_stringify_by_name:
+ * @form: a #GtkForm object.
+ * @field_name:
+ *
+ */
+const gchar
+*gtk_form_get_form_field_value_stringify_by_name (GtkForm *form, const gchar *field_name)
+{
+       gchar *ret;
+       GtkFormField *field;
+
+       ret = NULL;
+
+       field = gtk_form_get_form_field_from_name (form, field_name);
+       ret = gtk_form_field_get_value_stringify (field);
+
+       return ret;
+}
+
+/**
+ * gtk_form_get_form_widget_value_stringify_by_name:
+ * @form: a #GtkForm object.
+ * @widget_name:
+ *
+ */
+const gchar
+*gtk_form_get_form_widget_value_stringify_by_name (GtkForm *form, const gchar *widget_name)
+{
+       gchar *ret;
+       GtkFormWidget *fwidget;
+       GtkFormField *field;
+
+       ret = NULL;
+
+       fwidget = gtk_form_get_form_widget_from_name (form, widget_name);
+       if (IS_GTK_FORM_WIDGET (fwidget))
+               {
+                       g_object_get (G_OBJECT (fwidget), "field", &field, NULL);
+                       ret = gtk_form_field_get_value_stringify (field);
+               }
+
+       return ret;
+}
+
+/**
+ * gtk_form_get_form_field_value_sql_by_name:
+ * @form: a #GtkForm object.
+ * @field_name:
+ *
+ */
+const gchar
+*gtk_form_get_form_field_value_sql_by_name (GtkForm *form, const gchar *field_name)
+{
+       gchar *ret;
+       GtkFormField *field;
+
+       ret = NULL;
+
+       field = gtk_form_get_form_field_from_name (form, field_name);
+       ret = gtk_form_field_get_value_sql (field);
+
+       return ret;
+}
+
+/**
+ * gtk_form_get_form_widget_value_sql_by_name:
+ * @form: a #GtkForm object.
+ * @widget_name:
+ *
+ */
+const gchar
+*gtk_form_get_form_widget_value_sql_by_name (GtkForm *form, const gchar *widget_name)
+{
+       gchar *ret;
+       GtkFormWidget *fwidget;
+       GtkFormField *field;
+
+       ret = NULL;
+
+       fwidget = gtk_form_get_form_widget_from_name (form, widget_name);
+       if (IS_GTK_FORM_WIDGET (fwidget))
+               {
+                       g_object_get (G_OBJECT (fwidget), "field", &field, NULL);
+                       ret = gtk_form_field_get_value_sql (field);
+               }
+
+       return ret;
+}
+
 /**
  * gtk_form_get_sql:
  * @form: a #GtkForm object.
index 5c33ade71a4ceab5599cc484ba4ffe6bde250ff0..f42ae370b036e2edfa75518c8629bf8ebae85c4b 100644 (file)
@@ -104,6 +104,13 @@ void gtk_form_set_editable (GtkForm *form, gboolean editable);
 void gtk_form_set_visible_by_name (GtkForm *form, gboolean visible, ...);
 void gtk_form_set_form_widget_visible_by_name (GtkForm *form, gboolean visible, ...);
 
+GValue *gtk_form_get_form_field_value_by_name (GtkForm *form, const gchar *field_name);
+GValue *gtk_form_get_form_widget_value_by_name (GtkForm *form, const gchar *widget_name);
+const gchar *gtk_form_get_form_field_value_stringify_by_name (GtkForm *form, const gchar *field_name);
+const gchar *gtk_form_get_form_widget_value_stringify_by_name (GtkForm *form, const gchar *widget_name);
+const gchar *gtk_form_get_form_field_value_sql_by_name (GtkForm *form, const gchar *field_name);
+const gchar *gtk_form_get_form_widget_value_sql_by_name (GtkForm *form, const gchar *widget_name);
+
 typedef enum
 {
        GTK_FORM_SQL_SELECT,