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

List:       kde-commits
Subject:    Re: kdebase/kcontrol/background
From:       David Faure <faure () kde ! org>
Date:       2005-04-06 23:34:10
Message-ID: 200504070134.10964.faure () kde ! org
[Download RAW message or body]

On Monday 04 April 2005 21:59, Stephan Binner wrote:
> CVS commit by binner: 
> 
> Bug 102244: SVG files unavail from file selector in slide show
> 
> 
> +    pattern += "\n*.svg *.SVG *.svgz *.SVGZ|Scalable Vector Graphics";

Shouldn't this be using i18n()?
Or better indeed, using mimetypes.

This seems to work for me, ok if I commit?

--- bgwallpaper.cpp     4 Apr 2005 21:06:54 -0000       1.12
+++ bgwallpaper.cpp     6 Apr 2005 23:33:30 -0000
@@ -144,14 +144,13 @@ void BGMultiWallpaperDialog::setEnabledM

 void BGMultiWallpaperDialog::slotAdd()
 {
-    QString pattern = KImageIO::pattern();
+    QStringList mimeTypes = KImageIO::mimeTypes( KImageIO::Reading );
 #ifdef HAVE_LIBART
-    pattern = "*.svg *.svgz " + pattern;
-    pattern += i18n("\n*.svg *.SVG *.svgz *.SVGZ|Scalable Vector Graphics");
+    mimeTypes += "image/svg+xml";
 #endif

     KFileDialog fileDialog(KGlobal::dirs()->findDirs("wallpaper", "").first(),
-                          pattern, this,
+                          mimeTypes.join( " " ), this,
                           0L, true);

     fileDialog.setCaption(i18n("Select Image"));

-- 
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