summaryrefslogtreecommitdiff
path: root/mate-screenshot
diff options
context:
space:
mode:
Diffstat (limited to 'mate-screenshot')
-rw-r--r--mate-screenshot/data/Makefile.am7
-rw-r--r--mate-screenshot/data/org.mate.screenshot.gresource.xml22
-rw-r--r--mate-screenshot/src/Makefile.am22
-rw-r--r--mate-screenshot/src/screenshot-dialog.c4
4 files changed, 45 insertions, 10 deletions
diff --git a/mate-screenshot/data/Makefile.am b/mate-screenshot/data/Makefile.am
index d96df67f..2b4ede33 100644
--- a/mate-screenshot/data/Makefile.am
+++ b/mate-screenshot/data/Makefile.am
@@ -4,8 +4,6 @@ mate_screenshot_DATA = $(mate_screenshot_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
man_MANS = mate-screenshot.1
-uidir = $(datadir)/mate-screenshot
-ui_DATA = mate-screenshot.ui
@INTLTOOL_XML_RULE@
appdatadir = $(datadir)/metainfo
@@ -17,9 +15,10 @@ gsettings_SCHEMAS = org.mate.screenshot.gschema.xml
EXTRA_DIST = \
$(appdata_in_files) \
- $(mate_screenshot_in_files) \
+ $(mate_screenshot_in_files) \
$(man_MANS) \
- $(ui_DATA)
+ mate-screenshot.ui \
+ org.mate.screenshot.gresource.xml
CLEANFILES = \
$(gsettings_SCHEMAS) \
diff --git a/mate-screenshot/data/org.mate.screenshot.gresource.xml b/mate-screenshot/data/org.mate.screenshot.gresource.xml
new file mode 100644
index 00000000..33c75736
--- /dev/null
+++ b/mate-screenshot/data/org.mate.screenshot.gresource.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This file is part of MATE Utils.
+
+ MATE Utils 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 Utils 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 Utils. If not, see <http://www.gnu.org/licenses/>.
+-->
+<gresources>
+ <gresource prefix="/org/mate/screenshot">
+ <file compressed="true">mate-screenshot.ui</file>
+ </gresource>
+</gresources>
diff --git a/mate-screenshot/src/Makefile.am b/mate-screenshot/src/Makefile.am
index 9ae05a73..e5104cbd 100644
--- a/mate-screenshot/src/Makefile.am
+++ b/mate-screenshot/src/Makefile.am
@@ -4,11 +4,20 @@ AM_CPPFLAGS = \
-I. \
-I$(srcdir) \
-DMATELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
- -DUIDIR=\""$(datadir)/mate-screenshot"\"
+ $(NULL)
bin_PROGRAMS = mate-screenshot
-mate_screenshot_SOURCES = \
+BUILT_SOURCES = \
+ screenshot-resources.c \
+ screenshot-resources.h \
+ $(NULL)
+
+nodist_mate_screenshot_SOURCES = \
+ $(BUILT_SOURCES) \
+ $(NULL)
+
+mate_screenshot_SOURCES = \
mate-screenshot.c \
screenshot-dialog.c \
screenshot-dialog.h \
@@ -32,7 +41,7 @@ mate_screenshot_CFLAGS = \
mate_screenshot_LDFLAGS = -export-dynamic
-mate_screenshot_LDADD = \
+mate_screenshot_LDADD = \
$(XSHAPE_LIBS) \
$(GLIB_LIBS) \
$(GIO_LIBS) \
@@ -41,6 +50,13 @@ mate_screenshot_LDADD = \
$(GTK_LIBS) \
-lm
+screenshot-resources.h screenshot-resources.c: $(srcdir)/../data/org.mate.screenshot.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir)/../data $(srcdir)/../data/org.mate.screenshot.gresource.xml)
+ $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir)/../data --generate --c-name screenshot $<
+
+CLEANFILES = \
+ $(BUILT_SOURCES) \
+ $(NULL)
+
install-exec-local:
rm -f $(DESTDIR)$(bindir)/mate-panel-screenshot
ln -s mate-screenshot $(DESTDIR)$(bindir)/mate-panel-screenshot
diff --git a/mate-screenshot/src/screenshot-dialog.c b/mate-screenshot/src/screenshot-dialog.c
index f9450582..854ae3e4 100644
--- a/mate-screenshot/src/screenshot-dialog.c
+++ b/mate-screenshot/src/screenshot-dialog.c
@@ -181,7 +181,6 @@ screenshot_dialog_new (GdkPixbuf *screenshot,
GFile *tmp_file;
GFile *parent_file;
GError *error = NULL;
- guint res;
tmp_file = g_file_new_for_uri (initial_uri);
parent_file = g_file_get_parent (tmp_file);
@@ -194,11 +193,10 @@ screenshot_dialog_new (GdkPixbuf *screenshot,
dialog = g_new0 (ScreenshotDialog, 1);
dialog->ui = gtk_builder_new ();
- res = gtk_builder_add_from_file (dialog->ui, UIDIR "/mate-screenshot.ui", &error);
dialog->screenshot = screenshot;
- if (res == 0)
+ if (gtk_builder_add_from_resource (dialog->ui, "/org/mate/screenshot/mate-screenshot.ui", &error) == 0)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (NULL, 0,