[mate-utils] 01/03: 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 10:31:54 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 58ef897a31a733eede32534b452ccfa0fa538a0c
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 | 45 +++++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 2 files changed, 46 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..826350d
--- /dev/null
+++ b/debian/patches/0002_fix-errmsg-text.patch
@@ -0,0 +1,45 @@
+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(-)
+
+--- a/mate-screenshot/screenshot-dialog.c
++++ b/mate-screenshot/screenshot-dialog.c
+@@ -211,6 +211,7 @@
+   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 @@
+ 
+   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,9 +234,11 @@
+       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));
++
++      g_error_free (error);
+       gtk_widget_destroy (dialog);
+       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