[gimp/metadata-browser] file-cel: use g_set_error() for errors instead of g_message()
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] file-cel: use g_set_error() for errors instead of g_message()
- Date: Thu, 13 Sep 2012 00:30:59 +0000 (UTC)
commit 6b5f9ff80181f437b1f3d1c597102fd0a26104da
Author: Nils Philippsen <nils redhat com>
Date: Fri Jul 13 15:33:27 2012 +0200
file-cel: use g_set_error() for errors instead of g_message()
plug-ins/common/file-cel.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
index 0f2a4c7..6292d7a 100644
--- a/plug-ins/common/file-cel.c
+++ b/plug-ins/common/file-cel.c
@@ -426,7 +426,7 @@ load_image (const gchar *file,
if (image == -1)
{
- g_message (_("Can't create a new image"));
+ g_set_error (error, 0, 0, _("Can't create a new image"));
fclose (fp);
return -1;
}
@@ -540,7 +540,8 @@ load_image (const gchar *file,
break;
default:
- g_message (_("Unsupported bit depth (%d)!"), bpp);
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Unsupported bit depth (%d)!"), bpp);
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]