author | alwin <alwin> | 2004-11-09 20:19:53 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-09 20:19:53 (UTC) |
commit | c7b97ac140de31282dba2463a00f434c7a5bba69 (patch) (side-by-side diff) | |
tree | 3be0a497f30d2265359e99dbc0951ab0b594e865 | |
parent | 439b89dbda8afb2deeb0461dcd249a3e80131825 (diff) | |
download | opie-c7b97ac140de31282dba2463a00f434c7a5bba69.zip opie-c7b97ac140de31282dba2463a00f434c7a5bba69.tar.gz opie-c7b97ac140de31282dba2463a00f434c7a5bba69.tar.bz2 |
- removed code which let qpe crash when generating image icons
- when edit properties of an document item it will reread the table of categories
-rw-r--r-- | core/launcher/launcher.cpp | 4 | ||||
-rw-r--r-- | core/launcher/launcherview.cpp | 27 | ||||
-rw-r--r-- | core/launcher/launcherview.h | 1 |
3 files changed, 13 insertions, 19 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 010a2e9..5ec1cf8 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -603,7 +603,9 @@ void Launcher::properties( AppLnk *appLnk ) /* ### libqtopia FIXME also moving docLnks... */ LnkProperties prop(appLnk,0 ); - QPEApplication::execDialog( &prop ); + if (QPEApplication::execDialog( &prop )==QDialog::Accepted && tabs->currentView()==tabs->docView()) { + tabs->docView()->updateTools(); + } } } 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 @@ -276,6 +276,7 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) LauncherIconView::~LauncherIconView() { + odebug << "LauncherIconView::~LauncherIconView()" << oendl; #if 0 // debuggery QListIterator<AppLnk> it(hidden); AppLnk* l; @@ -429,14 +430,7 @@ void LauncherIconView::setEyePixmap(const QPixmap&aPixmap,const QString&aFile,in { 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); } @@ -465,7 +459,6 @@ void LauncherIconView::requestEyePix(const LauncherItem*item) 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); } } @@ -476,7 +469,6 @@ void LauncherIconView::stopEyeTimer() delete m_EyeCallBack; m_EyeCallBack=0; } - m_itemCache.clear(); m_eyeTimer.stop(); } @@ -704,17 +696,14 @@ 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; @@ -726,8 +715,9 @@ 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(); @@ -761,8 +751,9 @@ void LauncherView::updateTools() break; } } - if ( prev.isNull() ) + if ( prev.isNull() ) { typemb->setCurrentItem(typemb->count()-1); + } int pcat = catmb ? catmb->currentCategory() : -2; if ( !catmb ) @@ -808,6 +799,7 @@ 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 ); @@ -1046,6 +1038,7 @@ void LauncherView::itemPressed( int btn, QIconViewItem *item ) void LauncherView::removeAllItems() { + odebug << "LauncherView::removeAllItems()" << oendl; icons->clear(); } @@ -1168,7 +1161,7 @@ void LauncherThumbReceiver::requestThumb(const QString&file,int width,int height 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() diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h index 94c367c..6d94539 100644 --- a/core/launcher/launcherview.h +++ b/core/launcher/launcherview.h @@ -240,7 +240,6 @@ private: #endif BusyIndicatorType busyType; QTimer m_eyeTimer; - QMap<QString,LauncherItem*> m_itemCache; }; #endif // LAUNCHERVIEW_H |