summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-02-17 14:26:43 (UTC)
committer mickeyl <mickeyl>2005-02-17 14:26:43 (UTC)
commitfaaa7b79330fe3c5647182fafdb2bb584dc70638 (patch) (unidiff)
treeffa63faf248cf20f363b80b579855b124d34032f
parent766ac02e5586cd67b75b320fe1abee513384860c (diff)
downloadopie-faaa7b79330fe3c5647182fafdb2bb584dc70638.zip
opie-faaa7b79330fe3c5647182fafdb2bb584dc70638.tar.gz
opie-faaa7b79330fe3c5647182fafdb2bb584dc70638.tar.bz2
The response to the static background pixmap was overwhelmingly positive, hence:
* fix static background pixmap also for tiled pixmaps * make it customizable via LauncherSettings * enable it per default
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog2
-rw-r--r--core/launcher/launcher.cpp8
-rw-r--r--core/launcher/launcherview.cpp28
-rw-r--r--core/launcher/launcherview.h3
-rw-r--r--core/settings/launcher/tabssettings.cpp13
-rw-r--r--core/settings/launcher/tabssettings.h2
6 files changed, 43 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index fe763a5..8ac976d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,28 +1,30 @@
1 2005-??-??Opie 1.2.0 1 2005-??-??Opie 1.2.0
2 2
3 New Features 3 New Features
4 ------------ 4 ------------
5 * Launcher: Support a static background pixmap (mickeyl)
6 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
5 7
6 Fixed Bugs 8 Fixed Bugs
7 ---------- 9 ----------
8 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 10 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
9 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 11 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
10 * #1482 - Fix double '/' in paths (zecke) 12 * #1482 - Fix double '/' in paths (zecke)
11 * #1536 - Autosave of custom locations in opie backup (ar) 13 * #1536 - Autosave of custom locations in opie backup (ar)
12 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 14 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
13 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 15 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
14 * #1542 - Fix Todo crash when priority < 1 or > 5 (drw) 16 * #1542 - Fix Todo crash when priority < 1 or > 5 (drw)
15 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 17 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
16 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 18 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
17 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 19 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
18 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 20 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
19 21
20 Internal 22 Internal
21 -------- 23 --------
22 * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 24 * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
23 * Killed the need for weak symbols in QtE (zecke) 25 * Killed the need for weak symbols in QtE (zecke)
24 26
25 2005-02-03Opie 1.1.9 27 2005-02-03Opie 1.1.9
26 28
27 New Features 29 New Features
28 ------------ 30 ------------
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 4255b44..4ec5f4c 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -435,48 +435,56 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &
435 stream >> italic; 435 stream >> italic;
436 if ( view(id) ) { 436 if ( view(id) ) {
437 if ( !fam.isEmpty() ) { 437 if ( !fam.isEmpty() ) {
438 view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); 438 view(id)->setViewFont( QFont(fam, size, weight, italic!=0) );
439 odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; 439 odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl;
440 } else { 440 } else {
441 view(id)->clearViewFont(); 441 view(id)->clearViewFont();
442 } 442 }
443 } 443 }
444 }else if ( msg == "setBusyIndicatorType(QString)" ) { 444 }else if ( msg == "setBusyIndicatorType(QString)" ) {
445 QString type; 445 QString type;
446 stream >> type; 446 stream >> type;
447 setBusyIndicatorType( type ); 447 setBusyIndicatorType( type );
448 }else if ( msg == "home()" ) { 448 }else if ( msg == "home()" ) {
449 if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) { 449 if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) {
450 if (categoryBar) 450 if (categoryBar)
451 categoryBar->nextTab(); 451 categoryBar->nextTab();
452 }else { 452 }else {
453 static_cast<QWidget*>(parent())->raise(); 453 static_cast<QWidget*>(parent())->raise();
454 } 454 }
455 } else if (msg=="doctabEnabled(int)") { 455 } else if (msg=="doctabEnabled(int)") {
456 int id; stream >> id; 456 int id; stream >> id;
457 odebug << "Doctab enabled " << id << oendl; 457 odebug << "Doctab enabled " << id << oendl;
458 reCheckDoctab(id); 458 reCheckDoctab(id);
459 } else if ( msg == "setStaticBackground(bool)" ) {
460 int set; stream >> set;
461 odebug << "setStaticBackground " << set << oendl;
462 for (int i = 0; i < categoryBar->count(); i++ )
463 {
464 LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view;
465 view->iconView()->setStaticBackgroundPicture( set );
466 }
459 } 467 }
460} 468}
461 469
462void LauncherTabWidget::reCheckDoctab(int how) 470void LauncherTabWidget::reCheckDoctab(int how)
463{ 471{
464 if ((bool)how == docTabEnabled) { 472 if ((bool)how == docTabEnabled) {
465 /* nothing to do */ 473 /* nothing to do */
466 return; 474 return;
467 } 475 }
468 if (docLoadingWidget) { 476 if (docLoadingWidget) {
469 stack->removeWidget(docLoadingWidget); 477 stack->removeWidget(docLoadingWidget);
470 delete docLoadingWidget; 478 delete docLoadingWidget;
471 docLoadingWidget = 0; 479 docLoadingWidget = 0;
472 } 480 }
473 createDocLoadingWidget(); 481 createDocLoadingWidget();
474 { 482 {
475 QCopEnvelope( "QPE/System", "reforceDocuments()" ); 483 QCopEnvelope( "QPE/System", "reforceDocuments()" );
476 odebug << "Sending doc rescan" << oendl; 484 odebug << "Sending doc rescan" << oendl;
477 } 485 }
478} 486}
479 487
480//--------------------------------------------------------------------------- 488//---------------------------------------------------------------------------
481 489
482Launcher::Launcher() 490Launcher::Launcher()
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index e7229ee..a4c7561 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -273,69 +273,79 @@ void LauncherItem::setEyePixmap(const QPixmap&aIcon)
273{ 273{
274 if (!isEyeImage()) return; 274 if (!isEyeImage()) return;
275 setPixmap(aIcon); 275 setPixmap(aIcon);
276 m_EyeImageSet = EYE_ICON; 276 m_EyeImageSet = EYE_ICON;
277} 277}
278 278
279//=========================================================================== 279//===========================================================================
280// Implemantation of LauncherIconview start 280// Implemantation of LauncherIconview start
281//=========================================================================== 281//===========================================================================
282 282
283QMap<QString,QPixmap>* LauncherIconView::sm_EyeCache=0; 283QMap<QString,QPixmap>* LauncherIconView::sm_EyeCache=0;
284 284
285LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) 285LauncherIconView::LauncherIconView( QWidget* parent, const char* name )
286 : QIconView(parent,name),tf(""),cf(0),bsy(0),busyTimer(0),bigIcns(TRUE),bgColor(white),numColumns(0) 286 : QIconView(parent,name),tf(""),cf(0),bsy(0),busyTimer(0),bigIcns(TRUE),bgColor(white),numColumns(0)
287{ 287{
288 m_EyeCallBack = 0; 288 m_EyeCallBack = 0;
289 if (!sm_EyeCache) sm_EyeCache = new QMap<QString,QPixmap>(); 289 if (!sm_EyeCache) sm_EyeCache = new QMap<QString,QPixmap>();
290 sortmeth = Name; 290 sortmeth = Name;
291 hidden.setAutoDelete(TRUE); 291 hidden.setAutoDelete(TRUE);
292 ike = FALSE; 292 ike = FALSE;
293 calculateGrid( Bottom ); 293 calculateGrid( Bottom );
294 connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer())); 294 connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer()));
295 Config config( "Launcher" ); 295 Config config( "Launcher" );
296 config.setGroup( "GUI" ); 296 config.setGroup( "GUI" );
297 staticBackground = config.readEntry( "StaticBackground", false ); 297 setStaticBackgroundPicture( config.readBoolEntry( "StaticBackground", true ) );
298 if ( staticBackground )
299 {
300 setStaticBackground( true );
301 verticalScrollBar()->setTracking( false );
302 }
303} 298}
304 299
305LauncherIconView::~LauncherIconView() 300LauncherIconView::~LauncherIconView()
306{ 301{
307 odebug << "LauncherIconView::~LauncherIconView()" << oendl; 302 odebug << "LauncherIconView::~LauncherIconView()" << oendl;
308#if 0 // debuggery 303#if 0 // debuggery
309 QListIterator<AppLnk> it(hidden); 304 QListIterator<AppLnk> it(hidden);
310 AppLnk* l; 305 AppLnk* l;
311 while ((l=it.current())) { 306 while ((l=it.current())) {
312 ++it; 307 ++it;
313 //odebug << "" << l << ": hidden (should remove)" << oendl; 308 //odebug << "" << l << ": hidden (should remove)" << oendl;
314 } 309 }
315#endif 310#endif
316} 311}
317 312
313void LauncherIconView::setStaticBackgroundPicture( bool enable )
314{
315 staticBackground = enable;
316 if ( staticBackground )
317 {
318 setStaticBackground( true );
319 verticalScrollBar()->setTracking( false );
320 }
321 else
322 {
323 setStaticBackground( false );
324 verticalScrollBar()->setTracking( true );
325 }
326}
327
318int LauncherIconView::compare(const AppLnk* a, const AppLnk* b) 328int LauncherIconView::compare(const AppLnk* a, const AppLnk* b)
319{ 329{
320 switch (sortmeth) { 330 switch (sortmeth) {
321 case Name: 331 case Name:
322 return a->name().lower().compare(b->name().lower()); 332 return a->name().lower().compare(b->name().lower());
323 case Date: { 333 case Date: {
324 QFileInfo fa(a->linkFileKnown() ? a->linkFile() : a->file()); 334 QFileInfo fa(a->linkFileKnown() ? a->linkFile() : a->file());
325 QFileInfo fb(b->linkFileKnown() ? b->linkFile() : b->file()); 335 QFileInfo fb(b->linkFileKnown() ? b->linkFile() : b->file());
326 return fa.lastModified().secsTo(fb.lastModified()); 336 return fa.lastModified().secsTo(fb.lastModified());
327 } 337 }
328 case Type: 338 case Type:
329 return a->type().compare(b->type()); 339 return a->type().compare(b->type());
330 } 340 }
331 return 0; 341 return 0;
332} 342}
333 343
334void LauncherIconView::setSortMethod( SortMethod m ) 344void LauncherIconView::setSortMethod( SortMethod m )
335{ 345{
336 if ( sortmeth != m ) { 346 if ( sortmeth != m ) {
337 sortmeth = m; 347 sortmeth = m;
338 sort(); 348 sort();
339 } 349 }
340} 350}
341 351
@@ -349,54 +359,54 @@ void LauncherIconView::setCategoryFilter( int catfilter, bool resort )
349} 359}
350 360
351void LauncherIconView::setTypeFilter(const QString& typefilter, bool resort) 361void LauncherIconView::setTypeFilter(const QString& typefilter, bool resort)
352{ 362{
353 tf = QRegExp(typefilter,FALSE,TRUE); 363 tf = QRegExp(typefilter,FALSE,TRUE);
354 hideOrShowItems(resort); 364 hideOrShowItems(resort);
355} 365}
356 366
357void LauncherIconView::setItemTextPos( ItemTextPos pos ) 367void LauncherIconView::setItemTextPos( ItemTextPos pos )
358{ 368{
359 calculateGrid( pos ); 369 calculateGrid( pos );
360 QIconView::setItemTextPos( pos ); 370 QIconView::setItemTextPos( pos );
361} 371}
362 372
363void LauncherIconView::drawBackground( QPainter *p, const QRect &r ) 373void LauncherIconView::drawBackground( QPainter *p, const QRect &r )
364{ 374{
365 if ( bgPixmap.isNull() ) 375 if ( bgPixmap.isNull() )
366 { 376 {
367 p->fillRect( r, bgColor ); 377 p->fillRect( r, bgColor );
368 } 378 }
369 else 379 else
370 { 380 {
371 if ( staticBackground ) 381 if ( staticBackground )
372 { 382 {
373 p->drawPixmap( r.x(), r.y(), bgPixmap, r.x(), r.y(), r.width(), r.height() ); 383 p->drawTiledPixmap( r, bgPixmap, QPoint( r.x() % bgPixmap.width(), r.y() % bgPixmap.height() ) );
374 } 384 }
375 else 385 else
376 { 386 {
377 p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(), 387 p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(),
378 (r.y() + contentsY()) % bgPixmap.height() ) ); 388 (r.y() + contentsY()) % bgPixmap.height() ) );
379 } 389 }
380 } 390 }
381} 391}
382 392
383void LauncherIconView::addCatsAndMimes(AppLnk* app) 393void LauncherIconView::addCatsAndMimes(AppLnk* app)
384{ 394{
385 // QStringList c = app->categories(); 395 // QStringList c = app->categories();
386 // for (QStringList::ConstIterator cit=c.begin(); cit!=c.end(); ++cit) { 396 // for (QStringList::ConstIterator cit=c.begin(); cit!=c.end(); ++cit) {
387 // cats.replace(*cit,(void*)1); 397 // cats.replace(*cit,(void*)1);
388 // } 398 // }
389 QString maj=app->type(); 399 QString maj=app->type();
390 int sl=maj.find('/'); 400 int sl=maj.find('/');
391 if (sl>=0) { 401 if (sl>=0) {
392 QString k; 402 QString k;
393 k = maj.left(12) == "application/" ? maj : maj.left(sl); 403 k = maj.left(12) == "application/" ? maj : maj.left(sl);
394 mimes.replace(k,(void*)1); 404 mimes.replace(k,(void*)1);
395 } 405 }
396} 406}
397 407
398void LauncherIconView::setBusy(bool on) 408void LauncherIconView::setBusy(bool on)
399{ 409{
400#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 410#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
401 if ( busyPix.isNull() ) { 411 if ( busyPix.isNull() ) {
402 int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); 412 int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize();
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h
index 97b1dea..6a2d197 100644
--- a/core/launcher/launcherview.h
+++ b/core/launcher/launcherview.h
@@ -61,50 +61,50 @@ public:
61 void setUpdatesEnabled(bool); 61 void setUpdatesEnabled(bool);
62 void sort(); 62 void sort();
63 63
64 void setToolsEnabled(bool); 64 void setToolsEnabled(bool);
65 void updateTools(); 65 void updateTools();
66 66
67 void setBusy(bool); 67 void setBusy(bool);
68 void setBusyIndicatorType( const QString& ); 68 void setBusyIndicatorType( const QString& );
69 69
70 enum ViewMode { Icon, List }; 70 enum ViewMode { Icon, List };
71 void setViewMode( ViewMode m ); 71 void setViewMode( ViewMode m );
72 ViewMode viewMode() const { return vmode; } 72 ViewMode viewMode() const { return vmode; }
73 73
74 enum BackgroundType { Ruled, SolidColor, Image }; 74 enum BackgroundType { Ruled, SolidColor, Image };
75 void setBackgroundType( BackgroundType t, const QString & ); 75 void setBackgroundType( BackgroundType t, const QString & );
76 BackgroundType backgroundType() const { return bgType; } 76 BackgroundType backgroundType() const { return bgType; }
77 77
78 void setTextColor( const QColor & ); 78 void setTextColor( const QColor & );
79 QColor textColor() const { return textCol; } 79 QColor textColor() const { return textCol; }
80 80
81 void setViewFont( const QFont & ); 81 void setViewFont( const QFont & );
82 void clearViewFont(); 82 void clearViewFont();
83 83
84 void setColNumber( int ); 84 void setColNumber( int );
85
86 void relayout(void); 85 void relayout(void);
86 LauncherIconView* iconView() { return icons; };
87 87
88signals: 88signals:
89 void clicked( const AppLnk * ); 89 void clicked( const AppLnk * );
90 void rightPressed( AppLnk * ); 90 void rightPressed( AppLnk * );
91 91
92protected slots: 92protected slots:
93 void selectionChanged(); 93 void selectionChanged();
94 void returnPressed( QIconViewItem *item ); 94 void returnPressed( QIconViewItem *item );
95 void itemClicked( int, QIconViewItem * ); 95 void itemClicked( int, QIconViewItem * );
96 void itemPressed( int, QIconViewItem * ); 96 void itemPressed( int, QIconViewItem * );
97 void sortBy(int); 97 void sortBy(int);
98 void showType(int); 98 void showType(int);
99 void showCategory( int ); 99 void showCategory( int );
100 void resizeEvent(QResizeEvent *); 100 void resizeEvent(QResizeEvent *);
101 void flushBgCache(); 101 void flushBgCache();
102 102
103protected: 103protected:
104 void paletteChange( const QPalette & ); 104 void paletteChange( const QPalette & );
105 105
106 void fontChanged(const QFont &); 106 void fontChanged(const QFont &);
107 107
108private: 108private:
109 static bool bsy; 109 static bool bsy;
110 QWidget* tools; 110 QWidget* tools;
@@ -148,48 +148,49 @@ public slots:
148 void recieve( const QCString&, const QByteArray& ); 148 void recieve( const QCString&, const QByteArray& );
149protected slots: 149protected slots:
150 virtual void sendRequest(); 150 virtual void sendRequest();
151 151
152signals: 152signals:
153 void sig_Thumbnail(const QPixmap&,const QString&,int); 153 void sig_Thumbnail(const QPixmap&,const QString&,int);
154 154
155protected: 155protected:
156 PixmapInfos m_inThumbNail; 156 PixmapInfos m_inThumbNail;
157}; 157};
158 158
159class LauncherIconView : public QIconView { 159class LauncherIconView : public QIconView {
160 Q_OBJECT 160 Q_OBJECT
161public: 161public:
162 LauncherIconView( QWidget* parent, const char* name=0 ); 162 LauncherIconView( QWidget* parent, const char* name=0 );
163 ~LauncherIconView(); 163 ~LauncherIconView();
164 QIconViewItem* busyItem() const; 164 QIconViewItem* busyItem() const;
165 165
166#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 166#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
167 QPixmap busyPixmap() const { return busyPix; } 167 QPixmap busyPixmap() const { return busyPix; }
168#endif 168#endif
169 void setBigIcons( bool bi ); 169 void setBigIcons( bool bi );
170 void updateCategoriesAndMimeTypes(); 170 void updateCategoriesAndMimeTypes();
171 void setBusyIndicatorType ( BusyIndicatorType t ); 171 void setBusyIndicatorType ( BusyIndicatorType t );
172 void setStaticBackgroundPicture( bool enable );
172 void doAutoScroll() 173 void doAutoScroll()
173 { 174 {
174 // We don't want rubberbanding (yet) 175 // We don't want rubberbanding (yet)
175 } 176 }
176 177
177 void setBusy(bool on); 178 void setBusy(bool on);
178 bool inKeyEvent() const { return ike; } 179 bool inKeyEvent() const { return ike; }
179 180
180 void addItem(AppLnk* app, bool resort=TRUE); 181 void addItem(AppLnk* app, bool resort=TRUE);
181 bool removeLink(const QString& linkfile,bool removeCache = true); 182 bool removeLink(const QString& linkfile,bool removeCache = true);
182 void changeItem(const AppLnk&old,AppLnk*nlink); 183 void changeItem(const AppLnk&old,AppLnk*nlink);
183 184
184 QStringList mimeTypes() const; 185 QStringList mimeTypes() const;
185 QStringList categories() const; 186 QStringList categories() const;
186 void clear(); 187 void clear();
187 void addCatsAndMimes(AppLnk* app); 188 void addCatsAndMimes(AppLnk* app);
188 189
189 void setBackgroundOrigin( QWidget::BackgroundOrigin ) {} 190 void setBackgroundOrigin( QWidget::BackgroundOrigin ) {}
190 191
191 void setBackgroundPixmap( const QPixmap &pm ) { 192 void setBackgroundPixmap( const QPixmap &pm ) {
192 bgPixmap = pm; 193 bgPixmap = pm;
193 } 194 }
194 195
195 void setBackgroundColor( const QColor &c ) { 196 void setBackgroundColor( const QColor &c ) {
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 42f0568..fca6b20 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -62,87 +62,92 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
62 lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 ); 62 lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 );
63 63
64 QWhatsThis::add ( m_list, tr( "foobar" )); 64 QWhatsThis::add ( m_list, tr( "foobar" ));
65 65
66 QPushButton *p1, *p2, *p3; 66 QPushButton *p1, *p2, *p3;
67 p1 = new QPushButton ( tr( "New" ), this ); 67 p1 = new QPushButton ( tr( "New" ), this );
68 lay-> addWidget ( p1, 1, 1 ); 68 lay-> addWidget ( p1, 1, 1 );
69 connect ( p1, SIGNAL( clicked()), this, SLOT( newClicked())); 69 connect ( p1, SIGNAL( clicked()), this, SLOT( newClicked()));
70 70
71 p2 = new QPushButton ( tr( "Edit" ), this ); 71 p2 = new QPushButton ( tr( "Edit" ), this );
72 lay-> addWidget ( p2, 2, 1 ); 72 lay-> addWidget ( p2, 2, 1 );
73 connect ( p2, SIGNAL( clicked()), this, SLOT( editClicked())); 73 connect ( p2, SIGNAL( clicked()), this, SLOT( editClicked()));
74 74
75 p3 = new QPushButton ( tr( "Delete" ), this ); 75 p3 = new QPushButton ( tr( "Delete" ), this );
76 lay-> addWidget ( p3, 3, 1 ); 76 lay-> addWidget ( p3, 3, 1 );
77 connect ( p3, SIGNAL( clicked()), this, SLOT( deleteClicked())); 77 connect ( p3, SIGNAL( clicked()), this, SLOT( deleteClicked()));
78 78
79 lay-> setRowStretch ( 4, 10 ); 79 lay-> setRowStretch ( 4, 10 );
80 80
81 m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this ); 81 m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this );
82 lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 ); 82 lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 );
83 83
84 m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this ); 84 m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this );
85 lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); 85 lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 );
86
87 m_staticbackground = new QCheckBox( tr( "Enable static background pixmap" ), this );
88 lay->addMultiCellWidget( m_staticbackground, 7, 7, 0, 1 );
86 89
87 p1-> setEnabled ( false ); 90 p1-> setEnabled ( false );
88 p3-> setEnabled ( false ); 91 p3-> setEnabled ( false );
89 92
90 init ( ); 93 init ( );
91 94
92 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); 95 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." ));
93 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 96 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
94 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); 97 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." ));
95 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 98 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
96 QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." )); 99 QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." ));
97 QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); 100 QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." ));
101 QWhatsThis::add ( m_staticbackground, tr( "Activate this, if you want the background pixmap not to scroll with the icons." ));
98} 102}
99 103
100void TabsSettings::init ( ) 104void TabsSettings::init ( )
101{ 105{
102 AppLnkSet rootFolder( MimeType::appsFolderName ( )); 106 AppLnkSet rootFolder( MimeType::appsFolderName ( ));
103 QStringList types = rootFolder. types ( ); 107 QStringList types = rootFolder. types ( );
104 108
105 m_list-> insertItem ( tr( "All Tabs" )); 109 m_list-> insertItem ( tr( "All Tabs" ));
106 m_ids << GLOBALID; 110 m_ids << GLOBALID;
107 111
108 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { 112 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
109 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); 113 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it ));
110 m_ids << *it; 114 m_ids << *it;
111 } 115 }
112 QImage img ( Resource::loadImage ( "DocsIcon" )); 116 QImage img ( Resource::loadImage ( "DocsIcon" ));
113 QPixmap pix; 117 QPixmap pix;
114 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); 118 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( ));
115 m_list-> insertItem ( pix, tr( "Documents" )); 119 m_list-> insertItem ( pix, tr( "Documents" ));
116 m_ids += "Documents"; // No tr 120 m_ids += "Documents"; // No tr
117 121
118 Config cfg ( "Launcher" ); 122 Config cfg ( "Launcher" );
119 123
120 readTabSettings ( cfg ); 124 readTabSettings ( cfg );
121 125
122 cfg. setGroup ( "GUI" ); 126 cfg. setGroup ( "GUI" );
123 m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" ); 127 m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" );
124 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); 128 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) );
129 m_staticbackground->setChecked( cfg.readBoolEntry( "StaticBackground", true ) );
125} 130}
126 131
127 132
128void TabsSettings::readTabSettings ( Config &cfg ) 133void TabsSettings::readTabSettings ( Config &cfg )
129{ 134{
130 QString grp ( "Tab %1" ); // No tr 135 QString grp ( "Tab %1" ); // No tr
131 m_tabs. clear ( ); 136 m_tabs. clear ( );
132 137
133 TabConfig global_def; 138 TabConfig global_def;
134 global_def. m_view = TabConfig::Icon; 139 global_def. m_view = TabConfig::Icon;
135 global_def. m_bg_type = TabConfig::Ruled; 140 global_def. m_bg_type = TabConfig::Ruled;
136 global_def. m_bg_image = "launcher/opie-background"; 141 global_def. m_bg_image = "launcher/opie-background";
137 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); 142 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( );
138 global_def. m_iconcolumns = 0; // automatic 143 global_def. m_iconcolumns = 0; // automatic
139 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); 144 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( );
140 global_def. m_font_use = false; 145 global_def. m_font_use = false;
141 global_def. m_font_family = font ( ). family ( ); 146 global_def. m_font_family = font ( ). family ( );
142 global_def. m_font_size = font ( ). pointSize ( ); 147 global_def. m_font_size = font ( ). pointSize ( );
143 global_def. m_font_weight = 50; 148 global_def. m_font_weight = 50;
144 global_def. m_font_italic = false; 149 global_def. m_font_italic = false;
145 global_def. m_changed = false; 150 global_def. m_changed = false;
146 151
147 Config cfg2 = Config( "Launchersettings" ); 152 Config cfg2 = Config( "Launchersettings" );
148 153
@@ -258,55 +263,59 @@ void TabsSettings::accept ( )
258 case TabConfig::Image: 263 case TabConfig::Image:
259 cfg.writeEntry( "BackgroundType", "Image" ); 264 cfg.writeEntry( "BackgroundType", "Image" );
260 be << *it << tc. m_bg_type << tc. m_bg_image; 265 be << *it << tc. m_bg_type << tc. m_bg_image;
261 break; 266 break;
262 } 267 }
263 268
264 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); 269 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" );
265 te << *it << tc. m_text_color; 270 te << *it << tc. m_text_color;
266 271
267 QCopEnvelope ic( "QPE/Launcher", "setIconColumns(QString,int)" ); 272 QCopEnvelope ic( "QPE/Launcher", "setIconColumns(QString,int)" );
268 ic << *it << tc. m_iconcolumns; 273 ic << *it << tc. m_iconcolumns;
269 274
270 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); 275 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
271 fe << *it; 276 fe << *it;
272 fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); 277 fe << ( tc. m_font_use ? tc. m_font_family : QString::null );
273 fe << tc. m_font_size; 278 fe << tc. m_font_size;
274 fe << tc. m_font_weight; 279 fe << tc. m_font_weight;
275 fe << ( tc. m_font_italic ? 1 : 0 ); 280 fe << ( tc. m_font_italic ? 1 : 0 );
276 281
277 tc. m_changed = false; 282 tc. m_changed = false;
278 } 283 }
279 cfg. setGroup ( "GUI" ); 284 cfg. setGroup ( "GUI" );
280 QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); 285 QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" );
281 cfg. writeEntry ( "BusyType", busytype ); 286 cfg. writeEntry ( "BusyType", busytype );
282 287 cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) );
283 cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); 288 cfg. writeEntry ( "StaticBackground", m_staticbackground->isChecked( ) );
284 289
285 { 290 {
286 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); 291 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
287 e << busytype; 292 e << busytype;
288 } 293 }
294 {
295 QCopEnvelope e ( "QPE/Launcher", "setStaticBackground(bool)" );
296 e << m_staticbackground->isChecked();
297 }
289} 298}
290 299
291void TabsSettings::newClicked ( ) 300void TabsSettings::newClicked ( )
292{ 301{
293 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 302 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
294} 303}
295 304
296void TabsSettings::deleteClicked ( ) 305void TabsSettings::deleteClicked ( )
297{ 306{
298 int ind = m_list-> currentItem ( ); 307 int ind = m_list-> currentItem ( );
299 308
300 if ( ind < 0 ) 309 if ( ind < 0 )
301 return; 310 return;
302 311
303 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 312 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
304} 313}
305 314
306void TabsSettings::editClicked ( ) 315void TabsSettings::editClicked ( )
307{ 316{
308 int ind = m_list-> currentItem ( ); 317 int ind = m_list-> currentItem ( );
309 318
310 if ( ind < 0 ) 319 if ( ind < 0 )
311 return; 320 return;
312 321
diff --git a/core/settings/launcher/tabssettings.h b/core/settings/launcher/tabssettings.h
index 600c65c..bbe1e72 100644
--- a/core/settings/launcher/tabssettings.h
+++ b/core/settings/launcher/tabssettings.h
@@ -38,31 +38,31 @@ class Config;
38 38
39 39
40class TabsSettings : public QWidget { 40class TabsSettings : public QWidget {
41 Q_OBJECT 41 Q_OBJECT
42 42
43public: 43public:
44 TabsSettings ( QWidget *parent = 0, const char *name = 0 ); 44 TabsSettings ( QWidget *parent = 0, const char *name = 0 );
45 45
46 void accept ( ); 46 void accept ( );
47 47
48protected slots: 48protected slots:
49 void newClicked ( ); 49 void newClicked ( );
50 void deleteClicked ( ); 50 void deleteClicked ( );
51 void editClicked ( ); 51 void editClicked ( );
52 52
53protected: 53protected:
54 void init ( ); 54 void init ( );
55 void readTabSettings ( Config & ); 55 void readTabSettings ( Config & );
56 56
57private: 57private:
58 QListBox *m_list; 58 QListBox *m_list;
59 //QString currentTab; 59 //QString currentTab;
60 QStringList m_ids; 60 QStringList m_ids;
61 QMap <QString, TabConfig> m_tabs; 61 QMap <QString, TabConfig> m_tabs;
62 QCheckBox *m_busyani, *m_bigbusy; 62 QCheckBox *m_busyani, *m_bigbusy, *m_staticbackground;
63}; 63};
64 64
65 65
66 66
67 67
68#endif 68#endif