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



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

    account: Port to standalone resources

 .gitignore                                         |    2 ++
 gnome-initial-setup/pages/account/Makefile.am      |    7 +++++++
 .../pages/account/account.gresource.xml            |    6 ++++++
 .../pages/account/gis-account-page.c               |    2 ++
 gnome-initial-setup/setup.gresource.xml            |    1 -
 5 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3fed089..021aae5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,6 +48,8 @@ gnome-initial-setup/gis-resources.h
 gnome-initial-setup/gnome-initial-setup
 gnome-initial-setup/gnome-initial-setup-copy-worker
 
+gnome-initial-setup/pages/account/account-resources.c
+gnome-initial-setup/pages/account/account-resources.h
 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
diff --git a/gnome-initial-setup/pages/account/Makefile.am b/gnome-initial-setup/pages/account/Makefile.am
index b1f2ad7..058ed99 100644
--- a/gnome-initial-setup/pages/account/Makefile.am
+++ b/gnome-initial-setup/pages/account/Makefile.am
@@ -15,6 +15,13 @@ um-realm-generated.h: $(srcdir)/org.freedesktop.realmd.xml
 		--annotate "org.freedesktop.realmd.Realm" org.gtk.GDBus.C.Name Common
 BUILT_SOURCES += um-realm-generated.c um-realm-generated.h
 
+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/account.gresource.xml)
+account-resources.c: account.gresource.xml $(resource_files)
+	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
+account-resources.h: account.gresource.xml $(resource_files)
+	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
+BUILT_SOURCES += account-resources.c account-resources.h
+
 libgisaccount_la_SOURCES =				\
 	$(BUILT_SOURCES)				\
 	gis-account-page.c gis-account-page.h		\
diff --git a/gnome-initial-setup/pages/account/account.gresource.xml b/gnome-initial-setup/pages/account/account.gresource.xml
new file mode 100644
index 0000000..8941e24
--- /dev/null
+++ b/gnome-initial-setup/pages/account/account.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-account-page.ui">gis-account-page.ui</file>
+  </gresource>
+</gresources>
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c b/gnome-initial-setup/pages/account/gis-account-page.c
index df9f96a..b9df745 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -26,6 +26,7 @@
 #define PAGE_ID "account"
 
 #include "config.h"
+#include "account-resources.h"
 #include "gis-account-page.h"
 
 #include <glib/gi18n.h>
@@ -999,6 +1000,7 @@ gis_account_page_class_init (GisAccountPageClass *klass)
 static void
 gis_account_page_init (GisAccountPage *page)
 {
+  g_resources_register (account_get_resource ());
   page->priv = GET_PRIVATE (page);
 }
 
diff --git a/gnome-initial-setup/setup.gresource.xml b/gnome-initial-setup/setup.gresource.xml
index 7d58286..bc746e3 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-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>
     <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>



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