[Xfce4-commits] <tumbler:master> Allow TumblerFileInfos to be created with empty URIs/MIME types.

Jannis Pohlmann noreply at xfce.org
Fri Feb 26 19:38:01 CET 2010


Updating branch refs/heads/master
         to 2eb396988c63377c0ae9be74008cce339e70a044 (commit)
       from 2619211589771e4dd36f16a5766ab333615be45f (commit)

commit 2eb396988c63377c0ae9be74008cce339e70a044
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Fri Feb 26 19:34:36 2010 +0100

    Allow TumblerFileInfos to be created with empty URIs/MIME types.
    
    This is done to avoid warnings when someone forgets to send a MIME type
    along with a thumbnail request etc. For empty URIs/MIME types, tumbler
    will not find a thumbnailer and the broken elements will be reported
    back to the client via the "Error" signal.
    
    The original idea came from Philip Van Hoof <philip at codeminded.be>.

 tumbler/tumbler-file-info.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tumbler/tumbler-file-info.c b/tumbler/tumbler-file-info.c
index c4f162d..37d5ae3 100644
--- a/tumbler/tumbler-file-info.c
+++ b/tumbler/tumbler-file-info.c
@@ -221,8 +221,8 @@ tumbler_file_info_new (const gchar            *uri,
                        const gchar            *mime_type,
                        TumblerThumbnailFlavor *flavor)
 {
-  g_return_val_if_fail (uri != NULL && *uri != '\0', NULL);
-  g_return_val_if_fail (mime_type != NULL && *mime_type != '\0', NULL);
+  g_return_val_if_fail (uri != NULL, NULL);
+  g_return_val_if_fail (mime_type != NULL, NULL);
   g_return_val_if_fail (flavor == NULL || TUMBLER_IS_THUMBNAIL_FLAVOR (flavor), NULL);
 
   return g_object_new (TUMBLER_TYPE_FILE_INFO, "uri", uri, "mime-type", mime_type,



More information about the Xfce4-commits mailing list