diff --git a/shell/Makefile.am b/shell/Makefile.am index c1fae4f79..844c417dd 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -5,7 +5,12 @@ INCLUDES = \ bin_PROGRAMS = gnome-control-center +BUILT_SOURCES = \ + cc-shell-resources.c \ + cc-shell-resources.h + gnome_control_center_SOURCES = \ + $(BUILT_SOURCES) \ control-center.c \ cc-shell-log.c \ cc-shell-log.h \ @@ -66,12 +71,13 @@ if BUILD_BLUETOOTH gnome_control_center_LDADD += $(top_builddir)/panels/bluetooth/libbluetooth.la endif -AM_CPPFLAGS = \ - -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \ - -DUIDIR="\"$(uidir)\"" +AM_CPPFLAGS = -DGNOMELOCALEDIR="\"$(datadir)/locale\"" -uidir = $(pkgdatadir)/ui -ui_DATA = shell.ui +resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/shell.gresource.xml) +cc-shell-resources.c: shell.gresource.xml $(resource_files) + $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name cc_shell $< +cc-shell-resources.h: shell.gresource.xml $(resource_files) + $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name cc_shell $< sysdir = $(datadir)/applications sys_in_files = gnome-control-center.desktop.in @@ -85,12 +91,13 @@ gnome_control_center_completion.bash: gnome_control_center_completion.bash.in li $(AM_V_GEN) cat $< | sed "s,@PANELS@,`$(srcdir)/list-panel.sh $(top_srcdir)`," > $@ EXTRA_DIST = \ - $(ui_DATA) \ + $(resource_files) \ + shell.gresource.xml \ gnome-control-center.desktop.in.in \ $(completion_in_files) \ list-panel.sh -CLEANFILES = $(completion_DATA) +CLEANFILES = $(BUILT_SOURCES) $(completion_DATA) DISTCLEANFILES = gnome-control-center.desktop gnome-control-center.desktop.in -include $(top_srcdir)/git.mk diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c index 6c961d537..e69215d42 100644 --- a/shell/gnome-control-center.c +++ b/shell/gnome-control-center.c @@ -1236,7 +1236,7 @@ gnome_control_center_init (GnomeControlCenter *self) /* load the user interface */ priv->builder = gtk_builder_new (); - if (!gtk_builder_add_from_file (priv->builder, UIDIR "/shell.ui", &err)) + if (!gtk_builder_add_from_resource (priv->builder, "/org/gnome/control-center/shell/shell.ui", &err)) { g_critical ("Could not build interface: %s", err->message); g_error_free (err); diff --git a/shell/shell.gresource.xml b/shell/shell.gresource.xml new file mode 100644 index 000000000..1e65228ee --- /dev/null +++ b/shell/shell.gresource.xml @@ -0,0 +1,6 @@ + + + + shell.ui + +