summaryrefslogtreecommitdiff
authorzecke <zecke>2002-10-18 01:46:28 (UTC)
committer zecke <zecke>2002-10-18 01:46:28 (UTC)
commit218bc4583c545db50f3475930d61b1c76aca3fbd (patch) (unidiff)
tree5ddd0dbca5a42d3f00914968150147c85b4da837
parent0457c48c165abef8afa2ac73c8f66d20e289681a (diff)
downloadopie-218bc4583c545db50f3475930d61b1c76aca3fbd.zip
opie-218bc4583c545db50f3475930d61b1c76aca3fbd.tar.gz
opie-218bc4583c545db50f3475930d61b1c76aca3fbd.tar.bz2
Remove some more #ifdefs
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp4
-rw-r--r--core/launcher/launcher.cpp2
2 files changed, 1 insertions, 5 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 1fd3f6a..3546e28 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -354,98 +354,94 @@ DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType )
354 354
355 channel = new QCopChannel( "QPE/Desktop", this ); 355 channel = new QCopChannel( "QPE/Desktop", this );
356 connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), 356 connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ),
357 this, SLOT( desktopMessage( const QCString&, const QByteArray& ) ) ); 357 this, SLOT( desktopMessage( const QCString&, const QByteArray& ) ) );
358 358
359 channel = new QCopChannel( "QPE/System", this ); 359 channel = new QCopChannel( "QPE/System", this );
360 connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), 360 connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ),
361 this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) ); 361 this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) );
362 362
363 m_screensaver = new QPEScreenSaver; 363 m_screensaver = new QPEScreenSaver;
364 364
365 m_screensaver-> setInterval ( -1 ); 365 m_screensaver-> setInterval ( -1 );
366 QWSServer::setScreenSaver( m_screensaver ); 366 QWSServer::setScreenSaver( m_screensaver );
367} 367}
368 368
369 369
370DesktopApplication::~DesktopApplication() 370DesktopApplication::~DesktopApplication()
371{ 371{
372 delete ps; 372 delete ps;
373 delete pa; 373 delete pa;
374} 374}
375 375
376void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray &data ) 376void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray &data )
377{ 377{
378#ifdef Q_WS_QWS
379 QDataStream stream( data, IO_ReadOnly ); 378 QDataStream stream( data, IO_ReadOnly );
380 if ( msg == "keyRegister(int key, QString channel, QString message)" ) { 379 if ( msg == "keyRegister(int key, QString channel, QString message)" ) {
381 int k; 380 int k;
382 QString c, m; 381 QString c, m;
383 stream >> k; 382 stream >> k;
384 stream >> c; 383 stream >> c;
385 stream >> m; 384 stream >> m;
386 385
387 qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m ); 386 qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m );
388 keyRegisterList.append( QCopKeyRegister( k, c, m ) ); 387 keyRegisterList.append( QCopKeyRegister( k, c, m ) );
389 } 388 }
390#endif
391} 389}
392 390
393 391
394void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) 392void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data )
395{ 393{
396#ifdef Q_WS_QWS
397 QDataStream stream ( data, IO_ReadOnly ); 394 QDataStream stream ( data, IO_ReadOnly );
398 395
399 if ( msg == "setScreenSaverInterval(int)" ) { 396 if ( msg == "setScreenSaverInterval(int)" ) {
400 int time; 397 int time;
401 stream >> time; 398 stream >> time;
402 m_screensaver-> setInterval( time ); 399 m_screensaver-> setInterval( time );
403 } 400 }
404 else if ( msg == "setScreenSaverIntervals(int,int,int)" ) { 401 else if ( msg == "setScreenSaverIntervals(int,int,int)" ) {
405 int t1, t2, t3; 402 int t1, t2, t3;
406 stream >> t1 >> t2 >> t3; 403 stream >> t1 >> t2 >> t3;
407 m_screensaver-> setIntervals( t1, t2, t3 ); 404 m_screensaver-> setIntervals( t1, t2, t3 );
408 } 405 }
409 else if ( msg == "setBacklight(int)" ) { 406 else if ( msg == "setBacklight(int)" ) {
410 int bright; 407 int bright;
411 stream >> bright; 408 stream >> bright;
412 m_screensaver-> setBacklight( bright ); 409 m_screensaver-> setBacklight( bright );
413 } 410 }
414 else if ( msg == "setScreenSaverMode(int)" ) { 411 else if ( msg == "setScreenSaverMode(int)" ) {
415 int mode; 412 int mode;
416 stream >> mode; 413 stream >> mode;
417 m_screensaver-> setMode ( mode ); 414 m_screensaver-> setMode ( mode );
418 } 415 }
419 else if ( msg == "setDisplayState(int)" ) { 416 else if ( msg == "setDisplayState(int)" ) {
420 int state; 417 int state;
421 stream >> state; 418 stream >> state;
422 m_screensaver-> setDisplayState ( state != 0 ); 419 m_screensaver-> setDisplayState ( state != 0 );
423 } 420 }
424 else if ( msg == "suspend()" ) { 421 else if ( msg == "suspend()" ) {
425 emit power(); 422 emit power();
426 } 423 }
427#endif
428} 424}
429 425
430enum MemState { Unknown, VeryLow, Low, Normal } memstate = Unknown; 426enum MemState { Unknown, VeryLow, Low, Normal } memstate = Unknown;
431 427
432#ifdef Q_WS_QWS 428#ifdef Q_WS_QWS
433bool DesktopApplication::qwsEventFilter( QWSEvent *e ) 429bool DesktopApplication::qwsEventFilter( QWSEvent *e )
434{ 430{
435 qpedesktop->checkMemory(); 431 qpedesktop->checkMemory();
436 432
437 if ( e->type == QWSEvent::Key ) { 433 if ( e->type == QWSEvent::Key ) {
438 QWSKeyEvent * ke = ( QWSKeyEvent * ) e; 434 QWSKeyEvent * ke = ( QWSKeyEvent * ) e;
439 if ( !loggedin && ke->simpleData.keycode != Key_F34 ) 435 if ( !loggedin && ke->simpleData.keycode != Key_F34 )
440 return TRUE; 436 return TRUE;
441 bool press = ke->simpleData.is_press; 437 bool press = ke->simpleData.is_press;
442 bool autoRepeat = ke->simpleData.is_auto_repeat; 438 bool autoRepeat = ke->simpleData.is_auto_repeat;
443 439
444 /* 440 /*
445 app that registers key/message to be sent back to the app, when it doesn't have focus, 441 app that registers key/message to be sent back to the app, when it doesn't have focus,
446 when user presses key, unless keyboard has been requested from app. 442 when user presses key, unless keyboard has been requested from app.
447 will not send multiple repeats if user holds key 443 will not send multiple repeats if user holds key
448 i.e. one shot 444 i.e. one shot
449 */ 445 */
450 if ( !keyRegisterList.isEmpty() && ke->simpleData.keycode !=0 && press) { 446 if ( !keyRegisterList.isEmpty() && ke->simpleData.keycode !=0 && press) {
451// qDebug("<<<<<<<<<<<<<keycode %d", ke->simpleData.keycode); 447// qDebug("<<<<<<<<<<<<<keycode %d", ke->simpleData.keycode);
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index a5955a4..5a9ee1b 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -603,49 +603,49 @@ Launcher::Launcher( QWidget* parent, const char* name, WFlags fl )
603 syncDialog = 0; 603 syncDialog = 0;
604 604
605 // we have a pretty good idea how big we'll be 605 // we have a pretty good idea how big we'll be
606 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); 606 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() );
607 607
608 tabs = 0; 608 tabs = 0;
609 rootFolder = 0; 609 rootFolder = 0;
610 docsFolder = 0; 610 docsFolder = 0;
611 611
612 int stamp = uidgen.generate(); // this is our timestamp to see which devices we know 612 int stamp = uidgen.generate(); // this is our timestamp to see which devices we know
613 //uidgen.store( stamp ); 613 //uidgen.store( stamp );
614 m_timeStamp = QString::number( stamp ); 614 m_timeStamp = QString::number( stamp );
615 615
616 tabs = new CategoryTabWidget( this ); 616 tabs = new CategoryTabWidget( this );
617 tabs->setMaximumWidth( qApp->desktop()->width() ); 617 tabs->setMaximumWidth( qApp->desktop()->width() );
618 setCentralWidget( tabs ); 618 setCentralWidget( tabs );
619 619
620 connect( tabs, SIGNAL(selected(const QString&)), 620 connect( tabs, SIGNAL(selected(const QString&)),
621 this, SLOT(viewSelected(const QString&)) ); 621 this, SLOT(viewSelected(const QString&)) );
622 connect( tabs, SIGNAL(clicked(const AppLnk*)), 622 connect( tabs, SIGNAL(clicked(const AppLnk*)),
623 this, SLOT(select(const AppLnk*))); 623 this, SLOT(select(const AppLnk*)));
624 connect( tabs, SIGNAL(rightPressed(AppLnk*)), 624 connect( tabs, SIGNAL(rightPressed(AppLnk*)),
625 this, SLOT(properties(AppLnk*))); 625 this, SLOT(properties(AppLnk*)));
626 626
627#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 627#if !defined(QT_NO_COP)
628 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); 628 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
629 connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), 629 connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)),
630 this, SLOT(systemMessage( const QCString &, const QByteArray &)) ); 630 this, SLOT(systemMessage( const QCString &, const QByteArray &)) );
631 QCopChannel *channel = new QCopChannel( "QPE/Launcher", this ); 631 QCopChannel *channel = new QCopChannel( "QPE/Launcher", this );
632 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 632 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
633 this, SLOT(launcherMessage(const QCString&, const QByteArray&)) ); 633 this, SLOT(launcherMessage(const QCString&, const QByteArray&)) );
634#endif 634#endif
635 635
636 storage = new StorageInfo( this ); 636 storage = new StorageInfo( this );
637 connect( storage, SIGNAL( disksChanged() ), SLOT( storageChanged() ) ); 637 connect( storage, SIGNAL( disksChanged() ), SLOT( storageChanged() ) );
638 638
639 updateTabs(); 639 updateTabs();
640 640
641 preloadApps(); 641 preloadApps();
642 642
643 in_lnk_props = FALSE; 643 in_lnk_props = FALSE;
644 got_lnk_change = FALSE; 644 got_lnk_change = FALSE;
645} 645}
646 646
647Launcher::~Launcher() 647Launcher::~Launcher()
648{ 648{
649 delete rootFolder; 649 delete rootFolder;
650 delete docsFolder; 650 delete docsFolder;
651} 651}