Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/launcherview.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 72313e3..ff26133 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp @@ -275,8 +275,9 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) } LauncherIconView::~LauncherIconView() { + odebug << "LauncherIconView::~LauncherIconView()" << oendl; #if 0 // debuggery QListIterator<AppLnk> it(hidden); AppLnk* l; while ((l=it.current())) { @@ -428,16 +429,9 @@ LauncherItem*LauncherIconView::findDocItem(const QString&fname) void LauncherIconView::setEyePixmap(const QPixmap&aPixmap,const QString&aFile,int width) { int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); if (s!=width) return; - LauncherItem*item = 0; - QMap<QString,LauncherItem*>::Iterator it; - if ( ( it = m_itemCache.find(aFile))!=m_itemCache.end()) { - item = it.data(); - m_itemCache.remove(it); - } else { - item = findDocItem(aFile); - } + LauncherItem*item = findDocItem(aFile); if (!item||!item->isEyeImage()) return; item->setEyePixmap(aPixmap); } @@ -464,9 +458,8 @@ void LauncherIconView::requestEyePix(const LauncherItem*item) if (!item) return; if (item->isEyeImage()) { checkCallback(); int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); - m_itemCache[item->appLnk()->file()]=(LauncherItem*)item; m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s); } } @@ -475,9 +468,8 @@ void LauncherIconView::stopEyeTimer() if (m_EyeCallBack) { delete m_EyeCallBack; m_EyeCallBack=0; } - m_itemCache.clear(); m_eyeTimer.stop(); } void LauncherIconView::addItem(AppLnk* app, bool resort) @@ -703,19 +695,16 @@ void LauncherView::setToolsEnabled(bool y) { if ( !y != !tools ) { if ( y ) { tools = new QHBox(this); - // Type filter typemb = new QComboBox(tools); QSizePolicy p = typemb->sizePolicy(); p.setHorData(QSizePolicy::Expanding); typemb->setSizePolicy(p); - // Category filter updateTools(); tools->show(); - } else { delete tools; tools = 0; } @@ -725,10 +714,11 @@ void LauncherView::setToolsEnabled(bool y) void LauncherView::updateTools() { disconnect( typemb, SIGNAL(activated(int)), this, SLOT(showType(int)) ); - if ( catmb ) disconnect( catmb, SIGNAL(signalSelected(int)), - this, SLOT(showCategory(int)) ); + if ( catmb ) { + disconnect( catmb, SIGNAL(signalSelected(int)),this,SLOT(showCategory(int))); + } // ### I want to remove this icons->updateCategoriesAndMimeTypes(); @@ -760,10 +750,11 @@ void LauncherView::updateTools() typemb->setCurrentItem(i); break; } } - if ( prev.isNull() ) + if ( prev.isNull() ) { typemb->setCurrentItem(typemb->count()-1); + } int pcat = catmb ? catmb->currentCategory() : -2; if ( !catmb ) catmb = new CategorySelect(tools); @@ -807,8 +798,9 @@ void LauncherView::showCategory( int c ) } void LauncherView::setViewMode( ViewMode m ) { + odebug << "LauncherView::setViewMode( ViewMode m )" << oendl; if ( vmode != m ) { bool bigIcons = m == Icon; icons->viewport()->setUpdatesEnabled( FALSE ); icons->setBigIcons( bigIcons ); @@ -1045,8 +1037,9 @@ void LauncherView::itemPressed( int btn, QIconViewItem *item ) } void LauncherView::removeAllItems() { + odebug << "LauncherView::removeAllItems()" << oendl; icons->clear(); } bool LauncherView::removeLink(const QString& linkfile) @@ -1167,9 +1160,9 @@ void LauncherThumbReceiver::requestThumb(const QString&file,int width,int height rItem.file = file; rItem.width = width; rItem.height = height; m_inThumbNail.append(rItem); - QTimer::singleShot(0, this, SLOT(sendRequest())); + QTimer::singleShot(2, this, SLOT(sendRequest())); } void LauncherThumbReceiver::sendRequest() { |