summaryrefslogtreecommitdiff
path: root/capplets/keybindings
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/keybindings')
-rw-r--r--capplets/keybindings/Makefile.am20
-rw-r--r--capplets/keybindings/mate-keybinding-properties.c3
-rw-r--r--capplets/keybindings/org.mate.mcc.keybindings.gresource.xml22
3 files changed, 36 insertions, 9 deletions
diff --git a/capplets/keybindings/Makefile.am b/capplets/keybindings/Makefile.am
index 9501dd8f..24c95a56 100644
--- a/capplets/keybindings/Makefile.am
+++ b/capplets/keybindings/Makefile.am
@@ -4,6 +4,9 @@ cappletname = keybinding
bin_PROGRAMS = mate-keybinding-properties
mate_keybinding_properties_LDADD = $(MATECC_CAPPLETS_LIBS)
+BUILT_SOURCES = mate-keybinding-properties-resources.h mate-keybinding-properties-resources.c
+nodist_mate_keybinding_properties_SOURCES = \
+ $(BUILT_SOURCES)
mate_keybinding_properties_SOURCES = \
mate-keybinding-properties.c \
eggcellrendererkeys.c \
@@ -13,9 +16,6 @@ mate_keybinding_properties_SOURCES = \
@INTLTOOL_DESKTOP_RULE@
-uidir = $(pkgdatadir)/ui
-ui_DATA = mate-keybinding-properties.ui
-
desktopdir = $(datadir)/applications
Desktop_in_files = mate-keybinding.desktop.in
desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
@@ -29,16 +29,22 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = mate-keybindings.pc
+mate-keybinding-properties-resources.h mate-keybinding-properties-resources.c: org.mate.mcc.keybindings.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/org.mate.mcc.keybindings.gresource.xml)
+ $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name keybindings $<
+
AM_CPPFLAGS = \
$(MATECC_CAPPLETS_CFLAGS) \
-DMATELOCALEDIR="\"$(datadir)/locale\"" \
- -DMATECC_DATA_DIR="\"$(pkgdatadir)\"" \
- -DMATECC_UI_DIR="\"$(uidir)\""
+ -DMATECC_DATA_DIR="\"$(pkgdatadir)\""
CLEANFILES = \
+ $(BUILT_SOURCES) \
$(MATECC_CAPPLETS_CLEANFILES) \
$(desktop_DATA) \
$(xml_DATA)
-EXTRA_DIST = $(ui_DATA) $(xml_in_files) mate-keybindings.pc.in $(Desktop_in_files)
-
+EXTRA_DIST = $(xml_in_files) \
+ mate-keybindings.pc.in \
+ mate-keybinding-properties.ui \
+ $(Desktop_in_files) \
+ org.mate.mcc.keybindings.gresource.xml
-include $(top_srcdir)/git.mk
diff --git a/capplets/keybindings/mate-keybinding-properties.c b/capplets/keybindings/mate-keybinding-properties.c
index cf1891d2..3a8eefc2 100644
--- a/capplets/keybindings/mate-keybinding-properties.c
+++ b/capplets/keybindings/mate-keybinding-properties.c
@@ -104,9 +104,8 @@ create_builder (void)
{
GtkBuilder *builder = gtk_builder_new();
GError *error = NULL;
- static const gchar *uifile = MATECC_UI_DIR "/mate-keybinding-properties.ui";
- if (gtk_builder_add_from_file (builder, uifile, &error) == 0) {
+ if (gtk_builder_add_from_resource (builder, "/org/mate/mcc/keybindings/mate-keybinding-properties.ui", &error) == 0) {
g_warning ("Could not load UI: %s", error->message);
g_error_free (error);
g_object_unref (builder);
diff --git a/capplets/keybindings/org.mate.mcc.keybindings.gresource.xml b/capplets/keybindings/org.mate.mcc.keybindings.gresource.xml
new file mode 100644
index 00000000..ac479418
--- /dev/null
+++ b/capplets/keybindings/org.mate.mcc.keybindings.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/keybindings">
+ <file compressed="true">mate-keybinding-properties.ui</file>
+ </gresource>
+</gresources>