-rw-r--r-- | core/launcher/wait.cpp | 54 |
1 files changed, 30 insertions, 24 deletions
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,65 +1,71 @@ | |||
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> | ||
32 | using 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> |
27 | 36 | ||
28 | Wait *lastWaitObject = NULL; | 37 | Wait *lastWaitObject = NULL; |
29 | 38 | ||
30 | 39 | ||
31 | using namespace Opie::Ui; | 40 | using namespace Opie::Ui; |
32 | Wait::Wait( QWidget *parent ) : QWidget( parent ), | 41 | Wait::Wait( QWidget *parent ) : QWidget( parent ), |
33 | waiting( FALSE ) | 42 | waiting( FALSE ) |
34 | { | 43 | { |
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 ); |
45 | m_centralWait->hide(); | 51 | m_centralWait->hide(); |
46 | hide(); | 52 | hide(); |
47 | } | 53 | } |
48 | 54 | ||
49 | 55 | ||
50 | Wait *Wait::getWaitObject() | 56 | Wait *Wait::getWaitObject() |
51 | { | 57 | { |
52 | return lastWaitObject; | 58 | return lastWaitObject; |
53 | } | 59 | } |
54 | 60 | ||
55 | 61 | ||
56 | void Wait::setWaiting( bool w ) | 62 | void Wait::setWaiting( bool w ) |
57 | { | 63 | { |
58 | Config cfg ( "Launcher" ); | 64 | Config cfg ( "Launcher" ); |
59 | cfg.setGroup("GUI"); | 65 | cfg.setGroup("GUI"); |
60 | 66 | ||
61 | 67 | ||
62 | waiting = w; | 68 | waiting = w; |
63 | if ( w ) { | 69 | if ( w ) { |
64 | if ( cfg. readBoolEntry( "BigBusy" ) ) | 70 | if ( cfg. readBoolEntry( "BigBusy" ) ) |
65 | m_centralWait->show(); | 71 | m_centralWait->show(); |