author | kergoth <kergoth> | 2002-02-04 22:14:18 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-02-04 22:14:18 (UTC) |
commit | d46cb220a09b41312d86bb33573940d3dcba2588 (patch) (unidiff) | |
tree | 6aacb1589d5de2ca908d067f99ba64dc608a6fa5 /library | |
parent | 500e2f0cdbe82035516b7a1c576e08e0b2ad72b3 (diff) | |
download | opie-d46cb220a09b41312d86bb33573940d3dcba2588.zip opie-d46cb220a09b41312d86bb33573940d3dcba2588.tar.gz opie-d46cb220a09b41312d86bb33573940d3dcba2588.tar.bz2 |
latest qtopia merge as of 20020204.
-rw-r--r-- | library/global.cpp | 55 | ||||
-rw-r--r-- | library/qpeapplication.cpp | 40 |
2 files changed, 60 insertions, 35 deletions
diff --git a/library/global.cpp b/library/global.cpp index fd7579a..dd15eb7 100644 --- a/library/global.cpp +++ b/library/global.cpp | |||
@@ -1,43 +1,44 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
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 <qpe/qpedebug.h> | 21 | #include <qpe/qpedebug.h> |
21 | #include <qpe/global.h> | 22 | #include <qpe/global.h> |
22 | #include <qpe/qdawg.h> | 23 | #include <qpe/qdawg.h> |
23 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
24 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
25 | #include <qpe/storage.h> | 26 | #include <qpe/storage.h> |
26 | #include <qpe/applnk.h> | 27 | #include <qpe/applnk.h> |
27 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 28 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
28 | #include "qpe/qcopenvelope_qws.h" | 29 | #include "qpe/qcopenvelope_qws.h" |
29 | #endif | 30 | #endif |
30 | 31 | ||
31 | #include <qfile.h> | 32 | #include <qfile.h> |
32 | #include <qlabel.h> | 33 | #include <qlabel.h> |
33 | #include <qtimer.h> | 34 | #include <qtimer.h> |
34 | #include <qmap.h> | 35 | #include <qmap.h> |
35 | #include <qdict.h> | 36 | #include <qdict.h> |
36 | #include <qdir.h> | 37 | #include <qdir.h> |
37 | #include <qmessagebox.h> | 38 | #include <qmessagebox.h> |
38 | #include <qregexp.h> | 39 | #include <qregexp.h> |
39 | 40 | ||
40 | #include <stdlib.h> | 41 | #include <stdlib.h> |
41 | #include <sys/stat.h> | 42 | #include <sys/stat.h> |
42 | #include <sys/wait.h> | 43 | #include <sys/wait.h> |
43 | #include <sys/types.h> | 44 | #include <sys/types.h> |
@@ -149,54 +150,60 @@ static QString dictDir() | |||
149 | \brief The Global class collects application-wide global functions. | 150 | \brief The Global class collects application-wide global functions. |
150 | */ | 151 | */ |
151 | 152 | ||
152 | /*! | 153 | /*! |
153 | \internal | 154 | \internal |
154 | */ | 155 | */ |
155 | Global::Global() | 156 | Global::Global() |
156 | { | 157 | { |
157 | } | 158 | } |
158 | 159 | ||
159 | /*! | 160 | /*! |
160 | Returns the unchangeable QDawg that contains general | 161 | Returns the unchangeable QDawg that contains general |
161 | words for the current locale. | 162 | words for the current locale. |
162 | 163 | ||
163 | \sa addedDawg() | 164 | \sa addedDawg() |
164 | */ | 165 | */ |
165 | const QDawg& Global::fixedDawg() | 166 | const QDawg& Global::fixedDawg() |
166 | { | 167 | { |
167 | if ( !fixed_dawg ) { | 168 | if ( !fixed_dawg ) { |
168 | if ( !docDirCreated ) | 169 | if ( !docDirCreated ) |
169 | createDocDir(); | 170 | createDocDir(); |
170 | 171 | ||
171 | fixed_dawg = new QDawg; | 172 | fixed_dawg = new QDawg; |
172 | QString dawgfilename = dictDir() + "/dawg"; | 173 | QString dawgfilename = dictDir() + "/dawg"; |
173 | QString lang = getenv( "LANG" ); | 174 | QString words_lang; |
174 | QString dawgfilename_lang = dawgfilename + "." + lang; | 175 | QStringList langs = Global::languageList(); |
175 | QString words_lang = dictDir() + "/words." + lang; | 176 | for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { |
176 | if ( QFile::exists(dawgfilename_lang) || | 177 | QString lang = *it; |
177 | QFile::exists(words_lang) ) | 178 | words_lang = dictDir() + "/words." + lang; |
178 | dawgfilename = dawgfilename_lang; | 179 | QString dawgfilename_lang = dawgfilename + "." + lang; |
180 | if ( QFile::exists(dawgfilename_lang) || | ||
181 | QFile::exists(words_lang) ) { | ||
182 | dawgfilename = dawgfilename_lang; | ||
183 | break; | ||
184 | } | ||
185 | } | ||
179 | QFile dawgfile(dawgfilename); | 186 | QFile dawgfile(dawgfilename); |
180 | 187 | ||
181 | if ( !dawgfile.exists() ) { | 188 | if ( !dawgfile.exists() ) { |
182 | QString fn = dictDir() + "/words"; | 189 | QString fn = dictDir() + "/words"; |
183 | if ( QFile::exists(words_lang) ) | 190 | if ( QFile::exists(words_lang) ) |
184 | fn = words_lang; | 191 | fn = words_lang; |
185 | QFile in(fn); | 192 | QFile in(fn); |
186 | if ( in.open(IO_ReadOnly) ) { | 193 | if ( in.open(IO_ReadOnly) ) { |
187 | fixed_dawg->createFromWords(&in); | 194 | fixed_dawg->createFromWords(&in); |
188 | dawgfile.open(IO_WriteOnly); | 195 | dawgfile.open(IO_WriteOnly); |
189 | fixed_dawg->write(&dawgfile); | 196 | fixed_dawg->write(&dawgfile); |
190 | dawgfile.close(); | 197 | dawgfile.close(); |
191 | } | 198 | } |
192 | } else { | 199 | } else { |
193 | fixed_dawg->readFile(dawgfilename); | 200 | fixed_dawg->readFile(dawgfilename); |
194 | } | 201 | } |
195 | } | 202 | } |
196 | 203 | ||
197 | return *fixed_dawg; | 204 | return *fixed_dawg; |
198 | } | 205 | } |
199 | 206 | ||
200 | /*! | 207 | /*! |
201 | Returns the changeable QDawg that contains general | 208 | Returns the changeable QDawg that contains general |
202 | words for the current locale. | 209 | words for the current locale. |
@@ -618,27 +625,63 @@ QString Global::stringQuote(const QString& s) | |||
618 | } | 625 | } |
619 | 626 | ||
620 | /*! | 627 | /*! |
621 | Finds all documents on the system's document directories which | 628 | Finds all documents on the system's document directories which |
622 | match the filter \a mimefilter, and appends the resulting DocLnk | 629 | match the filter \a mimefilter, and appends the resulting DocLnk |
623 | objects to \a folder. | 630 | objects to \a folder. |
624 | */ | 631 | */ |
625 | void Global::findDocuments(DocLnkSet* folder, const QString &mimefilter) | 632 | void Global::findDocuments(DocLnkSet* folder, const QString &mimefilter) |
626 | { | 633 | { |
627 | QString homedocs = QString(getenv("HOME")) + "/Documents"; | 634 | QString homedocs = QString(getenv("HOME")) + "/Documents"; |
628 | DocLnkSet d(homedocs,mimefilter); | 635 | DocLnkSet d(homedocs,mimefilter); |
629 | folder->appendFrom(d); | 636 | folder->appendFrom(d); |
630 | StorageInfo storage; | 637 | StorageInfo storage; |
631 | const QList<FileSystem> &fs = storage.fileSystems(); | 638 | const QList<FileSystem> &fs = storage.fileSystems(); |
632 | QListIterator<FileSystem> it ( fs ); | 639 | QListIterator<FileSystem> it ( fs ); |
633 | for ( ; it.current(); ++it ) { | 640 | for ( ; it.current(); ++it ) { |
634 | if ( (*it)->isRemovable() ) { | 641 | if ( (*it)->isRemovable() ) { |
635 | QString path = (*it)->path(); | 642 | QString path = (*it)->path(); |
636 | DocLnkSet ide( path, mimefilter ); | 643 | DocLnkSet ide( path, mimefilter ); |
637 | folder->appendFrom(ide); | 644 | folder->appendFrom(ide); |
638 | } | 645 | } |
639 | } | 646 | } |
640 | } | 647 | } |
641 | 648 | ||
649 | QStringList Global::languageList() | ||
650 | { | ||
651 | QString lang = getenv("LANG"); | ||
652 | QStringList langs; | ||
653 | langs.append(lang); | ||
654 | int i = lang.find("."); | ||
655 | if ( i > 0 ) | ||
656 | lang = lang.left( i ); | ||
657 | i = lang.find( "_" ); | ||
658 | if ( i > 0 ) | ||
659 | langs.append(lang.left(i)); | ||
660 | return langs; | ||
661 | } | ||
662 | |||
663 | QStringList Global::helpPath() | ||
664 | { | ||
665 | QStringList path; | ||
666 | QStringList langs = Global::languageList(); | ||
667 | for (QStringList::ConstIterator it = langs.fromLast(); it!=langs.end(); --it) { | ||
668 | QString lang = *it; | ||
669 | if ( !lang.isEmpty() ) | ||
670 | path += QPEApplication::qpeDir() + "/help/" + lang + "/html"; | ||
671 | } | ||
672 | path += QPEApplication::qpeDir() + "/pics"; | ||
673 | path += QPEApplication::qpeDir() + "/help/en/html"; | ||
674 | path += QPEApplication::qpeDir() + "/docs"; | ||
675 | QString dir = QDir::current().canonicalPath(); | ||
676 | if ( dir == "/" ) | ||
677 | dir += "/docs"; | ||
678 | else { | ||
679 | path += dir + "/../pics"; | ||
680 | dir += "/../docs"; | ||
681 | path += dir; | ||
682 | } | ||
683 | return path; | ||
684 | } | ||
642 | 685 | ||
643 | 686 | ||
644 | #include "global.moc" | 687 | #include "global.moc" |
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 70ffec1..4dbfbd8 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -1,45 +1,46 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
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 | ** $Id$ | 19 | ** $Id$ |
20 | ** | 20 | ** |
21 | **********************************************************************/ | 21 | **********************************************************************/ |
22 | #define QTOPIA_INTERNAL_LANGLIST | ||
22 | #include <stdlib.h> | 23 | #include <stdlib.h> |
23 | #include <unistd.h> | 24 | #include <unistd.h> |
24 | #include <qfile.h> | 25 | #include <qfile.h> |
25 | #ifdef Q_WS_QWS | 26 | #ifdef Q_WS_QWS |
26 | #ifndef QT_NO_COP | 27 | #ifndef QT_NO_COP |
27 | #if QT_VERSION <= 231 | 28 | #if QT_VERSION <= 231 |
28 | #define private public | 29 | #define private public |
29 | #define sendLocally processEvent | 30 | #define sendLocally processEvent |
30 | #include "qcopenvelope_qws.h" | 31 | #include "qcopenvelope_qws.h" |
31 | #undef private | 32 | #undef private |
32 | #else | 33 | #else |
33 | #include "qcopenvelope_qws.h" | 34 | #include "qcopenvelope_qws.h" |
34 | #endif | 35 | #endif |
35 | #endif | 36 | #endif |
36 | #include <qwindowsystem_qws.h> | 37 | #include <qwindowsystem_qws.h> |
37 | #endif | 38 | #endif |
38 | #include <qtextstream.h> | 39 | #include <qtextstream.h> |
39 | #include <qpalette.h> | 40 | #include <qpalette.h> |
40 | #include <qbuffer.h> | 41 | #include <qbuffer.h> |
41 | #include <qptrdict.h> | 42 | #include <qptrdict.h> |
42 | #include <qregexp.h> | 43 | #include <qregexp.h> |
43 | #include <qdir.h> | 44 | #include <qdir.h> |
44 | #include <qlabel.h> | 45 | #include <qlabel.h> |
45 | #include <qdialog.h> | 46 | #include <qdialog.h> |
@@ -116,64 +117,49 @@ public: | |||
116 | bool forceshow; | 117 | bool forceshow; |
117 | bool nomaximize; | 118 | bool nomaximize; |
118 | QWidget* qpe_main_widget; | 119 | QWidget* qpe_main_widget; |
119 | bool keep_running; | 120 | bool keep_running; |
120 | QList<QCopRec> qcopq; | 121 | QList<QCopRec> qcopq; |
121 | 122 | ||
122 | void enqueueQCop(const QCString &ch, const QCString &msg, | 123 | void enqueueQCop(const QCString &ch, const QCString &msg, |
123 | const QByteArray &data) | 124 | const QByteArray &data) |
124 | { | 125 | { |
125 | qcopq.append(new QCopRec(ch,msg,data)); | 126 | qcopq.append(new QCopRec(ch,msg,data)); |
126 | } | 127 | } |
127 | void sendQCopQ() | 128 | void sendQCopQ() |
128 | { | 129 | { |
129 | QCopRec* r; | 130 | QCopRec* r; |
130 | for (QListIterator<QCopRec> it(qcopq); (r=it.current()); ++it) | 131 | for (QListIterator<QCopRec> it(qcopq); (r=it.current()); ++it) |
131 | QCopChannel::sendLocally(r->channel,r->message,r->data); | 132 | QCopChannel::sendLocally(r->channel,r->message,r->data); |
132 | qcopq.clear(); | 133 | qcopq.clear(); |
133 | } | 134 | } |
134 | }; | 135 | }; |
135 | 136 | ||
136 | class ResourceMimeFactory : public QMimeSourceFactory { | 137 | class ResourceMimeFactory : public QMimeSourceFactory { |
137 | public: | 138 | public: |
138 | ResourceMimeFactory() | 139 | ResourceMimeFactory() |
139 | { | 140 | { |
140 | QStringList path; | 141 | setFilePath( Global::helpPath() ); |
141 | QString lang = getenv("LANG"); | ||
142 | if ( !lang.isEmpty() ) | ||
143 | path += QPEApplication::qpeDir() + "/help/" + lang + "/html"; | ||
144 | path += QPEApplication::qpeDir() + "/pics"; | ||
145 | path += QPEApplication::qpeDir() + "/help/en/html"; | ||
146 | path += QPEApplication::qpeDir() + "/docs"; | ||
147 | QString dir = QDir::current().canonicalPath(); | ||
148 | if ( dir == "/" ) | ||
149 | dir += "/docs"; | ||
150 | else { | ||
151 | path += dir + "/../pics"; | ||
152 | dir += "/../docs"; | ||
153 | path += dir; | ||
154 | } | ||
155 | setFilePath( path ); | ||
156 | setExtensionType("html","text/html;charset=UTF-8"); | 142 | setExtensionType("html","text/html;charset=UTF-8"); |
157 | } | 143 | } |
158 | 144 | ||
159 | const QMimeSource* data(const QString& abs_name) const | 145 | const QMimeSource* data(const QString& abs_name) const |
160 | { | 146 | { |
161 | const QMimeSource* r = QMimeSourceFactory::data(abs_name); | 147 | const QMimeSource* r = QMimeSourceFactory::data(abs_name); |
162 | if ( !r ) { | 148 | if ( !r ) { |
163 | int sl = abs_name.length(); | 149 | int sl = abs_name.length(); |
164 | do { | 150 | do { |
165 | sl = abs_name.findRev('/',sl-1); | 151 | sl = abs_name.findRev('/',sl-1); |
166 | QString name = sl>=0 ? abs_name.mid(sl+1) : abs_name; | 152 | QString name = sl>=0 ? abs_name.mid(sl+1) : abs_name; |
167 | int dot = name.findRev('.'); | 153 | int dot = name.findRev('.'); |
168 | if ( dot >= 0 ) | 154 | if ( dot >= 0 ) |
169 | name = name.left(dot); | 155 | name = name.left(dot); |
170 | QImage img = Resource::loadImage(name); | 156 | QImage img = Resource::loadImage(name); |
171 | if ( !img.isNull() ) | 157 | if ( !img.isNull() ) |
172 | r = new QImageDrag(img); | 158 | r = new QImageDrag(img); |
173 | } while (!r && sl>0); | 159 | } while (!r && sl>0); |
174 | } | 160 | } |
175 | return r; | 161 | return r; |
176 | } | 162 | } |
177 | }; | 163 | }; |
178 | 164 | ||
179 | static int muted=0; | 165 | static int muted=0; |
@@ -516,74 +502,70 @@ QPEApplication::QPEApplication( int& argc, char **argv, Type t ) | |||
516 | 502 | ||
517 | for (int a=0; a<argc; a++) { | 503 | for (int a=0; a<argc; a++) { |
518 | if ( qstrcmp(argv[a],"-preload")==0 ) { | 504 | if ( qstrcmp(argv[a],"-preload")==0 ) { |
519 | argv[a] = argv[a+1]; | 505 | argv[a] = argv[a+1]; |
520 | a++; | 506 | a++; |
521 | d->preloaded = TRUE; | 507 | d->preloaded = TRUE; |
522 | argc-=1; | 508 | argc-=1; |
523 | } else if ( qstrcmp(argv[a],"-preload-show")==0 ) { | 509 | } else if ( qstrcmp(argv[a],"-preload-show")==0 ) { |
524 | argv[a] = argv[a+1]; | 510 | argv[a] = argv[a+1]; |
525 | a++; | 511 | a++; |
526 | d->preloaded = TRUE; | 512 | d->preloaded = TRUE; |
527 | d->forceshow = TRUE; | 513 | d->forceshow = TRUE; |
528 | argc-=1; | 514 | argc-=1; |
529 | } | 515 | } |
530 | } | 516 | } |
531 | 517 | ||
532 | /* overide stored arguments */ | 518 | /* overide stored arguments */ |
533 | setArgs(argc, argv); | 519 | setArgs(argc, argv); |
534 | 520 | ||
535 | #endif | 521 | #endif |
536 | 522 | ||
537 | qwsSetDecoration( new QPEDecoration() ); | 523 | qwsSetDecoration( new QPEDecoration() ); |
538 | 524 | ||
539 | #ifndef QT_NO_TRANSLATION | 525 | #ifndef QT_NO_TRANSLATION |
540 | char *l = getenv( "LANG" ); | 526 | QStringList langs = Global::languageList(); |
541 | QString lang; | 527 | for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { |
542 | if ( l ) { | 528 | QString lang = *it; |
543 | lang = l; | ||
544 | 529 | ||
545 | /* | 530 | QTranslator * trans; |
546 | Config config("qpe"); | 531 | QString tfn; |
547 | config.setGroup( "Appearance" ); | ||
548 | lang = config.readEntry( "Language", lang ); | ||
549 | */ | ||
550 | 532 | ||
551 | QTranslator * trans = new QTranslator(this); | 533 | trans = new QTranslator(this); |
552 | QString tfn = qpeDir()+"/i18n/"+lang+"/"+d->appName+".qm"; | 534 | tfn = qpeDir()+"/i18n/"+lang+"/libqpe.qm"; |
553 | if ( trans->load( tfn )) | 535 | if ( trans->load( tfn )) |
554 | installTranslator( trans ); | 536 | installTranslator( trans ); |
555 | else | 537 | else |
556 | delete trans; | 538 | delete trans; |
557 | 539 | ||
558 | trans = new QTranslator(this); | 540 | trans = new QTranslator(this); |
559 | tfn = qpeDir()+"/i18n/"+lang+"/libqpe.qm"; | 541 | tfn = qpeDir()+"/i18n/"+lang+"/"+d->appName+".qm"; |
560 | if ( trans->load( tfn )) | 542 | if ( trans->load( tfn )) |
561 | installTranslator( trans ); | 543 | installTranslator( trans ); |
562 | else | 544 | else |
563 | delete trans; | 545 | delete trans; |
564 | 546 | ||
565 | //###language/font hack; should look it up somewhere | 547 | //###language/font hack; should look it up somewhere |
566 | if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { | 548 | if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { |
567 | QFont fn = FontManager::unicodeFont( FontManager::Proportional ); | 549 | QFont fn = FontManager::unicodeFont( FontManager::Proportional ); |
568 | setFont( fn ); | 550 | setFont( fn ); |
569 | } | 551 | } |
570 | } | 552 | } |
571 | #endif | 553 | #endif |
572 | 554 | ||
573 | applyStyle(); | 555 | applyStyle(); |
574 | 556 | ||
575 | if ( type() == GuiServer ) { | 557 | if ( type() == GuiServer ) { |
576 | setScreenSaverInterval(-1); | 558 | setScreenSaverInterval(-1); |
577 | setVolume(); | 559 | setVolume(); |
578 | QWSServer::setScreenSaver(new QPEScreenSaver); | 560 | QWSServer::setScreenSaver(new QPEScreenSaver); |
579 | } | 561 | } |
580 | 562 | ||
581 | installEventFilter( this ); | 563 | installEventFilter( this ); |
582 | 564 | ||
583 | QPEMenuToolFocusManager::initialize(); | 565 | QPEMenuToolFocusManager::initialize(); |
584 | 566 | ||
585 | #ifdef QT_NO_QWS_CURSOR | 567 | #ifdef QT_NO_QWS_CURSOR |
586 | // if we have no cursor, probably don't want tooltips | 568 | // if we have no cursor, probably don't want tooltips |
587 | QToolTip::setEnabled( FALSE ); | 569 | QToolTip::setEnabled( FALSE ); |
588 | #endif | 570 | #endif |
589 | } | 571 | } |