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



commit 98f5ddeb0b8dc9c464543e9f7f3d318058d854df
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jan 25 00:17:44 2013 -0500

    goa: Port to standalone resources

 .gitignore                                      |    2 ++
 gnome-initial-setup/pages/goa/Makefile.am       |   12 +++++++++++-
 gnome-initial-setup/pages/goa/gis-goa-page.c    |    2 ++
 gnome-initial-setup/pages/goa/goa.gresource.xml |    7 +++++++
 gnome-initial-setup/setup.gresource.xml         |    1 -
 5 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 763a7d4..4c5605d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,8 @@ 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/goa/goa-resources.c
+gnome-initial-setup/pages/goa/goa-resources.h
 gnome-initial-setup/pages/keyboard/keyboard-resources.c
 gnome-initial-setup/pages/keyboard/keyboard-resources.h
 gnome-initial-setup/pages/network/network-resources.c
diff --git a/gnome-initial-setup/pages/goa/Makefile.am b/gnome-initial-setup/pages/goa/Makefile.am
index 8890d53..a4df621 100644
--- a/gnome-initial-setup/pages/goa/Makefile.am
+++ b/gnome-initial-setup/pages/goa/Makefile.am
@@ -1,9 +1,19 @@
 
 noinst_LTLIBRARIES = libgisgoa.la
 
+BUILT_SOURCES =
+
+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/goa.gresource.xml)
+goa-resources.c: goa.gresource.xml $(resource_files)
+	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
+goa-resources.h: goa.gresource.xml $(resource_files)
+	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
+BUILT_SOURCES += goa-resources.c goa-resources.h
+
 libgisgoa_la_SOURCES =	\
 	cc-online-accounts-add-account-dialog.c cc-online-accounts-add-account-dialog.h \
-	gis-goa-page.c gis-goa-page.h
+	gis-goa-page.c gis-goa-page.h	\
+	$(BUILT_SOURCES)
 
 libgisgoa_la_CFLAGS = $(INITIAL_SETUP_CFLAGS) -I "$(srcdir)/../.."
 libgisgoa_la_LIBADD = $(INITIAL_SETUP_LIBS)
diff --git a/gnome-initial-setup/pages/goa/gis-goa-page.c b/gnome-initial-setup/pages/goa/gis-goa-page.c
index e8ad269..9d5166f 100644
--- a/gnome-initial-setup/pages/goa/gis-goa-page.c
+++ b/gnome-initial-setup/pages/goa/gis-goa-page.c
@@ -27,6 +27,7 @@
 
 #include "config.h"
 #include "gis-goa-page.h"
+#include "goa-resources.h"
 
 #define GOA_API_IS_SUBJECT_TO_CHANGE
 #include <goa/goa.h>
@@ -384,6 +385,7 @@ gis_goa_page_class_init (GisGoaPageClass *klass)
 static void
 gis_goa_page_init (GisGoaPage *page)
 {
+  g_resources_register (goa_get_resource ());
   page->priv = GET_PRIVATE (page);
 }
 
diff --git a/gnome-initial-setup/pages/goa/goa.gresource.xml b/gnome-initial-setup/pages/goa/goa.gresource.xml
new file mode 100644
index 0000000..ad1cfdf
--- /dev/null
+++ b/gnome-initial-setup/pages/goa/goa.gresource.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/initial-setup">
+    <file preprocess="xml-stripblanks" alias="gis-goa-page.ui">gis-goa-page.ui</file>
+  </gresource>
+</gresources>
+
diff --git a/gnome-initial-setup/setup.gresource.xml b/gnome-initial-setup/setup.gresource.xml
index 7e8e1a8..f390420 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-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>
 </gresources>



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