[gthumb] use a better error message when the catalog already exists
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] use a better error message when the catalog already exists
- Date: Sun, 11 Dec 2011 17:02:24 +0000 (UTC)
commit 7653a60f01c7efbe9e9c5287d8e5214578d09b12
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Dec 11 18:01:51 2011 +0100
use a better error message when the catalog already exists
extensions/catalogs/gth-file-source-catalogs.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/extensions/catalogs/gth-file-source-catalogs.c b/extensions/catalogs/gth-file-source-catalogs.c
index 1814093..92092f0 100644
--- a/extensions/catalogs/gth-file-source-catalogs.c
+++ b/extensions/catalogs/gth-file-source-catalogs.c
@@ -498,10 +498,15 @@ gth_file_source_catalogs_rename (GthFileSource *file_source,
}
}
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) {
+ g_clear_error (&error);
+ error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_EXISTS, _("Name already used"));
+ }
+
object_ready_with_error (file_source, callback, data, error);
_g_object_unref (new_file);
- g_object_unref (catalog);
+ _g_object_unref (catalog);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]