author | alwin <alwin> | 2005-03-12 02:13:52 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-12 02:13:52 (UTC) |
commit | cd1b9f7c11c73ef0df0ce66c53466c979a3a4d42 (patch) (unidiff) | |
tree | d4ed9b082abe2aa645fbd58b86d65f5ce9c48348 | |
parent | 84af289057291a49a52a60b390bc5320c02b5a55 (diff) | |
download | opie-cd1b9f7c11c73ef0df0ce66c53466c979a3a4d42.zip opie-cd1b9f7c11c73ef0df0ce66c53466c979a3a4d42.tar.gz opie-cd1b9f7c11c73ef0df0ce66c53466c979a3a4d42.tar.bz2 |
And I'm wondering why opie sometimes is that slow. Hopefully reduced
the calls to opie-eye for images in documenttab when changing layout
and so on.
-rw-r--r-- | core/launcher/launcherview.cpp | 28 | ||||
-rw-r--r-- | core/launcher/launcherview.h | 4 |
2 files changed, 28 insertions, 4 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index a4c7561..d960908 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -113,2 +113,4 @@ private: | |||
113 | 113 | ||
114 | static bool s_IgnoreNextPix = false; | ||
115 | |||
114 | LauncherItem::LauncherItem( QIconView *parent, AppLnk *applnk, bool bigIcon ) | 116 | LauncherItem::LauncherItem( QIconView *parent, AppLnk *applnk, bool bigIcon ) |
@@ -143,3 +145,3 @@ QPixmap*LauncherItem::pixmap()const | |||
143 | { | 145 | { |
144 | if (m_EyeImage && m_EyeImageSet == BASE_ICON) { | 146 | if (m_EyeImage && m_EyeImageSet == BASE_ICON && s_IgnoreNextPix==false) { |
145 | LauncherIconView* liv = (LauncherIconView*)iconView(); | 147 | LauncherIconView* liv = (LauncherIconView*)iconView(); |
@@ -312,2 +314,16 @@ LauncherIconView::~LauncherIconView() | |||
312 | 314 | ||
315 | void LauncherIconView::unsetPalette() | ||
316 | { | ||
317 | s_IgnoreNextPix = true; | ||
318 | QIconView::unsetPalette(); | ||
319 | s_IgnoreNextPix = false; | ||
320 | } | ||
321 | |||
322 | void LauncherIconView::setPalette(const QPalette & palette) | ||
323 | { | ||
324 | s_IgnoreNextPix = true; | ||
325 | QIconView::setPalette(palette); | ||
326 | s_IgnoreNextPix = false; | ||
327 | } | ||
328 | |||
313 | void LauncherIconView::setStaticBackgroundPicture( bool enable ) | 329 | void LauncherIconView::setStaticBackgroundPicture( bool enable ) |
@@ -488,5 +504,5 @@ void LauncherIconView::checkCallback() | |||
488 | this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); | 504 | this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); |
489 | } | ||
490 | m_eyeTimer.changeInterval(600000); | 505 | m_eyeTimer.changeInterval(600000); |
491 | } | 506 | } |
507 | } | ||
492 | 508 | ||
@@ -1210,4 +1226,6 @@ QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { | |||
1210 | LauncherThumbReceiver::LauncherThumbReceiver() | 1226 | LauncherThumbReceiver::LauncherThumbReceiver() |
1211 | :QObject() | 1227 | :QObject(),requestTimer(this) |
1212 | { | 1228 | { |
1229 | |||
1230 | connect(&requestTimer,SIGNAL(timeout()),SLOT(sendRequest())); | ||
1213 | QCopChannel * chan = new QCopChannel( "QPE/opie-eye",this ); | 1231 | QCopChannel * chan = new QCopChannel( "QPE/opie-eye",this ); |
@@ -1249,3 +1267,5 @@ void LauncherThumbReceiver::requestThumb(const QString&file,int width,int height | |||
1249 | m_inThumbNail.append(rItem); | 1267 | m_inThumbNail.append(rItem); |
1250 | QTimer::singleShot(2, this, SLOT(sendRequest())); | 1268 | if (!requestTimer.isActive()) { |
1269 | requestTimer.start(100,true); | ||
1270 | } | ||
1251 | } | 1271 | } |
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h index 6a2d197..792c6d1 100644 --- a/core/launcher/launcherview.h +++ b/core/launcher/launcherview.h | |||
@@ -155,2 +155,3 @@ signals: | |||
155 | protected: | 155 | protected: |
156 | QTimer requestTimer; | ||
156 | PixmapInfos m_inThumbNail; | 157 | PixmapInfos m_inThumbNail; |
@@ -216,2 +217,5 @@ public: | |||
216 | 217 | ||
218 | virtual void setPalette(const QPalette & palette); | ||
219 | virtual void unsetPalette(); | ||
220 | |||
217 | protected: | 221 | protected: |