Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/PanelView/krview.cpp
Show All 23 Lines | |||||
24 | #include "krselectionmode.h" | 24 | #include "krselectionmode.h" | ||
25 | #include "krviewfactory.h" | 25 | #include "krviewfactory.h" | ||
26 | #include "krviewitem.h" | 26 | #include "krviewitem.h" | ||
27 | #include "../FileSystem/dirlisterinterface.h" | 27 | #include "../FileSystem/dirlisterinterface.h" | ||
28 | #include "../FileSystem/fileitem.h" | 28 | #include "../FileSystem/fileitem.h" | ||
29 | #include "../FileSystem/krpermhandler.h" | 29 | #include "../FileSystem/krpermhandler.h" | ||
30 | #include "../Filter/filterdialog.h" | 30 | #include "../Filter/filterdialog.h" | ||
31 | #include "../defaults.h" | 31 | #include "../defaults.h" | ||
32 | #include "../kicons.h" | 32 | #include "../filelisticon.h" | ||
33 | #include "../krcolorcache.h" | 33 | #include "../krcolorcache.h" | ||
34 | #include "../krglobal.h" | 34 | #include "../krglobal.h" | ||
35 | #include "../krpreviews.h" | 35 | #include "../krpreviews.h" | ||
36 | #include "../viewactions.h" | 36 | #include "../viewactions.h" | ||
37 | 37 | | |||
38 | // QtCore | 38 | // QtCore | ||
39 | #include <QDebug> | 39 | #include <QDebug> | ||
40 | #include <QDir> | 40 | #include <QDir> | ||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
97 | void KrViewOperator::startDrag() | 97 | void KrViewOperator::startDrag() | ||
98 | { | 98 | { | ||
99 | QStringList items; | 99 | QStringList items; | ||
100 | _view->getSelectedItems(&items); | 100 | _view->getSelectedItems(&items); | ||
101 | if (items.empty()) | 101 | if (items.empty()) | ||
102 | return ; // don't drag an empty thing | 102 | return ; // don't drag an empty thing | ||
103 | QPixmap px; | 103 | QPixmap px; | ||
104 | if (items.count() > 1 || _view->getCurrentKrViewItem() == 0) | 104 | if (items.count() > 1 || _view->getCurrentKrViewItem() == 0) | ||
105 | px = FL_LOADICON("queue"); // how much are we dragging | 105 | px = FileListIcon("document-multiple").pixmap(); // we are dragging multiple items | ||
106 | else | 106 | else | ||
107 | px = _view->getCurrentKrViewItem() ->icon(); | 107 | px = _view->getCurrentKrViewItem()->icon(); | ||
108 | emit letsDrag(items, px); | 108 | emit letsDrag(items, px); | ||
109 | } | 109 | } | ||
110 | 110 | | |||
111 | bool KrViewOperator::searchItem(const QString &text, bool caseSensitive, int direction) | 111 | bool KrViewOperator::searchItem(const QString &text, bool caseSensitive, int direction) | ||
112 | { | 112 | { | ||
113 | KrViewItem * item = _view->getCurrentKrViewItem(); | 113 | KrViewItem * item = _view->getCurrentKrViewItem(); | ||
114 | if (!item) { | 114 | if (!item) { | ||
115 | return false; | 115 | return false; | ||
▲ Show 20 Lines • Show All 224 Lines • ▼ Show 20 Line(s) | 320 | { | |||
340 | if(dim) | 340 | if(dim) | ||
341 | cacheName.append("DIM_"); | 341 | cacheName.append("DIM_"); | ||
342 | cacheName.append(icon_name); | 342 | cacheName.append(icon_name); | ||
343 | 343 | | |||
344 | //QPixmapCache::setCacheLimit( ag.readEntry("Icon Cache Size",_IconCacheSize) ); | 344 | //QPixmapCache::setCacheLimit( ag.readEntry("Icon Cache Size",_IconCacheSize) ); | ||
345 | 345 | | |||
346 | // first try the cache | 346 | // first try the cache | ||
347 | if (!QPixmapCache::find(cacheName, icon)) { | 347 | if (!QPixmapCache::find(cacheName, icon)) { | ||
348 | icon = processIcon(krLoader->loadIcon(icon_name, KIconLoader::Desktop, size), | 348 | icon = processIcon(Icon(icon_name).pixmap(size), | ||
349 | dim, dimColor, dimFactor, fileitem->isSymLink()); | 349 | dim, dimColor, dimFactor, fileitem->isSymLink()); | ||
350 | // insert it into the cache | 350 | // insert it into the cache | ||
351 | QPixmapCache::insert(cacheName, icon); | 351 | QPixmapCache::insert(cacheName, icon); | ||
352 | } | 352 | } | ||
353 | 353 | | |||
354 | return icon; | 354 | return icon; | ||
355 | } | 355 | } | ||
356 | 356 | | |||
▲ Show 20 Lines • Show All 867 Lines • Show Last 20 Lines |