summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am9
-rw-r--r--src/mate-screensaver-preferences.c9
2 files changed, 11 insertions, 7 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 37cbbca..3de1112 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -222,6 +222,13 @@ mate_screensaver_LDADD = \
mate_screensaver_LDFLAGS = -export-dynamic
+mate-screensaver-preferences-resources.h mate-screensaver-preferences-resources.c: $(srcdir)/../data/org.mate.screensaver.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir)/../data $(srcdir)/../data/org.mate.screensaver.gresource.xml)
+ $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir)/../data --generate --c-name screensaver $<
+
+nodist_mate_screensaver_preferences_SOURCES = \
+ mate-screensaver-preferences-resources.h \
+ mate-screensaver-preferences-resources.c \
+ $(NULL)
mate_screensaver_preferences_SOURCES = \
mate-screensaver-preferences.c \
copy-theme-dialog.c \
@@ -249,6 +256,8 @@ EXTRA_DIST = \
CLEANFILES = \
$(desktop_DATA) \
mate-screensaver.desktop.in \
+ mate-screensaver-preferences-resources.h \
+ mate-screensaver-preferences-resources.c \
$(BUILT_SOURCES)
MAINTAINERCLEANFILES = \
diff --git a/src/mate-screensaver-preferences.c b/src/mate-screensaver-preferences.c
index b9eb702..db96788 100644
--- a/src/mate-screensaver-preferences.c
+++ b/src/mate-screensaver-preferences.c
@@ -47,8 +47,6 @@
#include "gs-job.h"
#include "gs-prefs.h" /* for GS_MODE enum */
-#define GTK_BUILDER_FILE "mate-screensaver-preferences.ui"
-
#define LOCKDOWN_SETTINGS_SCHEMA "org.mate.lockdown"
#define KEY_LOCK_DISABLE "disable-lock-screen"
@@ -1534,21 +1532,18 @@ init_capplet (void)
GtkWidget *fullscreen_preview_previous;
GtkWidget *fullscreen_preview_next;
GtkWidget *fullscreen_preview_close;
- char *gtk_builder_file;
gdouble activate_delay;
gboolean enabled;
gboolean is_writable;
GError *error=NULL;
gint mode;
- gtk_builder_file = g_build_filename (GTKBUILDERDIR, GTK_BUILDER_FILE, NULL);
builder = gtk_builder_new();
- if (!gtk_builder_add_from_file(builder, gtk_builder_file, &error))
+ if (!gtk_builder_add_from_resource (builder, "/org/mate/screensaver/preferences.ui", &error))
{
- g_warning("Couldn't load builder file: %s", error->message);
+ g_warning("Couldn't load builder resource: %s", error->message);
g_error_free(error);
}
- g_free (gtk_builder_file);
if (builder == NULL)
{