summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp72
-rw-r--r--core/launcher/firstuse.cpp62
-rw-r--r--core/launcher/launcher.cpp60
-rw-r--r--core/launcher/launcherview.cpp53
-rw-r--r--core/launcher/startmenu.cpp79
-rw-r--r--core/launcher/syncdialog.cpp59
-rw-r--r--core/launcher/taskbar.cpp52
-rw-r--r--core/launcher/wait.cpp54
8 files changed, 260 insertions, 231 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index b8bf4e0..fd385d6 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -1,22 +1,30 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3 =. (C) 2000-2002 Trolltech AS
4** This file is part of the Qtopia Environment. 4 .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
5** 5           .>+-=
6** This file may be distributed and/or modified under the terms of the 6 _;:,     .>    :=|. This program is free software; you can
7** GNU General Public License version 2 as published by the Free Software 7.> <`_,   >  .   <= redistribute it and/or modify it under
8** Foundation and appearing in the file LICENSE.GPL included in the 8 :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9** packaging of this file. 9.="- .-=="i,     .._ License as published by the Free Software
10** 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11     ._= =}       :
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12    .%`+i>       _;_.
13** 13    .i_,=:_.      -<s. This program is distributed in the hope that
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15** 15 : ..    .:,     . . . without even the implied warranty of
16** Contact info@trolltech.com if any conditions of this licensing are 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17** not clear to you. 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18** 18..}^=.=       =       ; Library General Public License for more
19**********************************************************************/ 19++=   -.     .`     .: details.
20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
20#include "documentlist.h" 28#include "documentlist.h"
21#include "serverinterface.h" 29#include "serverinterface.h"
22#include "mediadlg.h" 30#include "mediadlg.h"
@@ -24,9 +32,9 @@
24/* OPIE */ 32/* OPIE */
25#include <opie2/oglobal.h> 33#include <opie2/oglobal.h>
26#include <opie2/odebug.h> 34#include <opie2/odebug.h>
35#include <opie2/oresource.h>
27#include <qtopia/config.h> 36#include <qtopia/config.h>
28#include <qtopia/mimetype.h> 37#include <qtopia/mimetype.h>
29#include <qtopia/resource.h>
30#include <qtopia/private/categories.h> 38#include <qtopia/private/categories.h>
31#include <qtopia/qpeapplication.h> 39#include <qtopia/qpeapplication.h>
32#include <qtopia/applnk.h> 40#include <qtopia/applnk.h>
@@ -232,22 +240,19 @@ void DocumentList::reloadAppLnks()
232 QPixmap pm = appLnkSet->typePixmap(*ittypes); 240 QPixmap pm = appLnkSet->typePixmap(*ittypes);
233 QPixmap bgPm = appLnkSet->typeBigPixmap(*ittypes); 241 QPixmap bgPm = appLnkSet->typeBigPixmap(*ittypes);
234 242
235 if (pm.isNull()) { 243 if (pm.isNull())
236 QImage img( Resource::loadImage( "UnknownDocument" ) ); 244 {
237 pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); 245 pm = OResource::loadImage( "UnknownDocument", OResource::SmallIcon );
238 bgPm = img.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() ); 246 bgPm = OResource::loadImage( "UnknownDocument", OResource::BigIcon );
239 } 247 }
240 248
241 //odebug << "adding type " << (*ittypes) << "" << oendl; 249 //FIXME our current launcher expects docs tab to be last
242
243 // ### our current launcher expects docs tab to be last
244 d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm ); 250 d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm );
245 } 251 }
246 prevTypeList.remove(*ittypes); 252 prevTypeList.remove(*ittypes);
247 } 253 }
248 } 254 }
249 for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) { 255 for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) {
250 //odebug << "removing type " << (*ittypes) << "" << oendl;
251 d->serverGui->typeRemoved(*ittypes); 256 d->serverGui->typeRemoved(*ittypes);
252 } 257 }
253 prevTypeList = types; 258 prevTypeList = types;
@@ -357,14 +362,12 @@ void DocumentList::DiffAppLnks()
357 QPixmap pm = appLnkSet2->typePixmap(*ittypes); 362 QPixmap pm = appLnkSet2->typePixmap(*ittypes);
358 QPixmap bgPm = appLnkSet2->typeBigPixmap(*ittypes); 363 QPixmap bgPm = appLnkSet2->typeBigPixmap(*ittypes);
359 364
360 if (pm.isNull()) { 365 if (pm.isNull())
361 QImage img( Resource::loadImage( "UnknownDocument" ) ); 366 {
362 pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); 367 pm = OResource::loadImage( "UnknownDocument", OResource::SmallIcon );
363 bgPm = img.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() ); 368 bgPm = OResource::loadImage( "UnknownDocument", OResource::BigIcon );
364 } 369 }
365 370
366 odebug << "adding type " << (*ittypes) << "" << oendl;
367
368 // ### our current launcher expects docs tab to be last 371 // ### our current launcher expects docs tab to be last
369 d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm ); 372 d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm );
370 } 373 }
@@ -372,7 +375,6 @@ void DocumentList::DiffAppLnks()
372 } 375 }
373 } 376 }
374 for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) { 377 for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) {
375 odebug << "removing type " << (*ittypes) << "" << oendl;
376 d->serverGui->typeRemoved(*ittypes); 378 d->serverGui->typeRemoved(*ittypes);
377 } 379 }
378 prevTypeList = types; 380 prevTypeList = types;
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp
index 8344787..8c02ab0 100644
--- a/core/launcher/firstuse.cpp
+++ b/core/launcher/firstuse.cpp
@@ -1,25 +1,32 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3 =. (C) 2000-2002 Trolltech AS
4** This file is part of the Qtopia Environment. 4 .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
5** 5           .>+-=
6** This file may be distributed and/or modified under the terms of the 6 _;:,     .>    :=|. This program is free software; you can
7** GNU General Public License version 2 as published by the Free Software 7.> <`_,   >  .   <= redistribute it and/or modify it under
8** Foundation and appearing in the file LICENSE.GPL included in the 8 :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9** packaging of this file. 9.="- .-=="i,     .._ License as published by the Free Software
10** 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11     ._= =}       :
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12    .%`+i>       _;_.
13** 13    .i_,=:_.      -<s. This program is distributed in the hope that
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15** 15 : ..    .:,     . . . without even the implied warranty of
16** Contact info@trolltech.com if any conditions of this licensing are 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17** not clear to you. 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18** 18..}^=.=       =       ; Library General Public License for more
19**********************************************************************/ 19++=   -.     .`     .: details.
20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
20 28
21// I need access to some things you don't normally get access to. 29// I need access to some things you don't normally get access to.
22
23#ifndef _MSC_VER 30#ifndef _MSC_VER
24 //### revise to allow removal of translators under MSVC 31 //### revise to allow removal of translators under MSVC
25#define private public 32#define private public
@@ -34,7 +41,7 @@
34 41
35/* OPIE */ 42/* OPIE */
36#include <opie2/odebug.h> 43#include <opie2/odebug.h>
37#include <qtopia/resource.h> 44#include <opie2/oresource.h>
38#include <qtopia/qcopenvelope_qws.h> 45#include <qtopia/qcopenvelope_qws.h>
39#include <qtopia/config.h> 46#include <qtopia/config.h>
40#include <qtopia/fontmanager.h> 47#include <qtopia/fontmanager.h>
@@ -241,12 +248,10 @@ void FirstUse::nextDialog()
241 Config config( "qpe" ); 248 Config config( "qpe" );
242 config.setGroup( "Startup" ); 249 config.setGroup( "Startup" );
243 config.writeEntry( "FirstUse", FALSE ); 250 config.writeEntry( "FirstUse", FALSE );
244 QPixmap pix = Resource::loadPixmap("bigwait"); 251 QLabel *lblWait = new QLabel("Please Wait...", 0, "wait hack!", // No tr
245 QLabel *lblWait = new QLabel(0, "wait hack!", // No tr
246 QWidget::WStyle_Customize | QWidget::WDestructiveClose | 252 QWidget::WStyle_Customize | QWidget::WDestructiveClose |
247 QWidget::WStyle_NoBorder | QWidget::WStyle_Tool | 253 QWidget::WStyle_NoBorder | QWidget::WStyle_Tool |
248 QWidget::WStyle_StaysOnTop); 254 QWidget::WStyle_StaysOnTop);
249 lblWait->setPixmap( pix );
250 lblWait->setAlignment( QWidget::AlignCenter ); 255 lblWait->setAlignment( QWidget::AlignCenter );
251 lblWait->setGeometry( qApp->desktop()->geometry() ); 256 lblWait->setGeometry( qApp->desktop()->geometry() );
252 lblWait->show(); 257 lblWait->show();
@@ -430,15 +435,8 @@ void FirstUse::reloadLanguages()
430void FirstUse::paintEvent( QPaintEvent * ) 435void FirstUse::paintEvent( QPaintEvent * )
431{ 436{
432 QPainter p( this ); 437 QPainter p( this );
433
434 p.drawPixmap(0,0, splash); 438 p.drawPixmap(0,0, splash);
435 439
436 QFont f = p.font();
437 f.setPointSize(15);
438 f.setItalic(FALSE);
439 f.setBold(FALSE);
440 p.setFont(f);
441
442 if ( currApp < 0 ) { 440 if ( currApp < 0 ) {
443 drawText(p, tr( "Tap anywhere on the screen to continue." )); 441 drawText(p, tr( "Tap anywhere on the screen to continue." ));
444 } else if ( settingsTable[currApp].app ) { 442 } else if ( settingsTable[currApp].app ) {
@@ -451,7 +449,7 @@ void FirstUse::paintEvent( QPaintEvent * )
451 449
452void FirstUse::loadPixmaps() 450void FirstUse::loadPixmaps()
453{ 451{
454 splash.convertFromImage( Resource::loadImage("launcher/firstuse") 452 splash.convertFromImage( OResource::loadImage("launcher/firstuse", OResource::NoScale )
455 .smoothScale( width(), height() ) ); 453 .smoothScale( width(), height() ) );
456 454
457 setBackgroundPixmap(splash); 455 setBackgroundPixmap(splash);
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 4ec5f4c..361a159 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -1,37 +1,45 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3 =. (C) 2000-2002 Trolltech AS
4** This file is part of the Qtopia Environment. 4 .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
5** 5           .>+-=
6** This file may be distributed and/or modified under the terms of the 6 _;:,     .>    :=|. This program is free software; you can
7** GNU General Public License version 2 as published by the Free Software 7.> <`_,   >  .   <= redistribute it and/or modify it under
8** Foundation and appearing in the file LICENSE.GPL included in the 8 :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9** packaging of this file. 9.="- .-=="i,     .._ License as published by the Free Software
10** 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11     ._= =}       :
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12    .%`+i>       _;_.
13** 13    .i_,=:_.      -<s. This program is distributed in the hope that
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15** 15 : ..    .:,     . . . without even the implied warranty of
16** Contact info@trolltech.com if any conditions of this licensing are 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17** not clear to you. 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18** 18..}^=.=       =       ; Library General Public License for more
19**********************************************************************/ 19++=   -.     .`     .: details.
20 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
21#include "startmenu.h" 28#include "startmenu.h"
22#include "taskbar.h" 29#include "taskbar.h"
23#include "serverinterface.h" 30#include "serverinterface.h"
24#include "launcherview.h" 31#include "launcherview.h"
25#include "launcher.h" 32#include "launcher.h"
26#include "server.h" 33#include "server.h"
27
28/* OPIE */ 34/* OPIE */
29#include <opie2/odebug.h> 35#include <opie2/odebug.h>
36#include <opie2/oresource.h>
37using namespace Opie::Core;
38
30#include <qtopia/global.h> 39#include <qtopia/global.h>
31#ifdef Q_WS_QWS 40#ifdef Q_WS_QWS
32#include <qtopia/qcopenvelope_qws.h> 41#include <qtopia/qcopenvelope_qws.h>
33#endif 42#endif
34#include <qtopia/resource.h>
35#include <qtopia/applnk.h> 43#include <qtopia/applnk.h>
36#include <qtopia/config.h> 44#include <qtopia/config.h>
37#include <qtopia/qpeapplication.h> 45#include <qtopia/qpeapplication.h>
@@ -121,9 +129,8 @@ void LauncherTabWidget::createDocLoadingWidget()
121 QWidget *space1 = new QWidget( docLoadingVBox ); 129 QWidget *space1 = new QWidget( docLoadingVBox );
122 docLoadingVBox->setStretchFactor( space1, 1 ); 130 docLoadingVBox->setStretchFactor( space1, 1 );
123 131
124 QLabel *waitPixmap = new QLabel( docLoadingVBox ); 132 QLabel *waitPixmap = new QLabel( "Please Wait...", docLoadingVBox );
125 waitPixmap->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, waitPixmap->sizePolicy().hasHeightForWidth() ) ); 133 waitPixmap->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, waitPixmap->sizePolicy().hasHeightForWidth() ) );
126 waitPixmap->setPixmap( Resource::loadPixmap( "bigwait" ) );
127 waitPixmap->setAlignment( int( QLabel::AlignCenter ) ); 134 waitPixmap->setAlignment( int( QLabel::AlignCenter ) );
128 135
129 Config cfg( "Launcher" ); 136 Config cfg( "Launcher" );
@@ -529,11 +536,8 @@ void Launcher::createGUI()
529#endif 536#endif
530 537
531 // all documents 538 // all documents
532 QImage img( Resource::loadImage( "DocsIcon" ) ); 539 QPixmap pm = OResource::loadPixmap( "DocsIcon", OResource::SmallIcon );
533 QPixmap pm;
534 pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
535 // It could add this itself if it handles docs 540 // It could add this itself if it handles docs
536
537 tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE ); 541 tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE );
538 542
539 QTimer::singleShot( 0, tabs, SLOT( initLayout() ) ); 543 QTimer::singleShot( 0, tabs, SLOT( initLayout() ) );
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index d960908..6275fcb 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -1,33 +1,40 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3 =. (C) 2000-2002 Trolltech AS
4** This file is part of the Qtopia Environment. 4 .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
5** 5           .>+-=
6** This file may be distributed and/or modified under the terms of the 6 _;:,     .>    :=|. This program is free software; you can
7** GNU General Public License version 2 as published by the Free Software 7.> <`_,   >  .   <= redistribute it and/or modify it under
8** Foundation and appearing in the file LICENSE.GPL included in the 8 :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9** packaging of this file. 9.="- .-=="i,     .._ License as published by the Free Software
10** 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11     ._= =}       :
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12    .%`+i>       _;_.
13** 13    .i_,=:_.      -<s. This program is distributed in the hope that
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15** 15 : ..    .:,     . . . without even the implied warranty of
16** Contact info@trolltech.com if any conditions of this licensing are 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17** not clear to you. 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18** 18..}^=.=       =       ; Library General Public License for more
19**********************************************************************/ 19++=   -.     .`     .: details.
20 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
21#include "launcherview.h" 28#include "launcherview.h"
22 29
23/* OPIE */ 30/* OPIE */
24#include <opie2/odebug.h> 31#include <opie2/odebug.h>
32#include <opie2/oresource.h>
25#include <qpe/config.h> 33#include <qpe/config.h>
26#include <qtopia/qpeapplication.h> 34#include <qtopia/qpeapplication.h>
27#include <qtopia/private/categories.h> 35#include <qtopia/private/categories.h>
28#include <qtopia/categoryselect.h> 36#include <qtopia/categoryselect.h>
29#include <qtopia/mimetype.h> 37#include <qtopia/mimetype.h>
30#include <qtopia/resource.h>
31using namespace Opie::Core; 38using namespace Opie::Core;
32 39
33#include <qpe/qcopenvelope_qws.h> 40#include <qpe/qcopenvelope_qws.h>
@@ -426,7 +433,7 @@ void LauncherIconView::setBusy(bool on)
426#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY 433#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
427 if ( busyPix.isNull() ) { 434 if ( busyPix.isNull() ) {
428 int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); 435 int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize();
429 busyPix.convertFromImage( Resource::loadImage( "busy" ).smoothScale( size * 16, size ) ); 436 busyPix.convertFromImage( OResource::loadImage( "busy", OResource::NoScale ).smoothScale( size * 16, size ) );
430 } 437 }
431#endif 438#endif
432 439
@@ -1001,7 +1008,7 @@ void LauncherView::setBackgroundType( BackgroundType t, const QString &val )
1001 QString imgFile = bgName; 1008 QString imgFile = bgName;
1002 bool tile = FALSE; 1009 bool tile = FALSE;
1003 if ( imgFile[0]!='/' || !QFile::exists(imgFile) ) { 1010 if ( imgFile[0]!='/' || !QFile::exists(imgFile) ) {
1004 imgFile = Resource::findPixmap( imgFile ); 1011 imgFile = OResource::findPixmap( imgFile );
1005 tile = TRUE; 1012 tile = TRUE;
1006 } 1013 }
1007 QImage img = loadBackgroundImage(imgFile); 1014 QImage img = loadBackgroundImage(imgFile);
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp
index ce7840e..24a9d7e 100644
--- a/core/launcher/startmenu.cpp
+++ b/core/launcher/startmenu.cpp
@@ -1,23 +1,30 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3 =. (C) 2000-2002 Trolltech AS
4** This file is part of the Qtopia Environment. 4 .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
5** 5           .>+-=
6** This file may be distributed and/or modified under the terms of the 6 _;:,     .>    :=|. This program is free software; you can
7** GNU General Public License version 2 as published by the Free Software 7.> <`_,   >  .   <= redistribute it and/or modify it under
8** Foundation and appearing in the file LICENSE.GPL included in the 8 :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9** packaging of this file. 9.="- .-=="i,     .._ License as published by the Free Software
10** 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11     ._= =}       :
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12    .%`+i>       _;_.
13** 13    .i_,=:_.      -<s. This program is distributed in the hope that
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15** 15 : ..    .:,     . . . without even the implied warranty of
16** Contact info@trolltech.com if any conditions of this licensing are 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17** not clear to you. 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18** 18..}^=.=       =       ; Library General Public License for more
19**********************************************************************/ 19++=   -.     .`     .: details.
20 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
21// TODO. During startup 28// TODO. During startup
22// Launcher::typeAdded 29// Launcher::typeAdded
23// is called for each new tab and calls then each time the refresh of startmenu 30// is called for each new tab and calls then each time the refresh of startmenu
@@ -27,17 +34,14 @@
27 34
28#include "startmenu.h" 35#include "startmenu.h"
29 36
37/* OPIE */
38#include <opie2/oresource.h>
39using namespace Opie::Core;
30#include <qtopia/qpeapplication.h> 40#include <qtopia/qpeapplication.h>
31#include <qtopia/config.h> 41#include <qtopia/config.h>
32#include <qtopia/resource.h>
33#include <qtopia/mimetype.h> 42#include <qtopia/mimetype.h>
34#include <qtopia/qlibrary.h> 43#include <qtopia/qlibrary.h>
35 44
36//#include <qpainter.h>
37
38//#include <stdlib.h>
39
40
41#define APPLNK_ID_OFFSET 250 45#define APPLNK_ID_OFFSET 250
42#define NO_ID -1 46#define NO_ID -1
43 47
@@ -61,7 +65,7 @@ StartMenu::StartMenu(QWidget *parent) : QLabel( parent )
61 65
62 int sz = AppLnk::smallIconSize()+3; 66 int sz = AppLnk::smallIconSize()+3;
63 QPixmap pm; 67 QPixmap pm;
64 pm.convertFromImage(Resource::loadImage( startButtonPixmap).smoothScale( sz,sz) ); 68 pm.convertFromImage(OResource::loadImage( startButtonPixmap, OResource::NoScale ).smoothScale( sz,sz) );
65 setPixmap(pm); 69 setPixmap(pm);
66 setFocusPolicy( NoFocus ); 70 setFocusPolicy( NoFocus );
67 71
@@ -145,13 +149,7 @@ void StartMenu::createAppEntry( QPopupMenu *menu, QDir dir, QString file )
145 menu->insertSeparator(); 149 menu->insertSeparator();
146 delete applnk; 150 delete applnk;
147 } else { 151 } else {
148 QPixmap test; 152 QPixmap pixmap = OResource::loadPixmap( applnk->icon(), OResource::SmallIcon );
149 QImage img = Resource::loadImage( applnk->icon() );
150 if(!img.isNull() )
151 test.convertFromImage(
152 img.smoothScale(
153 AppLnk::smallIconSize(), AppLnk::smallIconSize() ), 0 );
154
155 // Insert items ordered lexically 153 // Insert items ordered lexically
156 int current, left = 0, right = currentItem; 154 int current, left = 0, right = currentItem;
157 while( left != right ) { 155 while( left != right ) {
@@ -161,8 +159,8 @@ void StartMenu::createAppEntry( QPopupMenu *menu, QDir dir, QString file )
161 else 159 else
162 right = current; 160 right = current;
163 } 161 }
164 162
165 menu->insertItem( test, applnk->name(), 163 menu->insertItem( pixmap, applnk->name(),
166 currentItem + APPLNK_ID_OFFSET, current ); 164 currentItem + APPLNK_ID_OFFSET, current );
167 appLnks.insert( currentItem + APPLNK_ID_OFFSET, applnk ); 165 appLnks.insert( currentItem + APPLNK_ID_OFFSET, applnk );
168 currentItem++; 166 currentItem++;
@@ -194,21 +192,18 @@ void StartMenu::createDirEntry( QPopupMenu *menu, QDir dir, QString file, bool l
194 192
195 // checks were ok 193 // checks were ok
196 194
197 QPixmap test; 195 QPixmap pixmap = OResource::loadPixmap( icon, OResource::SmallIcon );
198 test.convertFromImage( Resource::loadImage( icon ).smoothScale(
199 AppLnk::smallIconSize(), AppLnk::smallIconSize() ), 0 );
200
201 if ( useWidePopupMenu ) { 196 if ( useWidePopupMenu ) {
202 // generate submenu 197 // generate submenu
203 QPopupMenu *submenu = new QPopupMenu( menu ); 198 QPopupMenu *submenu = new QPopupMenu( menu );
204 connect( submenu, SIGNAL(activated(int)), SLOT(itemSelected(int)) ); 199 connect( submenu, SIGNAL(activated(int)), SLOT(itemSelected(int)) );
205 menu->insertItem( test, name, submenu, NO_ID ); 200 menu->insertItem( pixmap, name, submenu, NO_ID );
206 201
207 // ltabs is true cause else we wouldn't stuck around.. 202 // ltabs is true cause else we wouldn't stuck around..
208 createMenuEntries( submenu, subdir, true, lot ); 203 createMenuEntries( submenu, subdir, true, lot );
209 } else { 204 } else {
210 // no submenus - just bring corresponding tab to front 205 // no submenus - just bring corresponding tab to front
211 menu->insertItem( test, name, currentItem ); 206 menu->insertItem( pixmap, name, currentItem );
212 tabNames.insert( currentItem, new QString( file ) ); 207 tabNames.insert( currentItem, new QString( file ) );
213 currentItem++; 208 currentItem++;
214 } 209 }
diff --git a/core/launcher/syncdialog.cpp b/core/launcher/syncdialog.cpp
index 4a2b8ff..d90b2ea 100644
--- a/core/launcher/syncdialog.cpp
+++ b/core/launcher/syncdialog.cpp
@@ -1,33 +1,42 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3 =. (C) 2000-2002 Trolltech AS
4** This file is part of the Qtopia Environment. 4 .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
5** 5           .>+-=
6** This file may be distributed and/or modified under the terms of the 6 _;:,     .>    :=|. This program is free software; you can
7** GNU General Public License version 2 as published by the Free Software 7.> <`_,   >  .   <= redistribute it and/or modify it under
8** Foundation and appearing in the file LICENSE.GPL included in the 8 :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9** packaging of this file. 9.="- .-=="i,     .._ License as published by the Free Software
10** 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11     ._= =}       :
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12    .%`+i>       _;_.
13** 13    .i_,=:_.      -<s. This program is distributed in the hope that
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15** 15 : ..    .:,     . . . without even the implied warranty of
16** Contact info@trolltech.com if any conditions of this licensing are 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17** not clear to you. 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18** 18..}^=.=       =       ; Library General Public License for more
19**********************************************************************/ 19++=   -.     .`     .: details.
20 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
21#include "syncdialog.h" 28#include "syncdialog.h"
22 29
23#include <qtopia/resource.h> 30/* OPIE */
31#include <opie2/oresource.h>
32using namespace Opie::Core;
24 33
34/* QT */
25#include <qpainter.h> 35#include <qpainter.h>
26#include <qapplication.h> 36#include <qapplication.h>
27#include <qpushbutton.h> 37#include <qpushbutton.h>
28#include <qfile.h> 38#include <qfile.h>
29 39
30
31SyncDialog::SyncDialog( QWidget *parent, const QString &w ) 40SyncDialog::SyncDialog( QWidget *parent, const QString &w )
32 : QDialog( parent, "SyncDialog", FALSE, WStyle_Tool | WStyle_Customize | 41 : QDialog( parent, "SyncDialog", FALSE, WStyle_Tool | WStyle_Customize |
33 WStyle_StaysOnTop ), what(w), nextPt(0), rev(FALSE), hideDot(TRUE) 42 WStyle_StaysOnTop ), what(w), nextPt(0), rev(FALSE), hideDot(TRUE)
@@ -40,12 +49,12 @@ SyncDialog::SyncDialog( QWidget *parent, const QString &w )
40 49
41 QSize ds = qApp->desktop()->size(); 50 QSize ds = qApp->desktop()->size();
42 setGeometry( 0, 0, ds.width(), ds.height() ); 51 setGeometry( 0, 0, ds.width(), ds.height() );
43 img = Resource::loadImage( "SyncScreen" ); 52 img = OResource::loadImage( "SyncScreen", OResource::NoScale );
44 if ( img.width() > ds.width() || img.height() > ds.height() ) { 53 if ( img.width() > ds.width() || img.height() > ds.height() ) {
45 path = scalePath( path, ds.width(), img.width(), ds.height(), img.height() ); 54 path = scalePath( path, ds.width(), img.width(), ds.height(), img.height() );
46 img = img.smoothScale( ds.width(), ds.height() ); 55 img = img.smoothScale( ds.width(), ds.height() );
47 } 56 }
48 dot = Resource::loadImage( "syncdot" ); 57 dot = OResource::loadImage( "syncdot", OResource::NoScale );
49 setBackgroundColor( white ); 58 setBackgroundColor( white );
50 59
51 QPushButton *pb = new QPushButton( tr("Abort"), this, "CancelSync" ); 60 QPushButton *pb = new QPushButton( tr("Abort"), this, "CancelSync" );
@@ -118,7 +127,7 @@ void SyncDialog::timerEvent( QTimerEvent * )
118 127
119void SyncDialog::loadPath() 128void SyncDialog::loadPath()
120{ 129{
121 QString pfile = Resource::findPixmap( "syncdot" ); 130 QString pfile = OResource::findPixmap( "syncdot" );
122 if ( pfile.isEmpty() ) 131 if ( pfile.isEmpty() )
123 return; 132 return;
124 int dp = pfile.findRev('.'); 133 int dp = pfile.findRev('.');
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 7cbfe13..1356c77 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -1,23 +1,30 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3 =. (C) 2000-2002 Trolltech AS
4** This file is part of the Qtopia Environment. 4 .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
5** 5           .>+-=
6** This file may be distributed and/or modified under the terms of the 6 _;:,     .>    :=|. This program is free software; you can
7** GNU General Public License version 2 as published by the Free Software 7.> <`_,   >  .   <= redistribute it and/or modify it under
8** Foundation and appearing in the file LICENSE.GPL included in the 8 :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9** packaging of this file. 9.="- .-=="i,     .._ License as published by the Free Software
10** 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11     ._= =}       :
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12    .%`+i>       _;_.
13** 13    .i_,=:_.      -<s. This program is distributed in the hope that
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15** 15 : ..    .:,     . . . without even the implied warranty of
16** Contact info@trolltech.com if any conditions of this licensing are 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17** not clear to you. 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18** 18..}^=.=       =       ; Library General Public License for more
19**********************************************************************/ 19++=   -.     .`     .: details.
20 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
21#include "startmenu.h" 28#include "startmenu.h"
22#include "inputmethods.h" 29#include "inputmethods.h"
23#include "runningappbar.h" 30#include "runningappbar.h"
@@ -30,6 +37,7 @@
30 37
31/* OPIE */ 38/* OPIE */
32#include <opie2/odebug.h> 39#include <opie2/odebug.h>
40#include <opie2/oresource.h>
33#include <qtopia/config.h> 41#include <qtopia/config.h>
34#include <qtopia/qpeapplication.h> 42#include <qtopia/qpeapplication.h>
35#ifdef QWS 43#ifdef QWS
@@ -138,8 +146,8 @@ public:
138 QWidget(parent), 146 QWidget(parent),
139 nl(initNumLock()), cl(FALSE) 147 nl(initNumLock()), cl(FALSE)
140 { 148 {
141 nl_pm = Resource::loadPixmap("numlock"); 149 nl_pm = OResource::loadPixmap("numlock", OResource::NoScale);
142 cl_pm = Resource::loadPixmap("capslock"); 150 cl_pm = OResource::loadPixmap("capslock", OResource::NoScale);
143 } 151 }
144 QSize sizeHint() const 152 QSize sizeHint() const
145 { 153 {
diff --git a/core/launcher/wait.cpp b/core/launcher/wait.cpp
index 523819d..f872218 100644
--- a/core/launcher/wait.cpp
+++ b/core/launcher/wait.cpp
@@ -1,26 +1,35 @@
1/********************************************************************** 1/*
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2                 This file is part of the Opie Project
3** 3 =. (C) 2000-2002 Trolltech AS
4** This file is part of the Qtopia Environment. 4 .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
5** 5           .>+-=
6** This file may be distributed and/or modified under the terms of the 6 _;:,     .>    :=|. This program is free software; you can
7** GNU General Public License version 2 as published by the Free Software 7.> <`_,   >  .   <= redistribute it and/or modify it under
8** Foundation and appearing in the file LICENSE.GPL included in the 8 :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
9** packaging of this file. 9.="- .-=="i,     .._ License as published by the Free Software
10** 10 - .   .-<_>     .<> Foundation; version 2 of the License.
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11     ._= =}       :
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12    .%`+i>       _;_.
13** 13    .i_,=:_.      -<s. This program is distributed in the hope that
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15** 15 : ..    .:,     . . . without even the implied warranty of
16** Contact info@trolltech.com if any conditions of this licensing are 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17** not clear to you. 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18** 18..}^=.=       =       ; Library General Public License for more
19**********************************************************************/ 19++=   -.     .`     .: details.
20 20 :     =  ...= . :.=-
21 -.   .:....=;==+<; You should have received a copy of the GNU
22  -_. . .   )=.  = Library General Public License along with
23    --        :-=` this library; see the file COPYING.LIB.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
21#include "wait.h" 28#include "wait.h"
22 29
23#include <opie2/owait.h> 30#include <opie2/owait.h>
31#include <opie2/oresource.h>
32using namespace Opie::Core;
24 33
25#include <qtopia/config.h> 34#include <qtopia/config.h>
26#include <qtopia/applnk.h> 35#include <qtopia/applnk.h>
@@ -35,10 +44,7 @@ Wait::Wait( QWidget *parent ) : QWidget( parent ),
35 44
36 QSize size( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); 45 QSize size( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
37 setFixedSize( size ); 46 setFixedSize( size );
38 47 pm = OResource::loadPixmap( "wait", OResource::SmallIcon );
39 QImage img = Resource::loadImage( "wait" );
40 img = img.smoothScale( size.width(), size.height() );
41 pm.convertFromImage( img );
42 48
43 lastWaitObject = this; 49 lastWaitObject = this;
44 m_centralWait = new OWait( 0l ); 50 m_centralWait = new OWait( 0l );