Changeset View
Changeset View
Standalone View
Standalone View
krusader/DiskUsage/diskusage.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
55 | #include "dulistview.h" | 55 | #include "dulistview.h" | ||
56 | #include "filelightParts/Config.h" | 56 | #include "filelightParts/Config.h" | ||
57 | #include "../FileSystem/fileitem.h" | 57 | #include "../FileSystem/fileitem.h" | ||
58 | #include "../FileSystem/filesystemprovider.h" | 58 | #include "../FileSystem/filesystemprovider.h" | ||
59 | #include "../FileSystem/krpermhandler.h" | 59 | #include "../FileSystem/krpermhandler.h" | ||
60 | #include "../Panel/krpanel.h" | 60 | #include "../Panel/krpanel.h" | ||
61 | #include "../Panel/panelfunc.h" | 61 | #include "../Panel/panelfunc.h" | ||
62 | #include "../defaults.h" | 62 | #include "../defaults.h" | ||
63 | #include "../kicons.h" | | |||
64 | #include "../krglobal.h" | 63 | #include "../krglobal.h" | ||
64 | #include "../filelisticon.h" | ||||
65 | 65 | | |||
66 | // these are the values that will exist in the menu | 66 | // these are the values that will exist in the menu | ||
67 | #define DELETE_ID 90 | 67 | #define DELETE_ID 90 | ||
68 | #define EXCLUDE_ID 91 | 68 | #define EXCLUDE_ID 91 | ||
69 | #define PARENT_DIR_ID 92 | 69 | #define PARENT_DIR_ID 92 | ||
70 | #define NEW_SEARCH_ID 93 | 70 | #define NEW_SEARCH_ID 93 | ||
71 | #define REFRESH_ID 94 | 71 | #define REFRESH_ID 94 | ||
72 | #define STEP_INTO_ID 95 | 72 | #define STEP_INTO_ID 95 | ||
▲ Show 20 Lines • Show All 878 Lines • ▼ Show 20 Line(s) | |||||
951 | 951 | | |||
952 | QPixmap DiskUsage::getIcon(QString mime) | 952 | QPixmap DiskUsage::getIcon(QString mime) | ||
953 | { | 953 | { | ||
954 | QPixmap icon; | 954 | QPixmap icon; | ||
955 | 955 | | |||
956 | if (!QPixmapCache::find(mime, icon)) { | 956 | if (!QPixmapCache::find(mime, icon)) { | ||
957 | // get the icon. | 957 | // get the icon. | ||
958 | if (mime == "Broken Link !") // FIXME: this doesn't work anymore - the reported mimetype for a broken link is now "unknown" | 958 | if (mime == "Broken Link !") // FIXME: this doesn't work anymore - the reported mimetype for a broken link is now "unknown" | ||
959 | icon = FL_LOADICON("file-broken"); | 959 | icon = FileListIcon("file-broken").pixmap(); | ||
960 | else { | 960 | else { | ||
961 | QMimeDatabase db; | 961 | QMimeDatabase db; | ||
962 | QMimeType mt = db.mimeTypeForName(mime); | 962 | QMimeType mt = db.mimeTypeForName(mime); | ||
963 | if (mt.isValid()) | 963 | if (mt.isValid()) | ||
964 | icon = FL_LOADICON(mt.iconName()); | 964 | icon = FileListIcon(mt.iconName()).pixmap(); | ||
965 | else | 965 | else | ||
966 | icon = FL_LOADICON("file-broken"); | 966 | icon = FileListIcon("file-broken").pixmap(); | ||
967 | } | 967 | } | ||
968 | 968 | | |||
969 | // insert it into the cache | 969 | // insert it into the cache | ||
970 | QPixmapCache::insert(mime, icon); | 970 | QPixmapCache::insert(mime, icon); | ||
971 | } | 971 | } | ||
972 | return icon; | 972 | return icon; | ||
973 | } | 973 | } | ||
974 | 974 | | |||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |