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



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

    network: Port to standalone resources

 .gitignore                                         |    2 ++
 gnome-initial-setup/pages/network/Makefile.am      |   16 +++++++++++++---
 .../pages/network/gis-network-page.c               |    2 ++
 .../pages/network/network.gresource.xml            |    6 ++++++
 gnome-initial-setup/setup.gresource.xml            |    1 -
 5 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ec70450..3fed089 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,8 @@ 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/network/network-resources.c
+gnome-initial-setup/pages/network/network-resources.h
 gnome-initial-setup/pages/location/timedated.c
 gnome-initial-setup/pages/location/timedated.h
 gnome-initial-setup/pages/location/cc-datetime-resources.c
diff --git a/gnome-initial-setup/pages/network/Makefile.am b/gnome-initial-setup/pages/network/Makefile.am
index d998242..905400a 100644
--- a/gnome-initial-setup/pages/network/Makefile.am
+++ b/gnome-initial-setup/pages/network/Makefile.am
@@ -1,9 +1,19 @@
 
 noinst_LTLIBRARIES = libgisnetwork.la
 
-libgisnetwork_la_SOURCES =	\
-	network-dialogs.c network-dialogs.h \
-	gis-network-page.c gis-network-page.h
+BUILT_SOURCES =
+
+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/network.gresource.xml)
+network-resources.c: network.gresource.xml $(resource_files)
+	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
+network-resources.h: network.gresource.xml $(resource_files)
+	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
+BUILT_SOURCES += network-resources.c network-resources.h
+
+libgisnetwork_la_SOURCES =			\
+	network-dialogs.c network-dialogs.h	\
+	gis-network-page.c gis-network-page.h	\
+	$(BUILT_SOURCES)
 
 libgisnetwork_la_CFLAGS = $(INITIAL_SETUP_CFLAGS) -I "$(srcdir)/../.."
 libgisnetwork_la_LIBADD = $(INITIAL_SETUP_LIBS)
diff --git a/gnome-initial-setup/pages/network/gis-network-page.c b/gnome-initial-setup/pages/network/gis-network-page.c
index eacb50d..ba3f446 100644
--- a/gnome-initial-setup/pages/network/gis-network-page.c
+++ b/gnome-initial-setup/pages/network/gis-network-page.c
@@ -26,6 +26,7 @@
 #define PAGE_ID "network"
 
 #include "config.h"
+#include "network-resources.h"
 #include "gis-network-page.h"
 
 #include <glib/gi18n.h>
@@ -672,6 +673,7 @@ gis_network_page_class_init (GisNetworkPageClass *klass)
 static void
 gis_network_page_init (GisNetworkPage *page)
 {
+  g_resources_register (network_get_resource ());
   page->priv = GET_PRIVATE (page);
 }
 
diff --git a/gnome-initial-setup/pages/network/network.gresource.xml b/gnome-initial-setup/pages/network/network.gresource.xml
new file mode 100644
index 0000000..bf5394f
--- /dev/null
+++ b/gnome-initial-setup/pages/network/network.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-network-page.ui">gis-network-page.ui</file>
+  </gresource>
+</gresources>
diff --git a/gnome-initial-setup/setup.gresource.xml b/gnome-initial-setup/setup.gresource.xml
index ce4f9a5..7d58286 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-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>
     <file preprocess="xml-stripblanks" alias="gis-goa-page.ui">pages/goa/gis-goa-page.ui</file>



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