diff options
-rw-r--r-- | mate-screenshot/screenshot-dialog.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mate-screenshot/screenshot-dialog.c b/mate-screenshot/screenshot-dialog.c index c5105be7..7c5fae6d 100644 --- a/mate-screenshot/screenshot-dialog.c +++ b/mate-screenshot/screenshot-dialog.c @@ -220,6 +220,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); @@ -232,8 +233,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) @@ -242,10 +243,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); } |