summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-11-30 18:04:13 (UTC)
committer harlekin <harlekin>2003-11-30 18:04:13 (UTC)
commitf40b049e2345a9b008ea2bdc241062302bd7ca04 (patch) (side-by-side diff)
tree82ba2d954605de18ef063315b62f04f434ce43cb
parenta7e786be4f9545a881015de8ba8a124a62f0f891 (diff)
downloadopie-f40b049e2345a9b008ea2bdc241062302bd7ca04.zip
opie-f40b049e2345a9b008ea2bdc241062302bd7ca04.tar.gz
opie-f40b049e2345a9b008ea2bdc241062302bd7ca04.tar.bz2
make the busy indicator launcher settings also work in head
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp32
-rw-r--r--core/launcher/launcherview.h9
2 files changed, 29 insertions, 12 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 85163b6..62c678d 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -64,6 +64,2 @@ public:
-enum BusyIndicatorType {
- BIT_Normal = 0,
- BIT_Blinking
-};
@@ -99,2 +95,4 @@ public:
void paintItem( QPainter *p, const QColorGroup &cg );
+
+ void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; }
protected:
@@ -105,2 +103,3 @@ private:
void paintAnimatedIcon( QPainter *p );
+ BusyIndicatorType busyType;
};
@@ -149,4 +148,4 @@ public:
void updateCategoriesAndMimeTypes();
-
- void doAutoScroll()
+ void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; }
+ void doAutoScroll()
{
@@ -178,6 +177,9 @@ public:
bsy = c;
- if ( oldBusy )
+ if ( oldBusy ) {
oldBusy->resetIcon();
- if ( bsy )
+ }
+ if ( bsy ) {
+ bsy->setBusyIndicatorType( busyType ) ;
bsy->animateIcon();
+ }
}
@@ -365,2 +367,3 @@ private:
#endif
+ BusyIndicatorType busyType;
};
@@ -376,3 +379,6 @@ void LauncherView::setBusy(bool on)
void LauncherView::setBusyIndicatorType( const QString& type ) {
- /* ### FIXME */
+ if ( type. lower ( ) == "animated" )
+ icons->setBusyIndicatorType( BIT_Animated ) ;
+ else
+ icons->setBusyIndicatorType( BIT_Normal ) ;
}
@@ -422,2 +428,4 @@ void LauncherItem::paintItem( QPainter *p, const QColorGroup &cg )
+
+
void LauncherItem::paintAnimatedIcon( QPainter *p )
@@ -442,4 +450,6 @@ void LauncherItem::paintAnimatedIcon( QPainter *p )
#ifdef BOUNCE_BUSY_ICON
- bounceY = 4 - ((iteration+2)%8);
- bounceY = bounceY < 0 ? -bounceY : bounceY;
+ if ( busyType == BIT_Animated ) {
+ bounceY = 4 - ((iteration+2)%8);
+ bounceY = bounceY < 0 ? -bounceY : bounceY;
+ }
#endif
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h
index 7863d6a..e40a006 100644
--- a/core/launcher/launcherview.h
+++ b/core/launcher/launcherview.h
@@ -36,2 +36,9 @@ class QComboBox;
+
+
+enum BusyIndicatorType {
+ BIT_Normal = 0,
+ BIT_Animated
+};
+
class LauncherView : public QVBox
@@ -108,3 +115,3 @@ private:
QImage loadBackgroundImage(QString &fname);
- int m_busyType;
+
};