Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/launcherview.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index e15b150..fa46543 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -54,2 +54,7 @@ public: | |||
54 | 54 | ||
55 | enum BusyIndicatorType { | ||
56 | BIT_Normal = 0, | ||
57 | BIT_Blinking | ||
58 | }; | ||
59 | |||
55 | static QMap<QString,BgPixmap*> *bgCache = 0; | 60 | static QMap<QString,BgPixmap*> *bgCache = 0; |
@@ -85,2 +90,4 @@ public: | |||
85 | 90 | ||
91 | void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } | ||
92 | |||
86 | QPixmap* busyPixmap() const { return (QPixmap*)&bpm[::abs(busystate)]; } | 93 | QPixmap* busyPixmap() const { return (QPixmap*)&bpm[::abs(busystate)]; } |
@@ -99,3 +106,2 @@ public: | |||
99 | QIconViewItem *c = on ? currentItem() : 0; | 106 | QIconViewItem *c = on ? currentItem() : 0; |
100 | qDebug ( "set busy %d -> %s", on, c ? c-> text ().latin1() : "(null)" ); | ||
101 | 107 | ||
@@ -138,2 +144,3 @@ public: | |||
138 | } | 144 | } |
145 | if ( busyType == BIT_Blinking ) { | ||
139 | busystate = 0; | 146 | busystate = 0; |
@@ -141,5 +148,8 @@ public: | |||
141 | killTimer ( busytimer ); | 148 | killTimer ( busytimer ); |
142 | timerEvent ( 0 ); | ||
143 | busytimer = startTimer ( 200 ); | 149 | busytimer = startTimer ( 200 ); |
144 | } | 150 | } |
151 | else | ||
152 | busystate = 3; | ||
153 | timerEvent ( 0 ); | ||
154 | } | ||
145 | else { | 155 | else { |
@@ -339,2 +349,3 @@ private: | |||
339 | int busystate; | 349 | int busystate; |
350 | BusyIndicatorType busyType; | ||
340 | }; | 351 | }; |
@@ -915 +926,9 @@ void LauncherView::paletteChange( const QPalette &p ) | |||
915 | 926 | ||
927 | |||
928 | void LauncherView::setBusyIndicatorType ( const QString &type ) | ||
929 | { | ||
930 | if ( type. lower ( ) == "blink" ) | ||
931 | icons-> setBusyIndicatorType ( BIT_Blinking ); | ||
932 | else | ||
933 | icons-> setBusyIndicatorType ( BIT_Normal ); | ||
934 | } | ||