[gnome-initial-setup] location: Port to standalone resources
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] location: Port to standalone resources
- Date: Fri, 25 Jan 2013 05:37:50 +0000 (UTC)
commit bc5df007fe99dd1db248082dfaf955a0b4d21d31
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jan 25 00:11:14 2013 -0500
location: Port to standalone resources
.gitignore | 2 ++
gnome-initial-setup/pages/location/Makefile.am | 7 +++++++
.../pages/location/gis-location-page.c | 2 ++
.../pages/location/location.gresource.xml | 6 ++++++
gnome-initial-setup/setup.gresource.xml | 1 -
5 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 021aae5..763a7d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,6 +62,8 @@ gnome-initial-setup/pages/location/timedated.c
gnome-initial-setup/pages/location/timedated.h
gnome-initial-setup/pages/location/cc-datetime-resources.c
gnome-initial-setup/pages/location/cc-datetime-resources.h
+gnome-initial-setup/pages/location/location-resources.c
+gnome-initial-setup/pages/location/location-resources.h
gnome-initial-setup/pages/language/language-resources.c
gnome-initial-setup/pages/language/language-resources.h
gnome-initial-setup/pages/welcome/welcome-resources.c
diff --git a/gnome-initial-setup/pages/location/Makefile.am b/gnome-initial-setup/pages/location/Makefile.am
index 8a8bb4a..361c2d3 100644
--- a/gnome-initial-setup/pages/location/Makefile.am
+++ b/gnome-initial-setup/pages/location/Makefile.am
@@ -25,6 +25,13 @@ cc-datetime-resources.h: datetime.gresource.xml $(resource_files)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
BUILT_SOURCES += cc-datetime-resources.c cc-datetime-resources.h
+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/location.gresource.xml)
+location-resources.c: location.gresource.xml $(resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
+location-resources.h: location.gresource.xml $(resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
+BUILT_SOURCES += location-resources.c location-resources.h
+
libgislocation_la_SOURCES = \
tz.c tz.h \
cc-timezone-map.c cc-timezone-map.h \
diff --git a/gnome-initial-setup/pages/location/gis-location-page.c b/gnome-initial-setup/pages/location/gis-location-page.c
index 5cc088f..967ac97 100644
--- a/gnome-initial-setup/pages/location/gis-location-page.c
+++ b/gnome-initial-setup/pages/location/gis-location-page.c
@@ -27,6 +27,7 @@
#include "config.h"
#include "cc-datetime-resources.h"
+#include "location-resources.h"
#include "gis-location-page.h"
#include <glib/gi18n.h>
@@ -372,6 +373,7 @@ gis_location_page_class_init (GisLocationPageClass *klass)
static void
gis_location_page_init (GisLocationPage *page)
{
+ g_resources_register (location_get_resource ());
page->priv = GET_PRIVATE (page);
}
diff --git a/gnome-initial-setup/pages/location/location.gresource.xml b/gnome-initial-setup/pages/location/location.gresource.xml
new file mode 100644
index 0000000..53e3e02
--- /dev/null
+++ b/gnome-initial-setup/pages/location/location.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/initial-setup">
+ <file preprocess="xml-stripblanks" alias="gis-location-page.ui">gis-location-page.ui</file>
+ </gresource>
+</gresources>
diff --git a/gnome-initial-setup/setup.gresource.xml b/gnome-initial-setup/setup.gresource.xml
index bc746e3..7e8e1a8 100644
--- a/gnome-initial-setup/setup.gresource.xml
+++ b/gnome-initial-setup/setup.gresource.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/initial-setup">
- <file preprocess="xml-stripblanks" alias="gis-location-page.ui">pages/location/gis-location-page.ui</file>
<file preprocess="xml-stripblanks" alias="gis-goa-page.ui">pages/goa/gis-goa-page.ui</file>
<file preprocess="xml-stripblanks" alias="gis-summary-page.ui">pages/summary/gis-summary-page.ui</file>
</gresource>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]