[mate-utils] 01/01: debian/patches: Add 0002_fix-errmsg-text.patch. Show actual error message if loading of the mate-screenshot UI fails. (Closes: #783162).
Mike Gabriel
sunweaver at debian.org
Mon May 11 07:59:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch debian/jessie/updates
in repository mate-utils.
commit e90f757cbe23e312459ba0a8cf39e33239422314
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon May 11 09:09:16 2015 +0200
debian/patches: Add 0002_fix-errmsg-text.patch. Show actual error message if loading of the mate-screenshot UI fails. (Closes: #783162).
---
debian/patches/0002_fix-errmsg-text.patch | 48 +++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 49 insertions(+)
diff --git a/debian/patches/0002_fix-errmsg-text.patch b/debian/patches/0002_fix-errmsg-text.patch
new file mode 100644
index 0000000..49834c6
--- /dev/null
+++ b/debian/patches/0002_fix-errmsg-text.patch
@@ -0,0 +1,48 @@
+From c5e6b092764be2bbe668897fca7d977d5cbba57c Mon Sep 17 00:00:00 2001
+From: Monsta <monsta at inbox.ru>
+Date: Tue, 16 Dec 2014 18:18:14 +0300
+Subject: [PATCH] mate-screenshot: show the actual error message when UI load
+ fails
+
+---
+ mate-screenshot/screenshot-dialog.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/mate-screenshot/screenshot-dialog.c b/mate-screenshot/screenshot-dialog.c
+index b5b2be5..8f65f76 100644
+--- a/mate-screenshot/screenshot-dialog.c
++++ b/mate-screenshot/screenshot-dialog.c
+@@ -211,6 +211,7 @@ screenshot_dialog_new (GdkPixbuf *screenshot,
+ gint pos;
+ GFile *tmp_file;
+ GFile *parent_file;
++ GError *error = NULL;
+ guint res;
+
+ tmp_file = g_file_new_for_uri (initial_uri);
+@@ -223,8 +224,8 @@ 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", NULL);
++ dialog->ui = gtk_builder_new ();
++ res = gtk_builder_add_from_file (dialog->ui, UIDIR "/mate-screenshot.ui", &error);
+ dialog->screenshot = screenshot;
+
+ if (res == 0)
+@@ -233,10 +234,12 @@ screenshot_dialog_new (GdkPixbuf *screenshot,
+ dialog = gtk_message_dialog_new (NULL, 0,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+- _("UI definition file for the screenshot program is missing.\n"
+- "Please check your installation of mate-utils"));
++ _("Error loading UI definition file for the screenshot program: \n%s\n\n"
++ "Please check your installation of mate-utils."), error->message);
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
++
++ g_error_free (error);
+ exit (1);
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 2da6373..72deee6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001_mate-dictionary-fix-double-free-error.patch
+0002_fix-errmsg-text.patch
2001_omit-gfdl-licensed-help-files.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-utils.git
More information about the pkg-mate-commits
mailing list