-rw-r--r-- | library/qpedecoration_qws.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp index b6085ef..e041945 100644 --- a/library/qpedecoration_qws.cpp +++ b/library/qpedecoration_qws.cpp | |||
@@ -8,24 +8,25 @@ | |||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #define QTOPIA_INTERNAL_LANGLIST | ||
20 | #include <qapplication.h> | 21 | #include <qapplication.h> |
21 | #include <qstyle.h> | 22 | #include <qstyle.h> |
22 | #include <qwidget.h> | 23 | #include <qwidget.h> |
23 | #include <qpainter.h> | 24 | #include <qpainter.h> |
24 | #include <qtimer.h> | 25 | #include <qtimer.h> |
25 | #include <qwhatsthis.h> | 26 | #include <qwhatsthis.h> |
26 | #include "qcopenvelope_qws.h" | 27 | #include "qcopenvelope_qws.h" |
27 | #include "qpedecoration_qws.h" | 28 | #include "qpedecoration_qws.h" |
28 | #include <qdialog.h> | 29 | #include <qdialog.h> |
29 | #include <qdrawutil.h> | 30 | #include <qdrawutil.h> |
30 | #include <qgfx_qws.h> | 31 | #include <qgfx_qws.h> |
31 | #include "qpeapplication.h" | 32 | #include "qpeapplication.h" |
@@ -235,28 +236,28 @@ public: | |||
235 | bool needsOk() { return (getWState() & WState_Reserved1 ); } | 236 | bool needsOk() { return (getWState() & WState_Reserved1 ); } |
236 | }; | 237 | }; |
237 | 238 | ||
238 | //=========================================================================== | 239 | //=========================================================================== |
239 | 240 | ||
240 | QPEDecoration::QPEDecoration() | 241 | QPEDecoration::QPEDecoration() |
241 | : QWSDefaultDecoration() | 242 | : QWSDefaultDecoration() |
242 | { | 243 | { |
243 | imageOk = Resource::loadImage( "OKButton" ); | 244 | imageOk = Resource::loadImage( "OKButton" ); |
244 | imageClose = Resource::loadImage( "CloseButton" ); | 245 | imageClose = Resource::loadImage( "CloseButton" ); |
245 | imageHelp = Resource::loadImage( "HelpButton" ); | 246 | imageHelp = Resource::loadImage( "HelpButton" ); |
246 | helpFile = QString(qApp->argv()[0]) + ".html"; | 247 | helpFile = QString(qApp->argv()[0]) + ".html"; |
247 | QString lang = getenv( "LANG" ); | 248 | QStringList path = Global::helpPath(); |
248 | helpExists = QFile::exists( QPEApplication::qpeDir() + "/help/" + lang + "/html/" + helpFile ); | 249 | helpExists = FALSE; |
249 | if ( !helpExists ) | 250 | for (QStringList::ConstIterator it=path.begin(); it!=path.end() && !helpExists; ++it) |
250 | helpExists = QFile::exists( QPEApplication::qpeDir() + "/help/en/html/" + helpFile ); | 251 | helpExists = QFile::exists( *it + "/" + helpFile ); |
251 | #ifndef MINIMIZE_HELP_HACK | 252 | #ifndef MINIMIZE_HELP_HACK |
252 | qpeManager = new QPEManager( this ); | 253 | qpeManager = new QPEManager( this ); |
253 | #else | 254 | #else |
254 | qpeManager = 0; | 255 | qpeManager = 0; |
255 | #endif | 256 | #endif |
256 | } | 257 | } |
257 | 258 | ||
258 | QPEDecoration::~QPEDecoration() | 259 | QPEDecoration::~QPEDecoration() |
259 | { | 260 | { |
260 | delete qpeManager; | 261 | delete qpeManager; |
261 | } | 262 | } |
262 | 263 | ||