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
@@ -30,14 +30,16 @@
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>
@@ -52,5 +54,5 @@
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>
@@ -156,5 +158,5 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) :
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&)),
@@ -224,5 +226,5 @@ void FirstUse::nextDialog()
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) ) {
@@ -230,10 +232,10 @@ void FirstUse::nextDialog()
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" );
@@ -259,10 +261,10 @@ void FirstUse::nextDialog()
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 );
@@ -286,5 +288,5 @@ void FirstUse::previousDialog()
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 );
@@ -295,5 +297,5 @@ void FirstUse::previousDialog()
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 );
@@ -319,7 +321,7 @@ void FirstUse::message(const QCString &msg, const QByteArray &data)
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");
@@ -348,10 +350,10 @@ void FirstUse::terminated( int, const QString &app )
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();
@@ -371,10 +373,10 @@ void FirstUse::reloadLanguages()
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 }
@@ -393,7 +395,7 @@ void FirstUse::reloadLanguages()
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 {
@@ -404,7 +406,7 @@ void FirstUse::reloadLanguages()
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 {