This eliminates install issues nicely.
Signed-off-by: Keith Packard <keithp@keithp.com>
$(OBJ): $(INC)
+aoview_main.o: aoview_glade.h
+
clean:
rm -f $(OBJ) $(PROG)
+
+aoview_glade.h: aoview.glade
+ sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/"/' $< > $@
#include "aoview.h"
+static const char aoview_glade[] = {
+#include "aoview_glade.h"
+};
+
static void usage(void) {
printf("aoview [--device|-d device_file]");
exit(1);
gtk_init(&argc, &argv);
glade_init();
- xml = glade_xml_new("aoview.glade", NULL, NULL);
+ xml = glade_xml_new_from_buffer(aoview_glade, sizeof (aoview_glade), NULL, NULL);
+
/* connect the signals in the interface */
glade_xml_signal_autoconnect(xml);