<object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
<property name="spacing">5</property>
- <property name="layout_style">start</property>
+ <property name="layout_style">center</property>
<child>
<object class="GtkButton" id="button1">
- <property name="label" translatable="yes">Select</property>
+ <property name="label" translatable="yes">Load</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label" translatable="yes">Insert</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button3">
+ <property name="label" translatable="yes">Update</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<type>integer</type>
<is-key>TRUE</is-key>
<to-load>FALSE</to-load>
- <to-save>FALSE</to-save>
<widget>entry1</widget>
<label>label2</label>
</element>
<element type="zak_form_gtk_form_element_label">
<name>id</name>
<type>integer</type>
+ <to-save>FALSE</to-save>
<default-value>999</default-value>
<widget>lbl_id</widget>
<label>label8</label>
<element type="zak_form_gtk_form_element_entry">
<name>birthday</name>
<type>datetime</type>
+ <to-save>FALSE</to-save>
<widget>txt_birthday</widget>
<label>label11</label>
</element>
ZakFormGdaexProvider *provider;
void
-select_clicked (GtkButton *button,
- gpointer user_data)
+load_clicked (GtkButton *button,
+ gpointer user_data)
{
zak_form_form_load (ZAK_FORM_FORM (form), ZAK_FORM_IPROVIDER (provider));
}
+void
+insert_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ zak_form_form_insert (ZAK_FORM_FORM (form), ZAK_FORM_IPROVIDER (provider));
+}
+
+void
+update_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ zak_form_form_update (ZAK_FORM_FORM (form), ZAK_FORM_IPROVIDER (provider));
+}
+
int
main (int argc, char *argv[])
{
gtk_main_quit, NULL);
g_signal_connect (gtk_builder_get_object (builder, "button1"), "clicked",
- G_CALLBACK (select_clicked), NULL);
+ G_CALLBACK (load_clicked), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button2"), "clicked",
+ G_CALLBACK (insert_clicked), NULL);
+ g_signal_connect (gtk_builder_get_object (builder, "button3"), "clicked",
+ G_CALLBACK (update_clicked), NULL);
form = zak_form_gtk_form_new ();
zak_form_gtk_form_set_gtkbuilder (form, builder);