summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aoview/Makefile5
-rw-r--r--aoview/aoview_main.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/aoview/Makefile b/aoview/Makefile
index 8f9c08df..1941b080 100644
--- a/aoview/Makefile
+++ b/aoview/Makefile
@@ -30,5 +30,10 @@ $(PROG): $(OBJ)
$(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/$$/"/' $< > $@
diff --git a/aoview/aoview_main.c b/aoview/aoview_main.c
index e2164e05..a3dc9544 100644
--- a/aoview/aoview_main.c
+++ b/aoview/aoview_main.c
@@ -17,6 +17,10 @@
#include "aoview.h"
+static const char aoview_glade[] = {
+#include "aoview_glade.h"
+};
+
static void usage(void) {
printf("aoview [--device|-d device_file]");
exit(1);
@@ -57,7 +61,8 @@ int main(int argc, char **argv)
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);