[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdebase/libkonq
From:       David Faure <faure () kde ! org>
Date:       2005-04-06 23:38:12
Message-ID: 200504070138.12921.faure () kde ! org
[Download RAW message or body]

On Tuesday 05 April 2005 22:58, Stephan Binner wrote:
> On Tuesday 05 April 2005 21:43, Christian Loose wrote:
> 
> > I don't know much about our mimetype stuff, but isn't [..] safer? 
> 
> I'm lazy and just copying stuff around (including missing i18n sometimes :-).

Yep :)

> > Especially since it also contains the upper case file extensions? 
> 
> Changing it only here would still not make it render those cases because I
> copied it from KBackgroundRenderer::doWallpaper() :-)... Feel free to fix.

There you go (but that one's untested).

--- bgrender.cpp        23 Jan 2005 10:32:05 -0000      1.12
+++ bgrender.cpp        6 Apr 2005 23:37:40 -0000
@@ -25,6 +25,7 @@
 #include <kpixmapio.h>
 #include <ktempfile.h>
 #include <kcursor.h>
+#include <kmimetype.h>

 #ifdef HAVE_LIBART
 #include <ksvgiconengine.h>
@@ -293,7 +294,7 @@ wp_load:
            goto wp_out;
        }

-        if (file.endsWith(".svg") || file.endsWith(".svgz")) {
+        if ( KMimeType::findByPath( file )->is( "image/svg+xml" ) ) {
 #ifdef HAVE_LIBART
            // Special stuff for SVG icons
            KSVGIconEngine* svgEngine = new KSVGIconEngine();

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic