[gnome-initial-setup] eulas: Port to standalone resources



commit f32c89f70fa9d7dfd2eca62ab53b365ce78f7ff9
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jan 25 00:04:54 2013 -0500

    eulas: Port to standalone resources

 .gitignore                                         |    2 ++
 gnome-initial-setup/pages/eulas/Makefile.am        |   13 ++++++++++---
 .../pages/eulas/eulas.gresource.xml                |    6 ++++++
 gnome-initial-setup/pages/eulas/gis-eula-pages.c   |    2 ++
 gnome-initial-setup/setup.gresource.xml            |    1 -
 5 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3a1fdb2..ec70450 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,6 +50,8 @@ gnome-initial-setup/gnome-initial-setup-copy-worker
 
 gnome-initial-setup/pages/account/um-realm-generated.c
 gnome-initial-setup/pages/account/um-realm-generated.h
+gnome-initial-setup/pages/eulas/eulas-resources.c
+gnome-initial-setup/pages/eulas/eulas-resources.h
 gnome-initial-setup/pages/keyboard/keyboard-resources.c
 gnome-initial-setup/pages/keyboard/keyboard-resources.h
 gnome-initial-setup/pages/location/timedated.c
diff --git a/gnome-initial-setup/pages/eulas/Makefile.am b/gnome-initial-setup/pages/eulas/Makefile.am
index 34199f3..12420a9 100644
--- a/gnome-initial-setup/pages/eulas/Makefile.am
+++ b/gnome-initial-setup/pages/eulas/Makefile.am
@@ -1,6 +1,4 @@
 
-NULL =
-
 noinst_LTLIBRARIES = libgiseulas.la
 
 pkgdatadir = $(datadir)/gnome-initial-setup
@@ -8,10 +6,19 @@ pkgdatadir = $(datadir)/gnome-initial-setup
 AM_CPPFLAGS = \
 	-DPKGDATADIR="\"$(pkgdatadir)\""
 
+BUILT_SOURCES =
+
+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/eulas.gresource.xml)
+eulas-resources.c: eulas.gresource.xml $(resource_files)
+	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
+eulas-resources.h: eulas.gresource.xml $(resource_files)
+	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
+BUILT_SOURCES += eulas-resources.c eulas-resources.h
+
 libgiseulas_la_SOURCES =			\
 	gis-eula-pages.c gis-eula-pages.h 	\
 	utils.c utils.h 			\
-	$(NULL)
+	$(BUILT_SOURCES)
 
 libgiseulas_la_CFLAGS = $(INITIAL_SETUP_CFLAGS) -I "$(srcdir)/../.."
 libgiseulas_la_LIBADD = $(INITIAL_SETUP_LIBS)
diff --git a/gnome-initial-setup/pages/eulas/eulas.gresource.xml b/gnome-initial-setup/pages/eulas/eulas.gresource.xml
new file mode 100644
index 0000000..4b8990f
--- /dev/null
+++ b/gnome-initial-setup/pages/eulas/eulas.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-eula-page.ui">gis-eula-page.ui</file>
+  </gresource>
+</gresources>
diff --git a/gnome-initial-setup/pages/eulas/gis-eula-pages.c b/gnome-initial-setup/pages/eulas/gis-eula-pages.c
index a285652..958a1bd 100644
--- a/gnome-initial-setup/pages/eulas/gis-eula-pages.c
+++ b/gnome-initial-setup/pages/eulas/gis-eula-pages.c
@@ -26,6 +26,7 @@
 #define PAGE_ID "eula"
 
 #include "config.h"
+#include "eulas-resources.h"
 #include "gis-eula-pages.h"
 #include "utils.h"
 
@@ -342,6 +343,7 @@ gis_eula_page_class_init (GisEulaPageClass *klass)
 static void
 gis_eula_page_init (GisEulaPage *page)
 {
+  g_resources_register (eulas_get_resource ());
   page->priv = GET_PRIVATE (page);
 }
 
diff --git a/gnome-initial-setup/setup.gresource.xml b/gnome-initial-setup/setup.gresource.xml
index dd73dd4..ce4f9a5 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-eula-page.ui">pages/eulas/gis-eula-page.ui</file>
     <file preprocess="xml-stripblanks" alias="gis-network-page.ui">pages/network/gis-network-page.ui</file>
     <file preprocess="xml-stripblanks" alias="gis-account-page.ui">pages/account/gis-account-page.ui</file>
     <file preprocess="xml-stripblanks" alias="gis-location-page.ui">pages/location/gis-location-page.ui</file>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]