summaryrefslogtreecommitdiff
path: root/core/launcher/firstuse.cpp
Unidiff
Diffstat (limited to 'core/launcher/firstuse.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/firstuse.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp
index 4316648..e9e2d83 100644
--- a/core/launcher/firstuse.cpp
+++ b/core/launcher/firstuse.cpp
@@ -8,71 +8,73 @@
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 20
21// I need access to some things you don't normally get access to. 21// I need access to some things you don't normally get access to.
22 22
23#ifndef _MSC_VER 23#ifndef _MSC_VER
24 //### revise to allow removal of translators under MSVC 24 //### revise to allow removal of translators under MSVC
25#define private public 25#define private public
26#define protected public 26#define protected public
27#endif 27#endif
28#include "firstuse.h" 28#include "firstuse.h"
29#include "inputmethods.h" 29#include "inputmethods.h"
30#include "applauncher.h" 30#include "applauncher.h"
31#include "serverapp.h" 31#include "serverapp.h"
32//#include <qtopia/custom.h>
33
34#include "calibrate.h" 32#include "calibrate.h"
35#include "documentlist.h" 33#include "documentlist.h"
36 34
35/* OPIE */
36#include <opie2/odebug.h>
37#include <qtopia/resource.h> 37#include <qtopia/resource.h>
38#include <qtopia/qcopenvelope_qws.h> 38#include <qtopia/qcopenvelope_qws.h>
39#include <qtopia/config.h> 39#include <qtopia/config.h>
40#include <qtopia/fontmanager.h> 40#include <qtopia/fontmanager.h>
41using namespace Opie::Core;
41 42
43/* QT */
42#include <qfile.h> 44#include <qfile.h>
43#include <qpainter.h> 45#include <qpainter.h>
44#include <qsimplerichtext.h> 46#include <qsimplerichtext.h>
45#include <qpushbutton.h> 47#include <qpushbutton.h>
46#include <qlabel.h> 48#include <qlabel.h>
47#include <qtimer.h> 49#include <qtimer.h>
48 50
49#if defined( Q_WS_QWS ) 51#if defined( Q_WS_QWS )
50#include <qwsdisplay_qws.h> 52#include <qwsdisplay_qws.h>
51#include <qgfx_qws.h> 53#include <qgfx_qws.h>
52#endif 54#endif
53 55
54 56/* STD */
55#include <stdlib.h> 57#include <stdlib.h>
56#include <sys/types.h> 58#include <sys/types.h>
57#if defined(Q_OS_LINUX) || defined(_OS_LINUX_) 59#if defined(Q_OS_LINUX) || defined(_OS_LINUX_)
58#include <unistd.h> 60#include <unistd.h>
59#endif 61#endif
60 62
61 63
62struct { 64struct {
63 bool enabled; 65 bool enabled;
64 const char *app; 66 const char *app;
65 const char *start; 67 const char *start;
66 const char *stop; 68 const char *stop;
67 const char *desc; 69 const char *desc;
68} 70}
69settingsTable [] = 71settingsTable [] =
70{ 72{
71 { FALSE, "language", "raise()", "accept()", // No tr 73 { FALSE, "language", "raise()", "accept()", // No tr
72 QT_TR_NOOP("Language") }, 74 QT_TR_NOOP("Language") },
73 { FALSE, "doctab", "raise()", "accept()", // No tr 75 { FALSE, "doctab", "raise()", "accept()", // No tr
74 QT_TR_NOOP("DocTab") }, 76 QT_TR_NOOP("DocTab") },
75#ifndef Q_OS_WIN32 77#ifndef Q_OS_WIN32
76 { FALSE, "systemtime", "raise()", "accept()", // No tr 78 { FALSE, "systemtime", "raise()", "accept()", // No tr
77 QT_TR_NOOP("Time and Date") }, 79 QT_TR_NOOP("Time and Date") },
78#endif 80#endif
@@ -134,49 +136,49 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) :
134 connect(back, SIGNAL(clicked()), this, SLOT(previousDialog()) ); 136 connect(back, SIGNAL(clicked()), this, SLOT(previousDialog()) );
135 137
136 next = new QPushButton(tr("Next >>"), taskBar); 138 next = new QPushButton(tr("Next >>"), taskBar);
137 next->setFocusPolicy(NoFocus); 139 next->setFocusPolicy(NoFocus);
138 connect(next, SIGNAL(clicked()), this, SLOT(nextDialog()) ); 140 connect(next, SIGNAL(clicked()), this, SLOT(nextDialog()) );
139 141
140 // need to set the geom to lower corner 142 // need to set the geom to lower corner
141 QSize sz = inputMethods->sizeHint(); 143 QSize sz = inputMethods->sizeHint();
142 int buttonWidth = (width() - sz.width()) / 2; 144 int buttonWidth = (width() - sz.width()) / 2;
143 int x = 0; 145 int x = 0;
144 146
145 controlHeight = back->sizeHint().height(); 147 controlHeight = back->sizeHint().height();
146 148
147 inputMethods->setGeometry(0,0, sz.width(), controlHeight ); 149 inputMethods->setGeometry(0,0, sz.width(), controlHeight );
148 x += sz.width(); 150 x += sz.width();
149 151
150 back->setGeometry(x, 0, buttonWidth, controlHeight); 152 back->setGeometry(x, 0, buttonWidth, controlHeight);
151 x += buttonWidth; 153 x += buttonWidth;
152 next->setGeometry(x, 0, buttonWidth, controlHeight); 154 next->setGeometry(x, 0, buttonWidth, controlHeight);
153 155
154 taskBar->setGeometry( 0, height() - controlHeight, desk.width(), controlHeight); 156 taskBar->setGeometry( 0, height() - controlHeight, desk.width(), controlHeight);
155 taskBar->hide(); 157 taskBar->hide();
156 158
157#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 159#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
158 qDebug("Setting up QCop to QPE/System"); 160 odebug << "Setting up QCop to QPE/System" << oendl;
159 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); 161 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
160 connect(sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), 162 connect(sysChannel, SIGNAL(received(const QCString&,const QByteArray&)),
161 this, SLOT(message(const QCString&,const QByteArray&)) ); 163 this, SLOT(message(const QCString&,const QByteArray&)) );
162#endif 164#endif
163 calcMaxWindowRect(); 165 calcMaxWindowRect();
164 166
165 m_calHandler = ( QWSServer::mouseHandler() && QWSServer::mouseHandler()->inherits("QCalibratedMouseHandler") ) ? true : false; 167 m_calHandler = ( QWSServer::mouseHandler() && QWSServer::mouseHandler()->inherits("QCalibratedMouseHandler") ) ? true : false;
166 168
167 if ( m_calHandler) { 169 if ( m_calHandler) {
168 if ( !QFile::exists("/etc/pointercal") ) { 170 if ( !QFile::exists("/etc/pointercal") ) {
169 needCalibrate = TRUE; 171 needCalibrate = TRUE;
170 grabMouse(); 172 grabMouse();
171 } 173 }
172 } 174 }
173 175
174 Config config("locale"); 176 Config config("locale");
175 config.setGroup( "Language"); 177 config.setGroup( "Language");
176 lang = config.readEntry( "Language", "en"); 178 lang = config.readEntry( "Language", "en");
177 179
178 defaultFont = font(); 180 defaultFont = font();
179 181
180 //###language/font hack; should look it up somewhere 182 //###language/font hack; should look it up somewhere
181#ifdef Q_WS_QWS 183#ifdef Q_WS_QWS
182 if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { 184 if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) {
@@ -202,231 +204,231 @@ void FirstUse::calcMaxWindowRect()
202 QRect ir = inputMethods->inputRect(); 204 QRect ir = inputMethods->inputRect();
203 if ( ir.isValid() ) { 205 if ( ir.isValid() ) {
204 wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 ); 206 wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 );
205 } else { 207 } else {
206 wr.setCoords( 0, 0, displayWidth-1, 208 wr.setCoords( 0, 0, displayWidth-1,
207 qApp->desktop()->height() - controlHeight-1); 209 qApp->desktop()->height() - controlHeight-1);
208 } 210 }
209 211
210#if QT_VERSION < 0x030000 212#if QT_VERSION < 0x030000
211 QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr, 213 QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,
212 QSize(qt_screen->width(),qt_screen->height())) 214 QSize(qt_screen->width(),qt_screen->height()))
213 ); 215 );
214#else 216#else
215 QWSServer::setMaxWindowRect( wr ); 217 QWSServer::setMaxWindowRect( wr );
216#endif 218#endif
217#endif 219#endif
218} 220}
219 221
220/* cancel current dialog, and bring up next */ 222/* cancel current dialog, and bring up next */
221void FirstUse::nextDialog() 223void FirstUse::nextDialog()
222{ 224{
223 int prevApp = currApp; 225 int prevApp = currApp;
224 do { 226 do {
225 currApp++; 227 currApp++;
226 qDebug( "currApp = %d", currApp ); 228 odebug << "currApp = " << currApp << "" << oendl;
227 if ( settingsTable[currApp].app == 0 ) { 229 if ( settingsTable[currApp].app == 0 ) {
228 if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) { 230 if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) {
229 // The last application is still running. 231 // The last application is still running.
230 // Tell it to stop, and when its done we'll come back 232 // Tell it to stop, and when its done we'll come back
231 // to nextDialog and exit. 233 // to nextDialog and exit.
232 qDebug( "Waiting for %s to exit", settingsTable[prevApp].app ); 234 odebug << "Waiting for " << settingsTable[prevApp].app << " to exit" << oendl;
233 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app, 235 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
234 settingsTable[prevApp].stop ); 236 settingsTable[prevApp].stop );
235 currApp = prevApp; 237 currApp = prevApp;
236 } else { 238 } else {
237 qDebug( "Done!" ); 239 odebug << "Done!" << oendl;
238 Config config( "qpe" ); 240 Config config( "qpe" );
239 config.setGroup( "Startup" ); 241 config.setGroup( "Startup" );
240 config.writeEntry( "FirstUse", FALSE ); 242 config.writeEntry( "FirstUse", FALSE );
241 QPixmap pix = Resource::loadPixmap("bigwait"); 243 QPixmap pix = Resource::loadPixmap("bigwait");
242 QLabel *lblWait = new QLabel(0, "wait hack!", // No tr 244 QLabel *lblWait = new QLabel(0, "wait hack!", // No tr
243 QWidget::WStyle_Customize | QWidget::WDestructiveClose | 245 QWidget::WStyle_Customize | QWidget::WDestructiveClose |
244 QWidget::WStyle_NoBorder | QWidget::WStyle_Tool | 246 QWidget::WStyle_NoBorder | QWidget::WStyle_Tool |
245 QWidget::WStyle_StaysOnTop); 247 QWidget::WStyle_StaysOnTop);
246 lblWait->setPixmap( pix ); 248 lblWait->setPixmap( pix );
247 lblWait->setAlignment( QWidget::AlignCenter ); 249 lblWait->setAlignment( QWidget::AlignCenter );
248 lblWait->setGeometry( qApp->desktop()->geometry() ); 250 lblWait->setGeometry( qApp->desktop()->geometry() );
249 lblWait->show(); 251 lblWait->show();
250 qApp->processEvents(); 252 qApp->processEvents();
251 QTimer::singleShot( 1000, lblWait, SLOT(close()) ); 253 QTimer::singleShot( 1000, lblWait, SLOT(close()) );
252 repaint(); 254 repaint();
253 close(); 255 close();
254 ServerApplication::allowRestart = TRUE; 256 ServerApplication::allowRestart = TRUE;
255 } 257 }
256 return; 258 return;
257 } 259 }
258 } while ( !settingsTable[currApp].enabled ); 260 } while ( !settingsTable[currApp].enabled );
259 261
260 if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) { 262 if ( prevApp >= 0 && appLauncher->isRunning(settingsTable[prevApp].app) ) {
261 qDebug( "Shutdown: %s", settingsTable[prevApp].app ); 263 odebug << "Shutdown: " << settingsTable[prevApp].app << "" << oendl;
262 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app, 264 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
263 settingsTable[prevApp].stop ); 265 settingsTable[prevApp].stop );
264 waitForExit = prevApp; 266 waitForExit = prevApp;
265 } else { 267 } else {
266 qDebug( "Startup: %s", settingsTable[currApp].app ); 268 odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
267 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app, 269 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app,
268 settingsTable[currApp].start ); 270 settingsTable[currApp].start );
269 waitingForLaunch = TRUE; 271 waitingForLaunch = TRUE;
270 } 272 }
271 273
272 updateButtons(); 274 updateButtons();
273} 275}
274 276
275/* accept current dialog and bring up previous */ 277/* accept current dialog and bring up previous */
276void FirstUse::previousDialog() 278void FirstUse::previousDialog()
277{ 279{
278 int prevApp = currApp; 280 int prevApp = currApp;
279 do { 281 do {
280 currApp--; 282 currApp--;
281 if ( currApp < 0 ) { 283 if ( currApp < 0 ) {
282 currApp = prevApp; 284 currApp = prevApp;
283 return; 285 return;
284 } 286 }
285 } while ( !settingsTable[currApp].enabled ); 287 } while ( !settingsTable[currApp].enabled );
286 288
287 if ( prevApp >= 0 ) { 289 if ( prevApp >= 0 ) {
288 qDebug( "Shutdown: %s", settingsTable[prevApp].app ); 290 odebug << "Shutdown: " << settingsTable[prevApp].app << "" << oendl;
289 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app, 291 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[prevApp].app,
290 settingsTable[prevApp].stop ); 292 settingsTable[prevApp].stop );
291/* 293/*
292 if (settingsTable[prevApp].app == QString("systemtime")) 294 if (settingsTable[prevApp].app == QString("systemtime"))
293 QCopEnvelope e("QPE/Application/citytime", "close()"); 295 QCopEnvelope e("QPE/Application/citytime", "close()");
294*/ 296*/
295 waitForExit = prevApp; 297 waitForExit = prevApp;
296 } else { 298 } else {
297 qDebug( "Startup: %s", settingsTable[currApp].app ); 299 odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
298 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app, 300 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app,
299 settingsTable[currApp].start ); 301 settingsTable[currApp].start );
300 waitingForLaunch = TRUE; 302 waitingForLaunch = TRUE;
301 } 303 }
302 304
303 updateButtons(); 305 updateButtons();
304} 306}
305 307
306void FirstUse::message(const QCString &msg, const QByteArray &data) 308void FirstUse::message(const QCString &msg, const QByteArray &data)
307{ 309{
308 QDataStream stream( data, IO_ReadOnly ); 310 QDataStream stream( data, IO_ReadOnly );
309 if ( msg == "timeChange(QString)" ) { 311 if ( msg == "timeChange(QString)" ) {
310 QString t; 312 QString t;
311 stream >> t; 313 stream >> t;
312 if ( t.isNull() ) 314 if ( t.isNull() )
313 unsetenv("TZ"); 315 unsetenv("TZ");
314 else 316 else
315 setenv( "TZ", t.latin1(), 1 ); 317 setenv( "TZ", t.latin1(), 1 );
316 } 318 }
317} 319}
318 320
319void FirstUse::terminated( int, const QString &app ) 321void FirstUse::terminated( int, const QString &app )
320{ 322{
321 qDebug( "--- terminated: %s", app.latin1() ); 323 odebug << "--- terminated: " << app << "" << oendl;
322 if ( waitForExit != -1 && settingsTable[waitForExit].app == app ) { 324 if ( waitForExit != -1 && settingsTable[waitForExit].app == app ) {
323 qDebug( "Startup: %s", settingsTable[currApp].app ); 325 odebug << "Startup: " << settingsTable[currApp].app << "" << oendl;
324 if ( settingsTable[waitForExit].app == "language" ) { // No tr 326 if ( settingsTable[waitForExit].app == "language" ) { // No tr
325 Config config("locale"); 327 Config config("locale");
326 config.setGroup( "Language"); 328 config.setGroup( "Language");
327 QString l = config.readEntry( "Language", "en"); 329 QString l = config.readEntry( "Language", "en");
328 if ( l != lang ) { 330 if ( l != lang ) {
329 reloadLanguages(); 331 reloadLanguages();
330 needRestart = TRUE; 332 needRestart = TRUE;
331 lang = l; 333 lang = l;
332 } 334 }
333 } 335 }
334 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app, 336 QCopEnvelope e(QCString("QPE/Application/") + settingsTable[currApp].app,
335 settingsTable[currApp].start ); 337 settingsTable[currApp].start );
336 waitingForLaunch = TRUE; 338 waitingForLaunch = TRUE;
337 updateButtons(); 339 updateButtons();
338 repaint(); 340 repaint();
339 waitForExit = -1; 341 waitForExit = -1;
340 } else if ( settingsTable[currApp].app == app ) { 342 } else if ( settingsTable[currApp].app == app ) {
341 nextDialog(); 343 nextDialog();
342 } else { 344 } else {
343 back->setEnabled(TRUE); 345 back->setEnabled(TRUE);
344 next->setEnabled(TRUE); 346 next->setEnabled(TRUE);
345 } 347 }
346} 348}
347 349
348void FirstUse::newQcopChannel(const QString& channelName) 350void FirstUse::newQcopChannel(const QString& channelName)
349{ 351{
350 qDebug("channel %s added", channelName.data() ); 352 odebug << "channel " << channelName.data() << " added" << oendl;
351 QString prefix("QPE/Application/"); 353 QString prefix("QPE/Application/");
352 if (channelName.startsWith(prefix)) { 354 if (channelName.startsWith(prefix)) {
353 QString appName = channelName.mid(prefix.length()); 355 QString appName = channelName.mid(prefix.length());
354 if ( currApp >= 0 && appName == settingsTable[currApp].app ) { 356 if ( currApp >= 0 && appName == settingsTable[currApp].app ) {
355 qDebug( "Application: %s started", settingsTable[currApp].app ); 357 odebug << "Application: " << settingsTable[currApp].app << " started" << oendl;
356 waitingForLaunch = FALSE; 358 waitingForLaunch = FALSE;
357 updateButtons(); 359 updateButtons();
358 repaint(); 360 repaint();
359 } else if (appName != "quicklauncher") { 361 } else if (appName != "quicklauncher") {
360 back->setEnabled(FALSE); 362 back->setEnabled(FALSE);
361 next->setEnabled(FALSE); 363 next->setEnabled(FALSE);
362 } 364 }
363 } 365 }
364} 366}
365 367
366void FirstUse::reloadLanguages() 368void FirstUse::reloadLanguages()
367{ 369{
368 // read language from config file. Waiting on QCop takes too long. 370 // read language from config file. Waiting on QCop takes too long.
369 Config config("locale"); 371 Config config("locale");
370 config.setGroup( "Language"); 372 config.setGroup( "Language");
371 QString l = config.readEntry( "Language", "en"); 373 QString l = config.readEntry( "Language", "en");
372 QString cl = getenv("LANG"); 374 QString cl = getenv("LANG");
373 qWarning("language message - " + l); 375 owarn << "language message - " + l << oendl;
374 // setting anyway... 376 // setting anyway...
375 if (l.isNull() ) 377 if (l.isNull() )
376 unsetenv( "LANG" ); 378 unsetenv( "LANG" );
377 else { 379 else {
378 qWarning("and its not null"); 380 owarn << "and its not null" << oendl;
379 setenv( "LANG", l.latin1(), 1 ); 381 setenv( "LANG", l.latin1(), 1 );
380 } 382 }
381#ifndef QT_NO_TRANSLATION 383#ifndef QT_NO_TRANSLATION
382 // clear old translators 384 // clear old translators
383#ifndef _MSC_VER 385#ifndef _MSC_VER
384 //### revise to allow removal of translators under MSVC 386 //### revise to allow removal of translators under MSVC
385 if(qApp->translators) { 387 if(qApp->translators) {
386 qApp->translators->setAutoDelete(TRUE); 388 qApp->translators->setAutoDelete(TRUE);
387 delete (qApp->translators); 389 delete (qApp->translators);
388 qApp->translators = 0; 390 qApp->translators = 0;
389 } 391 }
390#endif 392#endif
391 393
392 // load translation tables 394 // load translation tables
393 transApp = new QTranslator(qApp); 395 transApp = new QTranslator(qApp);
394 QString tfn = QPEApplication::qpeDir() + "i18n/"+l+"/qpe.qm"; 396 QString tfn = QPEApplication::qpeDir() + "i18n/"+l+"/qpe.qm";
395 qWarning("loading " + tfn); 397 owarn << "loading " + tfn << oendl;
396 if ( transApp->load(tfn) ) { 398 if ( transApp->load(tfn) ) {
397 qWarning("installing translator"); 399 owarn << "installing translator" << oendl;
398 qApp->installTranslator( transApp ); 400 qApp->installTranslator( transApp );
399 } else { 401 } else {
400 delete transApp; 402 delete transApp;
401 transApp = 0; 403 transApp = 0;
402 } 404 }
403 405
404 transLib = new QTranslator(qApp); 406 transLib = new QTranslator(qApp);
405 tfn = QPEApplication::qpeDir() + "i18n/"+l+"/libqpe.qm"; 407 tfn = QPEApplication::qpeDir() + "i18n/"+l+"/libqpe.qm";
406 qWarning("loading " + tfn); 408 owarn << "loading " + tfn << oendl;
407 if ( transLib->load(tfn) ) { 409 if ( transLib->load(tfn) ) {
408 qWarning("installing translator library"); 410 owarn << "installing translator library" << oendl;
409 qApp->installTranslator( transLib ); 411 qApp->installTranslator( transLib );
410 } else { 412 } else {
411 delete transLib; 413 delete transLib;
412 transLib = 0; 414 transLib = 0;
413 } 415 }
414 loadPixmaps(); 416 loadPixmaps();
415 //###language/font hack; should look it up somewhere 417 //###language/font hack; should look it up somewhere
416#ifdef Q_WS_QWS 418#ifdef Q_WS_QWS
417 if ( l == "ja" || l == "zh_CN" || l == "zh_TW" || l == "ko" ) { 419 if ( l == "ja" || l == "zh_CN" || l == "zh_TW" || l == "ko" ) {
418 QFont fn = FontManager::unicodeFont( FontManager::Proportional ); 420 QFont fn = FontManager::unicodeFont( FontManager::Proportional );
419 qApp->setFont( fn, TRUE ); 421 qApp->setFont( fn, TRUE );
420 } else { 422 } else {
421 qApp->setFont( defaultFont, TRUE ); 423 qApp->setFont( defaultFont, TRUE );
422 } 424 }
423#endif 425#endif
424#endif 426#endif
425} 427}
426 428
427void FirstUse::paintEvent( QPaintEvent * ) 429void FirstUse::paintEvent( QPaintEvent * )
428{ 430{
429 QPainter p( this ); 431 QPainter p( this );
430 432
431 p.drawPixmap(0,0, splash); 433 p.drawPixmap(0,0, splash);
432 434