[gnome-screenshot] screenshot: remove useless error dialog
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screenshot] screenshot: remove useless error dialog
- Date: Tue, 8 May 2012 19:22:29 +0000 (UTC)
commit 063f1e7d887ae926da19f88092fc97d5182f24dc
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue May 8 14:34:56 2012 -0400
screenshot: remove useless error dialog
A missing UI file is a fatal error; avoid showing an error dialog in
that case.
src/screenshot-dialog.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/src/screenshot-dialog.c b/src/screenshot-dialog.c
index 6501735..b37a142 100644
--- a/src/screenshot-dialog.c
+++ b/src/screenshot-dialog.c
@@ -155,22 +155,10 @@ screenshot_dialog_new (GdkPixbuf *screenshot,
dialog = g_new0 (ScreenshotDialog, 1);
dialog->screenshot = screenshot;
- ui = gtk_builder_new ();
- gtk_builder_set_translation_domain (ui, GETTEXT_PACKAGE);
- res = gtk_builder_add_from_file (ui, UIDIR "/gnome-screenshot.ui", NULL);
-
- if (res == 0)
- {
- GtkWidget *dialog;
- 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 gnome-utils"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- exit (1);
- }
+ dialog-> ui = gtk_builder_new ();
+ gtk_builder_set_translation_domain (dialog->ui, GETTEXT_PACKAGE);
+ res = gtk_builder_add_from_file (dialog->ui, UIDIR "/gnome-screenshot.ui", NULL);
+ g_assert (res != 0);
width = gdk_pixbuf_get_width (screenshot);
height = gdk_pixbuf_get_height (screenshot);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]