Created resource from astrognome.ui

This commit is contained in:
Gergely Polonkai 2013-09-08 13:37:38 +02:00
parent 14241d6545
commit aaeb90a6e0
4 changed files with 57 additions and 2 deletions

4
.gitignore vendored
View File

@ -31,6 +31,10 @@ Makefile.in
/compile /compile
/tags /tags
# Generated files
/src/ag-resources.c
/src/ag-resources.h
# Geonames related things # Geonames related things
/data/geonames/*.txt /data/geonames/*.txt
/data/geonames/geodata.xml /data/geonames/geodata.xml

View File

@ -1,7 +1,25 @@
resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/ag.gresource.xml)
ag-resources.c: ag.gresource.xml $(resource_files)
glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name ag $(srcdir)/ag.gresource.xml
ag-resources.h: ag.gresource.xml $(resource_files)
glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name ag $(srcdir)/ag.gresource.xml
BUILT_SOURCES = \
ag-resources.h \
ag-resources.c \
$(NULL)
EXTRA_DIST = \
$(resource_files) \
ag.gresource.xml \
$(NULL)
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Astrognome\" -DLOCALEDIR=\"$(localedir)\" -DPKGDATADIR=\"$(pkgdatadir)\" AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Astrognome\" -DLOCALEDIR=\"$(localedir)\" -DPKGDATADIR=\"$(pkgdatadir)\"
bin_PROGRAMS = astrognome bin_PROGRAMS = astrognome
astrognome_SOURCES = astrognome.c astrognome_SOURCES = ag-app.c astrognome.c $(BUILT_SOURCES)
astrognome_LDADD = $(SWE_GLIB_LIBS) $(GTK_LIBS) astrognome_LDADD = $(SWE_GLIB_LIBS) $(GTK_LIBS)
astrognome_LDFLAGS = -rdynamic astrognome_LDFLAGS = -rdynamic
astrognome_CFLAGS = $(SWE_GLIB_CFLAGS) $(CFLAGS) $(GTK_CFLAGS) -Wall astrognome_CFLAGS = $(SWE_GLIB_CFLAGS) $(CFLAGS) $(GTK_CFLAGS) -Wall
@ -9,4 +27,4 @@ astrognome_CFLAGS = $(SWE_GLIB_CFLAGS) $(CFLAGS) $(GTK_CFLAGS) -Wall
guidir = $(pkgdatadir) guidir = $(pkgdatadir)
gui_DATA = astrognome.ui gui_DATA = astrognome.ui
EXTRA_DIST = $(gui_DATA) EXTRA_DIST += $(gui_DATA)

6
src/ag.gresource.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/eu/polonkai/gergely/astrognome">
<file>astrognome.ui</file>
</gresource>
</gresources>

View File

@ -1,6 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<!-- interface-requires gtk+ 3.6 --> <!-- interface-requires gtk+ 3.6 -->
<menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes">New window</attribute>
<attribute name="action">app.new-window</attribute>
<attribute name="accel">&lt;Primary&gt;n</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Preferences</attribute>
<attribute name="action">app.preferences</attribute>
<attribute name="accel">&lt;Primary&gt;p</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">About Astrognome</attribute>
<attribute name="action">app.about</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Quit</attribute>
<attribute name="action">app.quit</attribute>
<attribute name="accel">&lt;Primary&gt;q</attribute>
</item>
</section>
</menu>
<object class="GtkActionGroup" id="actions"> <object class="GtkActionGroup" id="actions">
<property name="accel_group">accels</property> <property name="accel_group">accels</property>
<child> <child>