[frogr] Report to the user when an error happened loading a picture
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Report to the user when an error happened loading a picture
- Date: Tue, 4 Dec 2012 00:33:54 +0000 (UTC)
commit a5cba6e737a51c4db97e45d1017c6d7118fdb1a5
Author: Mario Sanchez Prada <msanchez gnome org>
Date: Tue Dec 4 01:26:48 2012 +0100
Report to the user when an error happened loading a picture
src/frogr-file-loader.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/frogr-file-loader.c b/src/frogr-file-loader.c
index 27ca357..7ffa0bd 100644
--- a/src/frogr-file-loader.c
+++ b/src/frogr-file-loader.c
@@ -306,7 +306,16 @@ _load_current_file_cb (GObject *object,
}
else if (error)
{
- g_warning ("Not able to read pixbuf: %s", error->message);
+ gchar *file_name = NULL;
+ gchar *msg = NULL;
+
+ file_name = g_file_get_basename (file);
+ msg = g_strdup_printf (_("Unable to load picture %s:\n%s"), file_name, error->message);
+ g_free (file_name);
+
+ frogr_util_show_error_dialog (GTK_WINDOW (priv->mainview), msg);
+ g_free (msg);
+
g_error_free (error);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]