Move resource files to resources/ directory

This is to make them more managable
This commit is contained in:
Gergely Polonkai 2014-07-03 23:13:52 +02:00
parent 26fb959a48
commit 5da0699607
8 changed files with 11 additions and 14 deletions

View File

@ -1,10 +1,11 @@
resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/ag.gresource.xml) RESOURCE_DIR = $(srcdir)/resources
resource_files = $(shell glib-compile-resources --sourcedir=$(RESOURCE_DIR) --generate-dependencies $(srcdir)/ag.gresource.xml)
ag-resources.c: ag.gresource.xml $(resource_files) ag-resources.c: ag.gresource.xml $(resource_files)
glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name ag $(srcdir)/ag.gresource.xml glib-compile-resources --target=$@ --sourcedir=$(RESOURCE_DIR) --generate-source --c-name ag $(srcdir)/ag.gresource.xml
ag-resources.h: ag.gresource.xml $(resource_files) ag-resources.h: ag.gresource.xml $(resource_files)
glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name ag $(srcdir)/ag.gresource.xml glib-compile-resources --target=$@ --sourcedir=$(RESOURCE_DIR) --generate-header --c-name ag $(srcdir)/ag.gresource.xml
BUILT_SOURCES = \ BUILT_SOURCES = \
ag-resources.h \ ag-resources.h \
@ -33,7 +34,3 @@ astrognome_LDADD = $(SWE_GLIB_LIBS) $(GTK_LIBS) $(LIBXML_LIBS) $(LIBXSLT_LIBS) $
astrognome_LDFLAGS = -rdynamic astrognome_LDFLAGS = -rdynamic
astrognome_CFLAGS = $(SWE_GLIB_CFLAGS) $(CFLAGS) $(GTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS) $(WEBKIT_CFLAGS) -Wall astrognome_CFLAGS = $(SWE_GLIB_CFLAGS) $(CFLAGS) $(GTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS) $(WEBKIT_CFLAGS) -Wall
guidir = $(pkgdatadir)
gui_DATA = astrognome.ui
EXTRA_DIST += $(gui_DATA)

View File

@ -257,7 +257,7 @@ setup_menu(AgApp *app)
builder = gtk_builder_new(); builder = gtk_builder_new();
if (!gtk_builder_add_from_resource(builder, "/eu/polonkai/gergely/astrognome/astrognome.ui", &err)) { if (!gtk_builder_add_from_resource(builder, "/eu/polonkai/gergely/Astrognome/ui/astrognome.ui", &err)) {
g_error("%s", (err) ? err->message : "unknown error"); g_error("%s", (err) ? err->message : "unknown error");
} }

View File

@ -40,7 +40,7 @@ ag_preferences_class_init(AgPreferencesClass *klass)
object_class->finalize = ag_preferences_finalize; object_class->finalize = ag_preferences_finalize;
dialog_class->response = ag_preferences_response; dialog_class->response = ag_preferences_response;
gtk_widget_class_set_template_from_resource(widget_class, "/eu/polonkai/gergely/astrognome/ag-preferences.ui"); gtk_widget_class_set_template_from_resource(widget_class, "/eu/polonkai/gergely/Astrognome/ui/ag-preferences.ui");
gtk_widget_class_bind_template_child_private(widget_class, AgPreferences, maximized); gtk_widget_class_bind_template_child_private(widget_class, AgPreferences, maximized);
} }

View File

@ -540,7 +540,7 @@ ag_window_class_init(AgWindowClass *klass)
gobject_class->dispose = ag_window_dispose; gobject_class->dispose = ag_window_dispose;
gtk_widget_class_set_template_from_resource(widget_class, "/eu/polonkai/gergely/astrognome/ag-window.ui"); gtk_widget_class_set_template_from_resource(widget_class, "/eu/polonkai/gergely/Astrognome/ui/ag-window.ui");
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, header_bar); gtk_widget_class_bind_template_child_private(widget_class, AgWindow, header_bar);
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, name); gtk_widget_class_bind_template_child_private(widget_class, AgWindow, name);
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, year); gtk_widget_class_bind_template_child_private(widget_class, AgWindow, year);

View File

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