summaryrefslogtreecommitdiff
path: root/capplets/appearance
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/appearance')
-rw-r--r--capplets/appearance/Makefile.am12
-rw-r--r--capplets/appearance/appearance-main.c6
-rw-r--r--capplets/appearance/data/Makefile.am12
-rw-r--r--capplets/appearance/org.mate.mcc.appearance.gresource.xml22
4 files changed, 36 insertions, 16 deletions
diff --git a/capplets/appearance/Makefile.am b/capplets/appearance/Makefile.am
index 500fcc64..7ae3edd1 100644
--- a/capplets/appearance/Makefile.am
+++ b/capplets/appearance/Makefile.am
@@ -1,10 +1,14 @@
SUBDIRS = data
+BUILT_SOURCES = mate-appearance-properties-resources.h mate-appearance-properties-resources.c
+
# This is used in MATECC_CAPPLETS_CFLAGS
cappletname = appearance
bin_PROGRAMS = mate-appearance-properties
+nodist_mate_appearance_properties_SOURCES = \
+ $(BUILT_SOURCES)
mate_appearance_properties_SOURCES = \
appearance.h \
appearance-desktop.c \
@@ -43,7 +47,6 @@ mate_appearance_properties_LDADD = \
$(MARCO_LIBS)
mate_appearance_properties_LDFLAGS = -export-dynamic
-gtkbuilderdir = $(pkgdatadir)/ui
pixmapdir = $(pkgdatadir)/pixmaps
wallpaperdir = $(datadir)/mate-background-properties
@@ -53,10 +56,13 @@ AM_CPPFLAGS = \
$(FONT_CAPPLET_CFLAGS) \
-DMATELOCALEDIR="\"$(datadir)/locale\"" \
-DMATECC_DATA_DIR="\"$(pkgdatadir)\"" \
- -DMATECC_GTKBUILDER_DIR="\"$(gtkbuilderdir)\"" \
-DMATECC_PIXMAP_DIR="\"$(pixmapdir)\"" \
-DWALLPAPER_DATADIR="\"$(wallpaperdir)\""
-CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES)
+mate-appearance-properties-resources.h mate-appearance-properties-resources.c: org.mate.mcc.appearance.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/org.mate.mcc.appearance.gresource.xml)
+ $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name appearance $<
+
+CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES) $(BUILT_SOURCES)
+EXTRA_DIST = org.mate.mcc.appearance.gresource.xml
-include $(top_srcdir)/git.mk
diff --git a/capplets/appearance/appearance-main.c b/capplets/appearance/appearance-main.c
index b2b77353..bd6fc87f 100644
--- a/capplets/appearance/appearance-main.c
+++ b/capplets/appearance/appearance-main.c
@@ -36,7 +36,6 @@ static AppearanceData *
init_appearance_data (int *argc, char ***argv, GOptionContext *context)
{
AppearanceData *data = NULL;
- gchar *uifile;
GtkBuilder *ui;
GError *err = NULL;
@@ -45,11 +44,8 @@ init_appearance_data (int *argc, char ***argv, GOptionContext *context)
activate_settings_daemon ();
/* set up the data */
- uifile = g_build_filename (MATECC_GTKBUILDER_DIR, "appearance.ui",
- NULL);
ui = gtk_builder_new ();
- gtk_builder_add_from_file (ui, uifile, &err);
- g_free (uifile);
+ gtk_builder_add_from_resource (ui, "/org/mate/mcc/appearance/data/appearance.ui", &err);
if (err)
{
diff --git a/capplets/appearance/data/Makefile.am b/capplets/appearance/data/Makefile.am
index 4bec1621..9db85374 100644
--- a/capplets/appearance/data/Makefile.am
+++ b/capplets/appearance/data/Makefile.am
@@ -1,7 +1,4 @@
-gtkbuilderdir = $(pkgdatadir)/ui
-dist_gtkbuilder_DATA = appearance.ui
-
pixmapdir = $(pkgdatadir)/pixmaps
dist_pixmap_DATA = \
subpixel-bgr.png \
@@ -25,9 +22,6 @@ desktop_in_files = \
mate-theme-installer.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-
-
-
@INTLTOOL_XML_RULE@
xml_in_files = \
@@ -36,7 +30,6 @@ xml_in_files = \
mimedir = $(datadir)/mime/packages
mime_DATA = $(xml_in_files:.xml.in=.xml)
-
install-data-hook:
if ENABLE_UPDATE_MIMEDB
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
@@ -47,7 +40,10 @@ if ENABLE_UPDATE_MIMEDB
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
endif
-EXTRA_DIST = $(xml_in_files) $(desktop_in_files)
+EXTRA_DIST = \
+ appearance.ui \
+ $(xml_in_files) \
+ $(desktop_in_files)
CLEANFILES = $(desktop_DATA) $(mime_DATA)
diff --git a/capplets/appearance/org.mate.mcc.appearance.gresource.xml b/capplets/appearance/org.mate.mcc.appearance.gresource.xml
new file mode 100644
index 00000000..7fc4bf8e
--- /dev/null
+++ b/capplets/appearance/org.mate.mcc.appearance.gresource.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This file is part of MATE Control Center.
+
+ MATE Control Center is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ MATE Control Center is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with MATE Control Center. If not, see <http://www.gnu.org/licenses/>.
+-->
+<gresources>
+ <gresource prefix="/org/mate/mcc/appearance">
+ <file compressed="true">data/appearance.ui</file>
+ </gresource>
+</gresources>