summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp34
-rw-r--r--core/launcher/launcherview.h4
2 files changed, 31 insertions, 7 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
@@ -112,4 +112,6 @@ private:
};
+static bool s_IgnoreNextPix = false;
+
LauncherItem::LauncherItem( QIconView *parent, AppLnk *applnk, bool bigIcon )
: QIconViewItem( parent, applnk->name(),
@@ -142,5 +144,5 @@ LauncherItem::~LauncherItem()
QPixmap*LauncherItem::pixmap()const
{
- if (m_EyeImage && m_EyeImageSet == BASE_ICON) {
+ if (m_EyeImage && m_EyeImageSet == BASE_ICON && s_IgnoreNextPix==false) {
LauncherIconView* liv = (LauncherIconView*)iconView();
liv->requestEyePix(this);
@@ -295,5 +297,5 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name )
Config config( "Launcher" );
config.setGroup( "GUI" );
- setStaticBackgroundPicture( config.readBoolEntry( "StaticBackground", true ) );
+ setStaticBackgroundPicture( config.readBoolEntry( "StaticBackground", true ) );
}
@@ -311,4 +313,18 @@ LauncherIconView::~LauncherIconView()
}
+void LauncherIconView::unsetPalette()
+{
+ s_IgnoreNextPix = true;
+ QIconView::unsetPalette();
+ s_IgnoreNextPix = false;
+}
+
+void LauncherIconView::setPalette(const QPalette & palette)
+{
+ s_IgnoreNextPix = true;
+ QIconView::setPalette(palette);
+ s_IgnoreNextPix = false;
+}
+
void LauncherIconView::setStaticBackgroundPicture( bool enable )
{
@@ -323,6 +339,6 @@ void LauncherIconView::setStaticBackgroundPicture( bool enable )
setStaticBackground( false );
verticalScrollBar()->setTracking( true );
- }
-}
+ }
+}
int LauncherIconView::compare(const AppLnk* a, const AppLnk* b)
@@ -487,6 +503,6 @@ void LauncherIconView::checkCallback()
connect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)),
this,SLOT(setEyePixmap(const QPixmap&,const QString&,int)));
+ m_eyeTimer.changeInterval(600000);
}
- m_eyeTimer.changeInterval(600000);
}
@@ -1209,6 +1225,8 @@ QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) {
LauncherThumbReceiver::LauncherThumbReceiver()
- :QObject()
+ :QObject(),requestTimer(this)
{
+
+ connect(&requestTimer,SIGNAL(timeout()),SLOT(sendRequest()));
QCopChannel * chan = new QCopChannel( "QPE/opie-eye",this );
connect(chan, SIGNAL(received(const QCString&,const QByteArray&)),
@@ -1248,5 +1266,7 @@ void LauncherThumbReceiver::requestThumb(const QString&file,int width,int height
rItem.height = height;
m_inThumbNail.append(rItem);
- QTimer::singleShot(2, this, SLOT(sendRequest()));
+ if (!requestTimer.isActive()) {
+ requestTimer.start(100,true);
+ }
}
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
@@ -154,4 +154,5 @@ signals:
protected:
+ QTimer requestTimer;
PixmapInfos m_inThumbNail;
};
@@ -215,4 +216,7 @@ public:
static QMap<QString,QPixmap>* sm_EyeCache;
+ virtual void setPalette(const QPalette & palette);
+ virtual void unsetPalette();
+
protected:
virtual void timerEvent( QTimerEvent *te );