[gnome-initial-setup] keyboard: Port to standalone resources
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] keyboard: Port to standalone resources
- Date: Fri, 25 Jan 2013 05:37:30 +0000 (UTC)
commit 40ad678ae3a4ab3b847acfd4f3de3ce79579431a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jan 25 00:00:09 2013 -0500
keyboard: Port to standalone resources
.gitignore | 2 ++
gnome-initial-setup/pages/keyboard/Makefile.am | 16 +++++++++++++---
.../pages/keyboard/gis-keyboard-page.c | 3 +++
.../pages/keyboard/keyboard.gresource.xml | 7 +++++++
gnome-initial-setup/setup.gresource.xml | 2 --
5 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 20685b6..3a1fdb2 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/keyboard/keyboard-resources.c
+gnome-initial-setup/pages/keyboard/keyboard-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/keyboard/Makefile.am b/gnome-initial-setup/pages/keyboard/Makefile.am
index 60fd40f..1d187dc 100644
--- a/gnome-initial-setup/pages/keyboard/Makefile.am
+++ b/gnome-initial-setup/pages/keyboard/Makefile.am
@@ -6,9 +6,19 @@ AM_CPPFLAGS = \
-DLOCALSTATEDIR="\"$(localstatedir)\"" \
-DUIDIR="\"$(uidir)\""
-libgiskeyboard_la_SOURCES = \
- gis-keyboard-page.c gis-keyboard-page.h \
- gnome-region-panel-input.c gnome-region-panel-input.h
+BUILT_SOURCES =
+
+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/keyboard.gresource.xml)
+keyboard-resources.c: keyboard.gresource.xml $(resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
+keyboard-resources.h: keyboard.gresource.xml $(resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
+BUILT_SOURCES += keyboard-resources.c keyboard-resources.h
+
+libgiskeyboard_la_SOURCES = \
+ gis-keyboard-page.c gis-keyboard-page.h \
+ gnome-region-panel-input.c gnome-region-panel-input.h \
+ $(BUILT_SOURCES)
libgiskeyboard_la_CFLAGS = $(INITIAL_SETUP_CFLAGS) -I "$(srcdir)/../.."
libgiskeyboard_la_LIBADD = $(INITIAL_SETUP_LIBS)
diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
index 4ed0ce6..b54633f 100644
--- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
+++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
@@ -28,7 +28,9 @@
#define PAGE_ID "keyboard"
#include "config.h"
+#include "keyboard-resources.h"
#include "gis-keyboard-page.h"
+
#include <gtk/gtk.h>
#include "gnome-region-panel-input.h"
@@ -68,6 +70,7 @@ gis_keyboard_page_class_init (GisKeyboardPageClass * klass)
static void
gis_keyboard_page_init (GisKeyboardPage * self)
{
+ g_resources_register (keyboard_get_resource ());
}
void
diff --git a/gnome-initial-setup/pages/keyboard/keyboard.gresource.xml b/gnome-initial-setup/pages/keyboard/keyboard.gresource.xml
new file mode 100644
index 0000000..e3a4612
--- /dev/null
+++ b/gnome-initial-setup/pages/keyboard/keyboard.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-keyboard-page.ui">gis-keyboard-page.ui</file>
+ <file preprocess="xml-stripblanks" alias="gnome-region-panel-input-chooser.ui">gnome-region-panel-input-chooser.ui</file>
+ </gresource>
+</gresources>
diff --git a/gnome-initial-setup/setup.gresource.xml b/gnome-initial-setup/setup.gresource.xml
index d758710..dd73dd4 100644
--- a/gnome-initial-setup/setup.gresource.xml
+++ b/gnome-initial-setup/setup.gresource.xml
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/initial-setup">
- <file preprocess="xml-stripblanks" alias="gis-keyboard-page.ui">pages/keyboard/gis-keyboard-page.ui</file>
- <file preprocess="xml-stripblanks" alias="gnome-region-panel-input-chooser.ui">pages/keyboard/gnome-region-panel-input-chooser.ui</file>
<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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]