[Xfce4-commits] <tumbler:master> Update TumblerError enum and its usage.

Jannis Pohlmann noreply at xfce.org
Tue Dec 8 23:24:03 CET 2009


Updating branch refs/heads/master
         to b00979630f08954ddaff35e9dec560ce81bd2915 (commit)
       from ae93d1ed0d6f08375c3a664d6b40eba1a3ac81d8 (commit)

commit b00979630f08954ddaff35e9dec560ce81bd2915
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Tue Dec 8 23:10:06 2009 +0100

    Update TumblerError enum and its usage.

 plugins/xdg-cache/xdg-cache-thumbnail.c |    2 +-
 tumbler/tumbler-error.h                 |    6 ++++--
 tumblerd/tumbler-group-scheduler.c      |    2 +-
 tumblerd/tumbler-lifo-scheduler.c       |    2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/plugins/xdg-cache/xdg-cache-thumbnail.c b/plugins/xdg-cache/xdg-cache-thumbnail.c
index 7da3e89..8c843d3 100644
--- a/plugins/xdg-cache/xdg-cache-thumbnail.c
+++ b/plugins/xdg-cache/xdg-cache-thumbnail.c
@@ -378,7 +378,7 @@ xdg_cache_thumbnail_save_image_data (TumblerThumbnail *thumbnail,
           /* try to rename the thumbnail */
           if (g_rename (temp_path, dest_path) == -1)
             {
-              g_set_error (&err, TUMBLER_ERROR, TUMBLER_ERROR_FAILED,
+              g_set_error (&err, TUMBLER_ERROR, TUMBLER_ERROR_SAVE_FAILED,
                            _("Could not save thumbnail to \"%s\""), dest_path);
             }
 
diff --git a/tumbler/tumbler-error.h b/tumbler/tumbler-error.h
index 0acc886..a8472ad 100644
--- a/tumbler/tumbler-error.h
+++ b/tumbler/tumbler-error.h
@@ -40,9 +40,11 @@ G_BEGIN_DECLS
 
 typedef enum /*< enum >*/
 {
-  TUMBLER_ERROR_FAILED,
-  TUMBLER_ERROR_NO_THUMBNAILER,
+  TUMBLER_ERROR_UNSUPPORTED,
+  TUMBLER_ERROR_CONNECTION_ERROR,
+  TUMBLER_ERROR_INVALID_FORMAT,
   TUMBLER_ERROR_IS_THUMBNAIL,
+  TUMBLER_ERROR_SAVE_FAILED,
 } TumblerErrorEnum;
 
 G_END_DECLS
diff --git a/tumblerd/tumbler-group-scheduler.c b/tumblerd/tumbler-group-scheduler.c
index 22d160f..1e3dd2c 100644
--- a/tumblerd/tumbler-group-scheduler.c
+++ b/tumblerd/tumbler-group-scheduler.c
@@ -481,7 +481,7 @@ tumbler_group_scheduler_thread (gpointer data,
           else
             {
               /* no thumbnailer for this URI, we need to emit an error */
-              g_set_error (&error, TUMBLER_ERROR, TUMBLER_ERROR_NO_THUMBNAILER,
+              g_set_error (&error, TUMBLER_ERROR, TUMBLER_ERROR_UNSUPPORTED,
                            _("No thumbnailer available for \"%s\""), 
                            tumbler_file_info_get_uri (request->infos[n]));
             }
diff --git a/tumblerd/tumbler-lifo-scheduler.c b/tumblerd/tumbler-lifo-scheduler.c
index f2c6c16..8cc7e82 100644
--- a/tumblerd/tumbler-lifo-scheduler.c
+++ b/tumblerd/tumbler-lifo-scheduler.c
@@ -417,7 +417,7 @@ tumbler_lifo_scheduler_thread (gpointer data,
           else
             {
               /* no thumbnailer for this URI, we need to emit an error */
-              g_set_error (&error, TUMBLER_ERROR, TUMBLER_ERROR_NO_THUMBNAILER,
+              g_set_error (&error, TUMBLER_ERROR, TUMBLER_ERROR_UNSUPPORTED,
                            _("No thumbnailer available for \"%s\""), 
                            tumbler_file_info_get_uri (request->infos[n]));
             }



More information about the Xfce4-commits mailing list