AM_CPPFLAGS = $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
$(ZAKFORMTESTS_CFLAGS) \
- -DGUIDIR="\"($datadir)\""
+ -DGUIDIR="\"$(datadir)/$(PACKAGE)/gui\"" \
+ -DXMLDIR="\"$(datadir)/$(PACKAGE)/xml\""
LIBS = $(ZAKFORMTESTS_LIBS)
#include <config.h>
#endif
-
-
#include <libzakform/libzakform.h>
#include <libzakformgtk/libzakformgtk.h>
#include <libzakformgdaex/libzakformgdaex.h>
int
main (int argc, char *argv[])
{
+ GtkBuilder *builder;
+ GtkWidget *w;
+
+ ZakFormGtkForm *form;
+
+ gtk_init (&argc, &argv);
+
+ builder = gtk_builder_new ();
+ gtk_builder_add_objects_from_file (builder, GUIDIR "/main.ui",
+ g_strsplit ("w_main"
+ "|adjustment1", "|", -1), NULL);
+
+ w = GTK_WIDGET (gtk_builder_get_object (builder, "w_main"));
+
+ g_signal_connect (w, "delete-event",
+ gtk_main_quit, NULL);
+
+ form = zak_form_gtk_form_new ();
+ zak_form_gtk_form_set_gtkbuilder (form, builder);
+ zak_form_form_load_from_file (ZAK_FORM_FORM (form), XMLDIR "/main.xml");
+ zak_form_form_clear (ZAK_FORM_FORM (form));
+
+ gtk_widget_show_all (w);
+
+ gtk_main ();
return 0;
}