ZakFormGtkFormElementPrivate *priv = ZAK_FORM_GTK_FORM_ELEMENT_GET_PRIVATE ((ZakFormGtkFormElement *)element);
+ ZAK_FORM_ELEMENT_GET_CLASS (element)->xml_parsing (element, xmlnode);
+
cur = xmlnode->children;
while (cur != NULL)
{
w = zak_form_gtk_form_element_get_widget (ZAK_FORM_GTK_FORM_ELEMENT (element));
- str_value = g_strstrip (g_strdup (zak_form_gtk_form_element_check_get_value (element)));
+ str_value = g_strstrip (g_strdup (value));
if (strcmp (str_value, "0") == 0
|| strcasecmp (str_value, "f") == 0
"Return value",
"Return value",
"",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE));
}
static void
{
ZakFormGtkFormElementRadioPrivate *priv = ZAK_FORM_GTK_FORM_ELEMENT_RADIO_GET_PRIVATE (zak_form_gtk_form_element_radio);
+ priv->return_value = g_strdup ("");
}
/**
switch (property_id)
{
case PROP_RETURN_VALUE:
- zak_form_gtk_form_element_radio_set_value (zak_form_gtk_form_element_radio, g_value_get_string (value));
+ zak_form_gtk_form_element_radio_set_return_value (zak_form_gtk_form_element_radio, g_value_get_string (value));
break;
default:
switch (property_id)
{
case PROP_RETURN_VALUE:
- g_value_set_string (value, zak_form_gtk_form_element_radio_get_value (zak_form_gtk_form_element_radio));
+ g_value_set_string (value, zak_form_gtk_form_element_radio_get_return_value (zak_form_gtk_form_element_radio));
break;
default:
gtk_init (&argc, &argv);
builder = gtk_builder_new ();
- gtk_builder_add_objects_from_file (builder, GUIDIR "/test.ui", g_strsplit ("w_main", "|", -1), NULL);
+ gtk_builder_add_objects_from_file (builder, GUIDIR "/test.ui",
+ g_strsplit ("w_main"
+ "|adjustment1", "|", -1), NULL);
w = GTK_WIDGET (gtk_builder_get_object (builder, "w_main"));
form = zak_form_gtk_form_new ();
zak_form_gtk_form_set_gtkbuilder (form, builder);
zak_form_form_load_from_file (ZAK_FORM_FORM (form), GUIDIR "/test.xml");
+ zak_form_form_clear (ZAK_FORM_FORM (form));
gtk_widget_show_all (w);
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.12"/>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkWindow" id="w_main">
<property name="can_focus">False</property>
<child>
<object class="GtkSpinButton" id="spn_age">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="max_length">6</property>
<property name="text" translatable="yes">1</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="adjustment">adjustment2</property>
+ <property name="adjustment">adjustment1</property>
<property name="climb_rate">1</property>
- <property name="value">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<zakform>
<element type="zak_form_gtk_form_element_label">
+ <default-value>999</default-value>
<widget>lbl_id</widget>
<label>label8</label>
</element>
- <!--<element type="zak_form_gtk_form_element_entry">
+ <element type="zak_form_gtk_form_element_entry">
+ <default-value>John Doe</default-value>
<widget>txt_name</widget>
<label>label1</label>
</element>
<element type="zak_form_gtk_form_element_spin">
+ <default-value>33</default-value>
<widget>spn_age</widget>
<label>label4</label>
</element>
<element type="zak_form_gtk_form_element_check">
+ <default-value>TRUE</default-value>
<widget>chk_married</widget>
<label>label9</label>
</element>
<element type="zak_form_gtk_form_element_textview">
+ <default-value>dafault value for textview
+with line break
+and some tabs
+ and ' ' ' ' ' ' ' ' ?? ? ? ? ?? * * * * </default-value>
<widget>txtv_description</widget>
<label>label10</label>
</element>
</element>
<element type="zak_form_gtk_form_element_radio">
+ <default-value>M</default-value>
<widget>rbtnNone</widget>
<label>label3</label>
<return-value></return-value>
</element>
<element type="zak_form_gtk_form_element_radio">
+ <default-value>M</default-value>
<widget>rbtnMale</widget>
<label>label3</label>
<return-value>M</return-value>
</element>
<element type="zak_form_gtk_form_element_radio">
+ <default-value>M</default-value>
<widget>rbtnFemale</widget>
<label>label3</label>
<return-value>F</return-value>
<element type="zak_form_gtk_form_element_entry">
<widget>txt_income</widget>
<label>label5</label>
- </element>-->
+ </element>
</zakform>