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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/generic/runners/locations
From:       Matthias Fuchs <mat69 () gmx ! net>
Date:       2010-12-05 19:51:49
Message-ID: 20101205195149.CD862AC8A5 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1203958 by mfuchs:

Shows the correct mime-icon for local files.

 M  +7 -0      locationrunner.cpp  


--- trunk/KDE/kdebase/workspace/plasma/generic/runners/locations/locationrunner.cpp #1203957:1203958
@@ -24,6 +24,7 @@
 #include <KDebug>
 #include <KRun>
 #include <KLocale>
+#include <KMimeType>
 #include <KShell>
 #include <KUrl>
 #include <KIcon>
@@ -112,7 +113,13 @@
         Plasma::QueryMatch match(this);
         match.setType(Plasma::QueryMatch::ExactMatch);
         match.setText(i18n("Open %1", term));
+
+        if (type == Plasma::RunnerContext::File) {
+            match.setIcon(KIcon(KMimeType::iconNameForUrl(KUrl(term))));
+        } else {
         match.setIcon(KIcon("system-file-manager"));
+        }
+
         match.setRelevance(1);
         match.setData(term);
         match.setType(Plasma::QueryMatch::ExactMatch);
[prev in list] [next in list] [prev in thread] [next in thread] 

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