summaryrefslogtreecommitdiff
path: root/mate-screenshot
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2015-05-07 08:14:33 +0200
committerStefano Karapetsas <[email protected]>2015-05-07 08:14:33 +0200
commita1c7e1ad07e03074802090ef7cc3246ba64e6902 (patch)
treede4db90dc64e175cdf2df6ebb7aee7bb6e30e1d1 /mate-screenshot
parent45efcb759ae07a6c0f494dea03b83fb9456c4214 (diff)
parentc5e6b092764be2bbe668897fca7d977d5cbba57c (diff)
downloadmate-utils-a1c7e1ad07e03074802090ef7cc3246ba64e6902.tar.bz2
mate-utils-a1c7e1ad07e03074802090ef7cc3246ba64e6902.tar.xz
Merge pull request #98 from monsta/1.81.8
[1.8] mate-screenshot: show the actual error message when UI load fails
Diffstat (limited to 'mate-screenshot')
-rw-r--r--mate-screenshot/screenshot-dialog.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mate-screenshot/screenshot-dialog.c b/mate-screenshot/screenshot-dialog.c
index b5b2be56..8f65f76f 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);
}