summaryrefslogtreecommitdiff
authorzecke <zecke>2002-09-30 15:39:19 (UTC)
committer zecke <zecke>2002-09-30 15:39:19 (UTC)
commitd2a7ac3311bda821ee07ff070c24f17958657129 (patch) (unidiff)
treed616be7f21e75c0a7f27f2155fbb5bb5a0855266
parentda273e4780502b8819118c5e31c9d565fc1a1b49 (diff)
downloadopie-d2a7ac3311bda821ee07ff070c24f17958657129.zip
opie-d2a7ac3311bda821ee07ff070c24f17958657129.tar.gz
opie-d2a7ac3311bda821ee07ff070c24f17958657129.tar.bz2
Make QtopiaDesktop1.6 work with Opie again
it did rely on the counter part to send a version number starting with 1
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 1bd1156..6948976 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -479,257 +479,257 @@ void CategoryTabBar::layoutTabs()
479 QRect tr = t->rect(); 479 QRect tr = t->rect();
480 tr.setHeight( r.height() ); 480 tr.setHeight( r.height() );
481 t->setRect( tr ); 481 t->setRect( tr );
482 } 482 }
483 483
484 update(); 484 update();
485} 485}
486 486
487 487
488void CategoryTabBar::paint( QPainter * p, QTab * t, bool selected ) const 488void CategoryTabBar::paint( QPainter * p, QTab * t, bool selected ) const
489{ 489{
490 CategoryTabBar *that = (CategoryTabBar *) this; 490 CategoryTabBar *that = (CategoryTabBar *) this;
491 CategoryTab *ct = (CategoryTab *)t; 491 CategoryTab *ct = (CategoryTab *)t;
492 QPalette pal = palette(); 492 QPalette pal = palette();
493 bool setPal = FALSE; 493 bool setPal = FALSE;
494 if ( ct->bgColor.isValid() ) { 494 if ( ct->bgColor.isValid() ) {
495 pal.setColor( QPalette::Active, QColorGroup::Background, ct->bgColor ); 495 pal.setColor( QPalette::Active, QColorGroup::Background, ct->bgColor );
496 pal.setColor( QPalette::Active, QColorGroup::Button, ct->bgColor ); 496 pal.setColor( QPalette::Active, QColorGroup::Button, ct->bgColor );
497 pal.setColor( QPalette::Inactive, QColorGroup::Background, ct->bgColor ); 497 pal.setColor( QPalette::Inactive, QColorGroup::Background, ct->bgColor );
498 pal.setColor( QPalette::Inactive, QColorGroup::Button, ct->bgColor ); 498 pal.setColor( QPalette::Inactive, QColorGroup::Button, ct->bgColor );
499 that->setUpdatesEnabled( FALSE ); 499 that->setUpdatesEnabled( FALSE );
500 that->setPalette( pal ); 500 that->setPalette( pal );
501 setPal = TRUE; 501 setPal = TRUE;
502 } 502 }
503#if QT_VERSION >= 300 503#if QT_VERSION >= 300
504 QStyle::SFlags flags = QStyle::Style_Default; 504 QStyle::SFlags flags = QStyle::Style_Default;
505 if ( selected ) 505 if ( selected )
506 flags |= QStyle::Style_Selected; 506 flags |= QStyle::Style_Selected;
507 style().drawControl( QStyle::CE_TabBarTab, p, this, t->rect(), 507 style().drawControl( QStyle::CE_TabBarTab, p, this, t->rect(),
508 colorGroup(), flags, QStyleOption(t) ); 508 colorGroup(), flags, QStyleOption(t) );
509#else 509#else
510 style().drawTab( p, this, t, selected ); 510 style().drawTab( p, this, t, selected );
511#endif 511#endif
512 512
513 QRect r( t->rect() ); 513 QRect r( t->rect() );
514 QFont f( font() ); 514 QFont f( font() );
515 if ( selected ) 515 if ( selected )
516 f.setBold( TRUE ); 516 f.setBold( TRUE );
517 p->setFont( f ); 517 p->setFont( f );
518 518
519 if ( ct->fgColor.isValid() ) { 519 if ( ct->fgColor.isValid() ) {
520 pal.setColor( QPalette::Active, QColorGroup::Foreground, ct->fgColor ); 520 pal.setColor( QPalette::Active, QColorGroup::Foreground, ct->fgColor );
521 pal.setColor( QPalette::Inactive, QColorGroup::Foreground, ct->fgColor ); 521 pal.setColor( QPalette::Inactive, QColorGroup::Foreground, ct->fgColor );
522 that->setUpdatesEnabled( FALSE ); 522 that->setUpdatesEnabled( FALSE );
523 that->setPalette( pal ); 523 that->setPalette( pal );
524 setPal = TRUE; 524 setPal = TRUE;
525 } 525 }
526 int iw = 0; 526 int iw = 0;
527 int ih = 0; 527 int ih = 0;
528 if ( t->iconSet() != 0 ) { 528 if ( t->iconSet() != 0 ) {
529 iw = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 2; 529 iw = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 2;
530 ih = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height(); 530 ih = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
531 } 531 }
532 int w = iw + p->fontMetrics().width( t->text() ) + 4; 532 int w = iw + p->fontMetrics().width( t->text() ) + 4;
533 int h = QMAX(p->fontMetrics().height() + 4, ih ); 533 int h = QMAX(p->fontMetrics().height() + 4, ih );
534 paintLabel( p, QRect( r.left() + (r.width()-w)/2 - 3, 534 paintLabel( p, QRect( r.left() + (r.width()-w)/2 - 3,
535 r.top() + (r.height()-h)/2, w, h ), t, 535 r.top() + (r.height()-h)/2, w, h ), t,
536#if QT_VERSION >= 300 536#if QT_VERSION >= 300
537 t->identifier() == keyboardFocusTab() 537 t->identifier() == keyboardFocusTab()
538#else 538#else
539 t->identitifer() == keyboardFocusTab() 539 t->identitifer() == keyboardFocusTab()
540#endif 540#endif
541 ); 541 );
542 if ( setPal ) { 542 if ( setPal ) {
543 that->unsetPalette(); 543 that->unsetPalette();
544 that->setUpdatesEnabled( TRUE ); 544 that->setUpdatesEnabled( TRUE );
545 } 545 }
546} 546}
547 547
548 548
549void CategoryTabBar::paintLabel( QPainter* p, const QRect&, 549void CategoryTabBar::paintLabel( QPainter* p, const QRect&,
550 QTab* t, bool has_focus ) const 550 QTab* t, bool has_focus ) const
551{ 551{
552 QRect r = t->rect(); 552 QRect r = t->rect();
553 // if ( t->id != currentTab() ) 553 // if ( t->id != currentTab() )
554 //r.moveBy( 1, 1 ); 554 //r.moveBy( 1, 1 );
555 // 555 //
556 if ( t->iconSet() ) { 556 if ( t->iconSet() ) {
557 // the tab has an iconset, draw it in the right mode 557 // the tab has an iconset, draw it in the right mode
558 QIconSet::Mode mode = (t->isEnabled() && isEnabled()) ? QIconSet::Normal : QIconSet::Disabled; 558 QIconSet::Mode mode = (t->isEnabled() && isEnabled()) ? QIconSet::Normal : QIconSet::Disabled;
559 if ( mode == QIconSet::Normal && has_focus ) 559 if ( mode == QIconSet::Normal && has_focus )
560 mode = QIconSet::Active; 560 mode = QIconSet::Active;
561 QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode ); 561 QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode );
562 int pixw = pixmap.width(); 562 int pixw = pixmap.width();
563 int pixh = pixmap.height(); 563 int pixh = pixmap.height();
564 p->drawPixmap( r.left() + 6, r.center().y() - pixh / 2 + 1, pixmap ); 564 p->drawPixmap( r.left() + 6, r.center().y() - pixh / 2 + 1, pixmap );
565 r.setLeft( r.left() + pixw + 5 ); 565 r.setLeft( r.left() + pixw + 5 );
566 } 566 }
567 567
568 QRect tr = r; 568 QRect tr = r;
569 569
570 if ( r.width() < 20 ) 570 if ( r.width() < 20 )
571 return; 571 return;
572 572
573 if ( t->isEnabled() && isEnabled() ) { 573 if ( t->isEnabled() && isEnabled() ) {
574#if defined(_WS_WIN32_) 574#if defined(_WS_WIN32_)
575 if ( colorGroup().brush( QColorGroup::Button ) == colorGroup().brush( QColorGroup::Background ) ) 575 if ( colorGroup().brush( QColorGroup::Button ) == colorGroup().brush( QColorGroup::Background ) )
576 p->setPen( colorGroup().buttonText() ); 576 p->setPen( colorGroup().buttonText() );
577 else 577 else
578 p->setPen( colorGroup().foreground() ); 578 p->setPen( colorGroup().foreground() );
579#else 579#else
580 p->setPen( colorGroup().foreground() ); 580 p->setPen( colorGroup().foreground() );
581#endif 581#endif
582 p->drawText( tr, AlignCenter | AlignVCenter | ShowPrefix, t->text() ); 582 p->drawText( tr, AlignCenter | AlignVCenter | ShowPrefix, t->text() );
583 } else { 583 } else {
584 p->setPen( palette().disabled().foreground() ); 584 p->setPen( palette().disabled().foreground() );
585 p->drawText( tr, AlignCenter | AlignVCenter | ShowPrefix, t->text() ); 585 p->drawText( tr, AlignCenter | AlignVCenter | ShowPrefix, t->text() );
586 } 586 }
587} 587}
588 588
589//--------------------------------------------------------------------------- 589//---------------------------------------------------------------------------
590 590
591Launcher::Launcher( QWidget* parent, const char* name, WFlags fl ) 591Launcher::Launcher( QWidget* parent, const char* name, WFlags fl )
592 : QMainWindow( parent, name, fl ) 592 : QMainWindow( parent, name, fl )
593{ 593{
594 setCaption( tr("Launcher") ); 594 setCaption( tr("Launcher") );
595 595
596 syncDialog = 0; 596 syncDialog = 0;
597 597
598 // we have a pretty good idea how big we'll be 598 // we have a pretty good idea how big we'll be
599 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); 599 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() );
600 600
601 tabs = 0; 601 tabs = 0;
602 rootFolder = 0; 602 rootFolder = 0;
603 docsFolder = 0; 603 docsFolder = 0;
604 604
605 int stamp = uidgen.generate(); // this is our timestamp to see which devices we know 605 int stamp = uidgen.generate(); // this is our timestamp to see which devices we know
606 //uidgen.store( stamp ); 606 //uidgen.store( stamp );
607 m_timeStamp = QString::number( stamp ); 607 m_timeStamp = QString::number( stamp );
608 608
609 tabs = new CategoryTabWidget( this ); 609 tabs = new CategoryTabWidget( this );
610 tabs->setMaximumWidth( qApp->desktop()->width() ); 610 tabs->setMaximumWidth( qApp->desktop()->width() );
611 setCentralWidget( tabs ); 611 setCentralWidget( tabs );
612 612
613 connect( tabs, SIGNAL(selected(const QString&)), 613 connect( tabs, SIGNAL(selected(const QString&)),
614 this, SLOT(viewSelected(const QString&)) ); 614 this, SLOT(viewSelected(const QString&)) );
615 connect( tabs, SIGNAL(clicked(const AppLnk*)), 615 connect( tabs, SIGNAL(clicked(const AppLnk*)),
616 this, SLOT(select(const AppLnk*))); 616 this, SLOT(select(const AppLnk*)));
617 connect( tabs, SIGNAL(rightPressed(AppLnk*)), 617 connect( tabs, SIGNAL(rightPressed(AppLnk*)),
618 this, SLOT(properties(AppLnk*))); 618 this, SLOT(properties(AppLnk*)));
619 619
620#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 620#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
621 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); 621 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
622 connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), 622 connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)),
623 this, SLOT(systemMessage( const QCString &, const QByteArray &)) ); 623 this, SLOT(systemMessage( const QCString &, const QByteArray &)) );
624 QCopChannel *channel = new QCopChannel( "QPE/Launcher", this ); 624 QCopChannel *channel = new QCopChannel( "QPE/Launcher", this );
625 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 625 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
626 this, SLOT(launcherMessage(const QCString&, const QByteArray&)) ); 626 this, SLOT(launcherMessage(const QCString&, const QByteArray&)) );
627#endif 627#endif
628 628
629 storage = new StorageInfo( this ); 629 storage = new StorageInfo( this );
630 connect( storage, SIGNAL( disksChanged() ), SLOT( storageChanged() ) ); 630 connect( storage, SIGNAL( disksChanged() ), SLOT( storageChanged() ) );
631 631
632 updateTabs(); 632 updateTabs();
633 633
634 preloadApps(); 634 preloadApps();
635 635
636 in_lnk_props = FALSE; 636 in_lnk_props = FALSE;
637 got_lnk_change = FALSE; 637 got_lnk_change = FALSE;
638} 638}
639 639
640Launcher::~Launcher() 640Launcher::~Launcher()
641{ 641{
642 delete rootFolder; 642 delete rootFolder;
643 delete docsFolder; 643 delete docsFolder;
644} 644}
645 645
646static bool isVisibleWindow(int wid) 646static bool isVisibleWindow(int wid)
647{ 647{
648#ifdef QWS 648#ifdef QWS
649 const QList<QWSWindow> &list = qwsServer->clientWindows(); 649 const QList<QWSWindow> &list = qwsServer->clientWindows();
650 QWSWindow* w; 650 QWSWindow* w;
651 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { 651 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
652 if ( w->winId() == wid ) 652 if ( w->winId() == wid )
653 return !w->isFullyObscured(); 653 return !w->isFullyObscured();
654 } 654 }
655#endif 655#endif
656 return FALSE; 656 return FALSE;
657} 657}
658 658
659void Launcher::showMaximized() 659void Launcher::showMaximized()
660{ 660{
661 if ( isVisibleWindow( winId() ) ) 661 if ( isVisibleWindow( winId() ) )
662 doMaximize(); 662 doMaximize();
663 else 663 else
664 QTimer::singleShot( 20, this, SLOT(doMaximize()) ); 664 QTimer::singleShot( 20, this, SLOT(doMaximize()) );
665} 665}
666 666
667void Launcher::doMaximize() 667void Launcher::doMaximize()
668{ 668{
669 QMainWindow::showMaximized(); 669 QMainWindow::showMaximized();
670} 670}
671 671
672void Launcher::updateMimeTypes() 672void Launcher::updateMimeTypes()
673{ 673{
674 MimeType::clear(); 674 MimeType::clear();
675 updateMimeTypes(rootFolder); 675 updateMimeTypes(rootFolder);
676} 676}
677 677
678void Launcher::updateMimeTypes(AppLnkSet* folder) 678void Launcher::updateMimeTypes(AppLnkSet* folder)
679{ 679{
680 for ( QListIterator<AppLnk> it( folder->children() ); it.current(); ++it ) { 680 for ( QListIterator<AppLnk> it( folder->children() ); it.current(); ++it ) {
681 AppLnk *app = it.current(); 681 AppLnk *app = it.current();
682 if ( app->type() == "Folder" ) // No tr 682 if ( app->type() == "Folder" ) // No tr
683 updateMimeTypes((AppLnkSet *)app); 683 updateMimeTypes((AppLnkSet *)app);
684 else { 684 else {
685 MimeType::registerApp(*app); 685 MimeType::registerApp(*app);
686 } 686 }
687 } 687 }
688} 688}
689 689
690/** This is a HACK.... 690/** This is a HACK....
691 * Reason: scanning huge mediums, microdirvers for examples 691 * Reason: scanning huge mediums, microdirvers for examples
692 * consomes time. To avoid that we invented the MediumMountCheck 692 * consomes time. To avoid that we invented the MediumMountCheck
693 * 693 *
694 * a) the user globally disabled medium checking. We can ignore 694 * a) the user globally disabled medium checking. We can ignore
695 * all removable medium 695 * all removable medium
696 * b) the user enabled medium checking globally and we need to use this mimefilter 696 * b) the user enabled medium checking globally and we need to use this mimefilter
697 * c) the user enabled medium checking on a per medium bases 697 * c) the user enabled medium checking on a per medium bases
698 * c1) we already checked and its not ask again turns 698 * c1) we already checked and its not ask again turns
699 * c2) we need to ask and then apply the mimefilter 699 * c2) we need to ask and then apply the mimefilter
700 */ 700 */
701void Launcher::loadDocs() // ok here comes a hack belonging to Global:: 701void Launcher::loadDocs() // ok here comes a hack belonging to Global::
702{ 702{
703 delete docsFolder; 703 delete docsFolder;
704 docsFolder = new DocLnkSet; 704 docsFolder = new DocLnkSet;
705 705
706 DocLnkSet *tmp = 0; 706 DocLnkSet *tmp = 0;
707 QString home = QString(getenv("HOME")) + "/Documents"; 707 QString home = QString(getenv("HOME")) + "/Documents";
708 tmp = new DocLnkSet( home , QString::null); 708 tmp = new DocLnkSet( home , QString::null);
709 docsFolder->appendFrom( *tmp ); 709 docsFolder->appendFrom( *tmp );
710 delete tmp; 710 delete tmp;
711 711
712 // RAM documents 712 // RAM documents
713 StorageInfo storage; 713 StorageInfo storage;
714 const QList<FileSystem> &fileSystems = storage.fileSystems(); 714 const QList<FileSystem> &fileSystems = storage.fileSystems();
715 QListIterator<FileSystem> it ( fileSystems ); 715 QListIterator<FileSystem> it ( fileSystems );
716 716
717 for ( ; it.current(); ++it ) { 717 for ( ; it.current(); ++it ) {
718 if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) { 718 if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) {
719 tmp = new DocLnkSet( (*it)->path(), QString::null ); 719 tmp = new DocLnkSet( (*it)->path(), QString::null );
720 docsFolder->appendFrom( *tmp ); 720 docsFolder->appendFrom( *tmp );
721 delete tmp; 721 delete tmp;
722 } 722 }
723 } 723 }
724 724
725 Config mediumCfg( "medium"); 725 Config mediumCfg( "medium");
726 mediumCfg.setGroup("main"); 726 mediumCfg.setGroup("main");
727 // a) -zecke we don't want to check 727 // a) -zecke we don't want to check
728 if(!mediumCfg.readBoolEntry("use", true ) ) 728 if(!mediumCfg.readBoolEntry("use", true ) )
729 return; 729 return;
730 730
731 // find out wich filesystems are new in this round 731 // find out wich filesystems are new in this round
732 // We will do this by having a timestamp inside each mountpoint 732 // We will do this by having a timestamp inside each mountpoint
733 // if the current timestamp doesn't match this is a new file system and 733 // if the current timestamp doesn't match this is a new file system and
734 // come up with our MediumMountGui :) let the hacking begin 734 // come up with our MediumMountGui :) let the hacking begin
735 int stamp = uidgen.generate(); 735 int stamp = uidgen.generate();
@@ -854,371 +854,376 @@ void Launcher::properties( AppLnk *appLnk )
854 if ( appLnk->type() == "Folder" ) { // No tr 854 if ( appLnk->type() == "Folder" ) { // No tr
855 // Not supported: flat is simpler for the user 855 // Not supported: flat is simpler for the user
856 } else { 856 } else {
857 in_lnk_props = TRUE; 857 in_lnk_props = TRUE;
858 got_lnk_change = FALSE; 858 got_lnk_change = FALSE;
859 LnkProperties prop(appLnk); 859 LnkProperties prop(appLnk);
860 connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); 860 connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *)));
861 prop.showMaximized(); 861 prop.showMaximized();
862 prop.exec(); 862 prop.exec();
863 in_lnk_props = FALSE; 863 in_lnk_props = FALSE;
864 if ( got_lnk_change ) { 864 if ( got_lnk_change ) {
865 updateLink(lnk_change); 865 updateLink(lnk_change);
866 } 866 }
867 } 867 }
868} 868}
869 869
870void Launcher::updateLink(const QString& link) 870void Launcher::updateLink(const QString& link)
871{ 871{
872 if (link.isNull()) 872 if (link.isNull())
873 updateTabs(); 873 updateTabs();
874 else if (link.isEmpty()) 874 else if (link.isEmpty())
875 updateDocs(); 875 updateDocs();
876 else 876 else
877 tabs->updateLink(link); 877 tabs->updateLink(link);
878} 878}
879 879
880void Launcher::systemMessage( const QCString &msg, const QByteArray &data) 880void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
881{ 881{
882 QDataStream stream( data, IO_ReadOnly ); 882 QDataStream stream( data, IO_ReadOnly );
883 if ( msg == "linkChanged(QString)" ) { 883 if ( msg == "linkChanged(QString)" ) {
884 QString link; 884 QString link;
885 stream >> link; 885 stream >> link;
886 if ( in_lnk_props ) { 886 if ( in_lnk_props ) {
887 got_lnk_change = TRUE; 887 got_lnk_change = TRUE;
888 lnk_change = link; 888 lnk_change = link;
889 } else { 889 } else {
890 updateLink(link); 890 updateLink(link);
891 } 891 }
892 } else if ( msg == "busy()" ) { 892 } else if ( msg == "busy()" ) {
893 emit busy(); 893 emit busy();
894 } else if ( msg == "notBusy(QString)" ) { 894 } else if ( msg == "notBusy(QString)" ) {
895 QString app; 895 QString app;
896 stream >> app; 896 stream >> app;
897 tabs->setBusy(FALSE); 897 tabs->setBusy(FALSE);
898 emit notBusy(app); 898 emit notBusy(app);
899 } else if ( msg == "mkdir(QString)" ) { 899 } else if ( msg == "mkdir(QString)" ) {
900 QString dir; 900 QString dir;
901 stream >> dir; 901 stream >> dir;
902 if ( !dir.isEmpty() ) 902 if ( !dir.isEmpty() )
903 mkdir( dir ); 903 mkdir( dir );
904 } else if ( msg == "rdiffGenSig(QString,QString)" ) { 904 } else if ( msg == "rdiffGenSig(QString,QString)" ) {
905 QString baseFile, sigFile; 905 QString baseFile, sigFile;
906 stream >> baseFile >> sigFile; 906 stream >> baseFile >> sigFile;
907 QRsync::generateSignature( baseFile, sigFile ); 907 QRsync::generateSignature( baseFile, sigFile );
908 } else if ( msg == "rdiffGenDiff(QString,QString,QString)" ) { 908 } else if ( msg == "rdiffGenDiff(QString,QString,QString)" ) {
909 QString baseFile, sigFile, deltaFile; 909 QString baseFile, sigFile, deltaFile;
910 stream >> baseFile >> sigFile >> deltaFile; 910 stream >> baseFile >> sigFile >> deltaFile;
911 QRsync::generateDiff( baseFile, sigFile, deltaFile ); 911 QRsync::generateDiff( baseFile, sigFile, deltaFile );
912 } else if ( msg == "rdiffApplyPatch(QString,QString)" ) { 912 } else if ( msg == "rdiffApplyPatch(QString,QString)" ) {
913 QString baseFile, deltaFile; 913 QString baseFile, deltaFile;
914 stream >> baseFile >> deltaFile; 914 stream >> baseFile >> deltaFile;
915 if ( !QFile::exists( baseFile ) ) { 915 if ( !QFile::exists( baseFile ) ) {
916 QFile f( baseFile ); 916 QFile f( baseFile );
917 f.open( IO_WriteOnly ); 917 f.open( IO_WriteOnly );
918 f.close(); 918 f.close();
919 } 919 }
920 QRsync::applyDiff( baseFile, deltaFile ); 920 QRsync::applyDiff( baseFile, deltaFile );
921#ifndef QT_NO_COP 921#ifndef QT_NO_COP
922 QCopEnvelope e( "QPE/Desktop", "patchApplied(QString)" ); 922 QCopEnvelope e( "QPE/Desktop", "patchApplied(QString)" );
923 e << baseFile; 923 e << baseFile;
924#endif 924#endif
925 } else if ( msg == "rdiffCleanup()" ) { 925 } else if ( msg == "rdiffCleanup()" ) {
926 mkdir( "/tmp/rdiff" ); 926 mkdir( "/tmp/rdiff" );
927 QDir dir; 927 QDir dir;
928 dir.setPath( "/tmp/rdiff" ); 928 dir.setPath( "/tmp/rdiff" );
929 QStringList entries = dir.entryList(); 929 QStringList entries = dir.entryList();
930 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) 930 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
931 dir.remove( *it ); 931 dir.remove( *it );
932 } else if ( msg == "sendHandshakeInfo()" ) { 932 } else if ( msg == "sendHandshakeInfo()" ) {
933 QString home = getenv( "HOME" ); 933 QString home = getenv( "HOME" );
934#ifndef QT_NO_COP 934#ifndef QT_NO_COP
935 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" ); 935 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" );
936 e << home; 936 e << home;
937 int locked = (int) Desktop::screenLocked(); 937 int locked = (int) Desktop::screenLocked();
938 e << locked; 938 e << locked;
939#endif 939#endif
940 } else if ( msg == "autoStart(QString)" ) { 940 } else if ( msg == "autoStart(QString)" ) {
941 QString appName; 941 QString appName;
942 stream >> appName; 942 stream >> appName;
943 Config cfg( "autostart" ); 943 Config cfg( "autostart" );
944 cfg.setGroup( "AutoStart" ); 944 cfg.setGroup( "AutoStart" );
945 if ( appName.compare("clear") == 0){ 945 if ( appName.compare("clear") == 0){
946 cfg.writeEntry("Apps", ""); 946 cfg.writeEntry("Apps", "");
947 } 947 }
948 } else if ( msg == "autoStart(QString,QString)" ) { 948 } else if ( msg == "autoStart(QString,QString)" ) {
949 QString modifier, appName; 949 QString modifier, appName;
950 stream >> modifier >> appName; 950 stream >> modifier >> appName;
951 Config cfg( "autostart" ); 951 Config cfg( "autostart" );
952 cfg.setGroup( "AutoStart" ); 952 cfg.setGroup( "AutoStart" );
953 if ( modifier.compare("add") == 0 ){ 953 if ( modifier.compare("add") == 0 ){
954 // only add if appname is entered 954 // only add if appname is entered
955 if (!appName.isEmpty()) { 955 if (!appName.isEmpty()) {
956 cfg.writeEntry("Apps", appName); 956 cfg.writeEntry("Apps", appName);
957 } 957 }
958 } else if (modifier.compare("remove") == 0 ) { 958 } else if (modifier.compare("remove") == 0 ) {
959 // need to change for multiple entries 959 // need to change for multiple entries
960 // actually remove is right now simular to clear, but in future there 960 // actually remove is right now simular to clear, but in future there
961 // should be multiple apps in autostart possible. 961 // should be multiple apps in autostart possible.
962 QString checkName; 962 QString checkName;
963 checkName = cfg.readEntry("Apps", ""); 963 checkName = cfg.readEntry("Apps", "");
964 if (checkName == appName) { 964 if (checkName == appName) {
965 cfg.writeEntry("Apps", ""); 965 cfg.writeEntry("Apps", "");
966 } 966 }
967 } 967 }
968 // case the autostart feature should be delayed 968 // case the autostart feature should be delayed
969 } else if ( msg == "autoStart(QString,QString,QString)") { 969 } else if ( msg == "autoStart(QString,QString,QString)") {
970 QString modifier, appName, delay; 970 QString modifier, appName, delay;
971 stream >> modifier >> appName >> delay; 971 stream >> modifier >> appName >> delay;
972 Config cfg( "autostart" ); 972 Config cfg( "autostart" );
973 cfg.setGroup( "AutoStart" ); 973 cfg.setGroup( "AutoStart" );
974 if ( modifier.compare("add") == 0 ){ 974 if ( modifier.compare("add") == 0 ){
975 // only add it appname is entered 975 // only add it appname is entered
976 if (!appName.isEmpty()) { 976 if (!appName.isEmpty()) {
977 cfg.writeEntry("Apps", appName); 977 cfg.writeEntry("Apps", appName);
978 cfg.writeEntry("Delay", delay); 978 cfg.writeEntry("Delay", delay);
979 } 979 }
980 } else { 980 } else {
981 } 981 }
982 } else if ( msg == "sendVersionInfo()" ) { 982 }
983 /*
984 * QtopiaDesktop relies on the major number
985 * to start with 1. We're at 0.9
986 * so wee need to fake at least 1.4 to be able
987 * to sync with QtopiaDesktop1.6
988 */
989 else if ( msg == "sendVersionInfo()" ) {
983 QCopEnvelope e( "QPE/Desktop", "versionInfo(QString)" ); 990 QCopEnvelope e( "QPE/Desktop", "versionInfo(QString)" );
984 QString v = QPE_VERSION; 991 QString v2 = QString::fromLatin1("1.4");
985 QStringList l = QStringList::split( '.', v );
986 QString v2 = l[0] + '.' + l[1];
987 e << v2; 992 e << v2;
988 //qDebug("version %s\n", line.latin1()); 993 //qDebug("version %s\n", line.latin1());
989 } else if ( msg == "sendCardInfo()" ) { 994 } else if ( msg == "sendCardInfo()" ) {
990#ifndef QT_NO_COP 995#ifndef QT_NO_COP
991 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" ); 996 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" );
992#endif 997#endif
993 const QList<FileSystem> &fs = storage->fileSystems(); 998 const QList<FileSystem> &fs = storage->fileSystems();
994 QListIterator<FileSystem> it ( fs ); 999 QListIterator<FileSystem> it ( fs );
995 QString s; 1000 QString s;
996 QString homeDir = getenv("HOME"); 1001 QString homeDir = getenv("HOME");
997 QString hardDiskHome, hardDiskHomePath; 1002 QString hardDiskHome, hardDiskHomePath;
998 for ( ; it.current(); ++it ) { 1003 for ( ; it.current(); ++it ) {
999 int k4 = (*it)->blockSize()/256; 1004 int k4 = (*it)->blockSize()/256;
1000 if ( (*it)->isRemovable() || (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs") { 1005 if ( (*it)->isRemovable() || (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs") {
1001 s += (*it)->name() + "=" + (*it)->path() + "/Documents " 1006 s += (*it)->name() + "=" + (*it)->path() + "/Documents "
1002 + QString::number( (*it)->availBlocks() * k4/4 ) 1007 + QString::number( (*it)->availBlocks() * k4/4 )
1003 + "K " + (*it)->options() + ";"; 1008 + "K " + (*it)->options() + ";";
1004 } else if ( (*it)->disk() == "/dev/mtdblock1" || 1009 } else if ( (*it)->disk() == "/dev/mtdblock1" ||
1005 (*it)->disk() == "/dev/mtdblock/1" ) { 1010 (*it)->disk() == "/dev/mtdblock/1" ) {
1006 s += (*it)->name() + "=" + homeDir + "/Documents " 1011 s += (*it)->name() + "=" + homeDir + "/Documents "
1007 + QString::number( (*it)->availBlocks() * k4/4 ) 1012 + QString::number( (*it)->availBlocks() * k4/4 )
1008 + "K " + (*it)->options() + ";"; 1013 + "K " + (*it)->options() + ";";
1009 } else if ( (*it)->name().contains( "Hard Disk") && 1014 } else if ( (*it)->name().contains( "Hard Disk") &&
1010 homeDir.contains( (*it)->path() ) && 1015 homeDir.contains( (*it)->path() ) &&
1011 (*it)->path().length() > hardDiskHomePath.length() ) { 1016 (*it)->path().length() > hardDiskHomePath.length() ) {
1012 hardDiskHomePath = (*it)->path(); 1017 hardDiskHomePath = (*it)->path();
1013 hardDiskHome = 1018 hardDiskHome =
1014 (*it)->name() + "=" + homeDir + "/Documents " 1019 (*it)->name() + "=" + homeDir + "/Documents "
1015 + QString::number( (*it)->availBlocks() * k4/4 ) 1020 + QString::number( (*it)->availBlocks() * k4/4 )
1016 + "K " + (*it)->options() + ";"; 1021 + "K " + (*it)->options() + ";";
1017 } 1022 }
1018 } 1023 }
1019 if ( !hardDiskHome.isEmpty() ) 1024 if ( !hardDiskHome.isEmpty() )
1020 s += hardDiskHome; 1025 s += hardDiskHome;
1021 1026
1022#ifndef QT_NO_COP 1027#ifndef QT_NO_COP
1023 e << s; 1028 e << s;
1024#endif 1029#endif
1025 } else if ( msg == "sendSyncDate(QString)" ) { 1030 } else if ( msg == "sendSyncDate(QString)" ) {
1026 QString app; 1031 QString app;
1027 stream >> app; 1032 stream >> app;
1028 Config cfg( "qpe" ); 1033 Config cfg( "qpe" );
1029 cfg.setGroup("SyncDate"); 1034 cfg.setGroup("SyncDate");
1030#ifndef QT_NO_COP 1035#ifndef QT_NO_COP
1031 QCopEnvelope e( "QPE/Desktop", "syncDate(QString,QString)" ); 1036 QCopEnvelope e( "QPE/Desktop", "syncDate(QString,QString)" );
1032 e << app << cfg.readEntry( app ); 1037 e << app << cfg.readEntry( app );
1033#endif 1038#endif
1034 //qDebug("QPE/System sendSyncDate for %s: response %s", app.latin1(), 1039 //qDebug("QPE/System sendSyncDate for %s: response %s", app.latin1(),
1035 //cfg.readEntry( app ).latin1() ); 1040 //cfg.readEntry( app ).latin1() );
1036 } else if ( msg == "setSyncDate(QString,QString)" ) { 1041 } else if ( msg == "setSyncDate(QString,QString)" ) {
1037 QString app, date; 1042 QString app, date;
1038 stream >> app >> date; 1043 stream >> app >> date;
1039 Config cfg( "qpe" ); 1044 Config cfg( "qpe" );
1040 cfg.setGroup("SyncDate"); 1045 cfg.setGroup("SyncDate");
1041 cfg.writeEntry( app, date ); 1046 cfg.writeEntry( app, date );
1042 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1()); 1047 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1());
1043 } else if ( msg == "startSync(QString)" ) { 1048 } else if ( msg == "startSync(QString)" ) {
1044 QString what; 1049 QString what;
1045 stream >> what; 1050 stream >> what;
1046 delete syncDialog; syncDialog = 0; 1051 delete syncDialog; syncDialog = 0;
1047 syncDialog = new SyncDialog( this, "syncProgress", FALSE, 1052 syncDialog = new SyncDialog( this, "syncProgress", FALSE,
1048 WStyle_Tool | WStyle_Customize | 1053 WStyle_Tool | WStyle_Customize |
1049 Qt::WStyle_StaysOnTop ); 1054 Qt::WStyle_StaysOnTop );
1050 syncDialog->showMaximized(); 1055 syncDialog->showMaximized();
1051 syncDialog->whatLabel->setText( "<b>" + what + "</b>" ); 1056 syncDialog->whatLabel->setText( "<b>" + what + "</b>" );
1052 connect( syncDialog->buttonCancel, SIGNAL( clicked() ), 1057 connect( syncDialog->buttonCancel, SIGNAL( clicked() ),
1053 SLOT( cancelSync() ) ); 1058 SLOT( cancelSync() ) );
1054 } else if ( msg == "stopSync()") { 1059 } else if ( msg == "stopSync()") {
1055 delete syncDialog; syncDialog = 0; 1060 delete syncDialog; syncDialog = 0;
1056 } else if ( msg == "getAllDocLinks()" ) { 1061 } else if ( msg == "getAllDocLinks()" ) {
1057 loadDocs(); 1062 loadDocs();
1058 1063
1059 QString contents; 1064 QString contents;
1060 1065
1061 //Categories cats; 1066 //Categories cats;
1062 for ( QListIterator<DocLnk> it( docsFolder->children() ); it.current(); ++it ) { 1067 for ( QListIterator<DocLnk> it( docsFolder->children() ); it.current(); ++it ) {
1063 DocLnk *doc = it.current(); 1068 DocLnk *doc = it.current();
1064 QFileInfo fi( doc->file() ); 1069 QFileInfo fi( doc->file() );
1065 if ( !fi.exists() ) 1070 if ( !fi.exists() )
1066 continue; 1071 continue;
1067 1072
1068 bool fake = !doc->linkFileKnown(); 1073 bool fake = !doc->linkFileKnown();
1069 if ( !fake ) { 1074 if ( !fake ) {
1070 QFile f( doc->linkFile() ); 1075 QFile f( doc->linkFile() );
1071 if ( f.open( IO_ReadOnly ) ) { 1076 if ( f.open( IO_ReadOnly ) ) {
1072 QTextStream ts( &f ); 1077 QTextStream ts( &f );
1073 ts.setEncoding( QTextStream::UnicodeUTF8 ); 1078 ts.setEncoding( QTextStream::UnicodeUTF8 );
1074 contents += ts.read(); 1079 contents += ts.read();
1075 f.close(); 1080 f.close();
1076 } else 1081 } else
1077 fake = TRUE; 1082 fake = TRUE;
1078 } 1083 }
1079 if (fake) { 1084 if (fake) {
1080 contents += "[Desktop Entry]\n"; 1085 contents += "[Desktop Entry]\n";
1081 contents += "Categories = " + // No tr 1086 contents += "Categories = " + // No tr
1082 // cats.labels("Document View",doc->categories()).join(";") + "\n"; // No tr 1087 // cats.labels("Document View",doc->categories()).join(";") + "\n"; // No tr
1083 Qtopia::Record::idsToString( doc->categories() ) + "\n"; 1088 Qtopia::Record::idsToString( doc->categories() ) + "\n";
1084 contents += "Name = "+doc->name()+"\n"; // No tr 1089 contents += "Name = "+doc->name()+"\n"; // No tr
1085 contents += "Type = "+doc->type()+"\n"; // No tr 1090 contents += "Type = "+doc->type()+"\n"; // No tr
1086 } 1091 }
1087 contents += "File = "+doc->file()+"\n"; // No tr // (resolves path) 1092 contents += "File = "+doc->file()+"\n"; // No tr // (resolves path)
1088 contents += QString("Size = %1\n").arg( fi.size() ); // No tr 1093 contents += QString("Size = %1\n").arg( fi.size() ); // No tr
1089 } 1094 }
1090 1095
1091 //qDebug( "sending length %d", contents.length() ); 1096 //qDebug( "sending length %d", contents.length() );
1092#ifndef QT_NO_COP 1097#ifndef QT_NO_COP
1093 QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" ); 1098 QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" );
1094 e << contents; 1099 e << contents;
1095#endif 1100#endif
1096 1101
1097 //qDebug( "================ \n\n%s\n\n===============", 1102 //qDebug( "================ \n\n%s\n\n===============",
1098 //contents.latin1() ); 1103 //contents.latin1() );
1099 1104
1100 delete docsFolder; 1105 delete docsFolder;
1101 docsFolder = 0; 1106 docsFolder = 0;
1102#ifdef QWS 1107#ifdef QWS
1103 } else if ( msg == "setMouseProto(QString)" ) { 1108 } else if ( msg == "setMouseProto(QString)" ) {
1104 QString mice; 1109 QString mice;
1105 stream >> mice; 1110 stream >> mice;
1106 setenv("QWS_MOUSE_PROTO",mice.latin1(),1); 1111 setenv("QWS_MOUSE_PROTO",mice.latin1(),1);
1107 qwsServer->openMouse(); 1112 qwsServer->openMouse();
1108 } else if ( msg == "setKeyboard(QString)" ) { 1113 } else if ( msg == "setKeyboard(QString)" ) {
1109 QString kb; 1114 QString kb;
1110 stream >> kb; 1115 stream >> kb;
1111 setenv("QWS_KEYBOARD",kb.latin1(),1); 1116 setenv("QWS_KEYBOARD",kb.latin1(),1);
1112 qwsServer->openKeyboard(); 1117 qwsServer->openKeyboard();
1113#endif 1118#endif
1114 } 1119 }
1115} 1120}
1116 1121
1117void Launcher::cancelSync() 1122void Launcher::cancelSync()
1118{ 1123{
1119#ifndef QT_NO_COP 1124#ifndef QT_NO_COP
1120 QCopEnvelope e( "QPE/Desktop", "cancelSync()" ); 1125 QCopEnvelope e( "QPE/Desktop", "cancelSync()" );
1121#endif 1126#endif
1122} 1127}
1123 1128
1124void Launcher::launcherMessage( const QCString &msg, const QByteArray &data) 1129void Launcher::launcherMessage( const QCString &msg, const QByteArray &data)
1125{ 1130{
1126 QDataStream stream( data, IO_ReadOnly ); 1131 QDataStream stream( data, IO_ReadOnly );
1127 if ( msg == "setTabView(QString,int)" ) { 1132 if ( msg == "setTabView(QString,int)" ) {
1128 QString id; 1133 QString id;
1129 stream >> id; 1134 stream >> id;
1130 int mode; 1135 int mode;
1131 stream >> mode; 1136 stream >> mode;
1132 if ( tabs->view(id) ) 1137 if ( tabs->view(id) )
1133 tabs->view(id)->setViewMode( (LauncherView::ViewMode)mode ); 1138 tabs->view(id)->setViewMode( (LauncherView::ViewMode)mode );
1134 } else if ( msg == "setTabBackground(QString,int,QString)" ) { 1139 } else if ( msg == "setTabBackground(QString,int,QString)" ) {
1135 QString id; 1140 QString id;
1136 stream >> id; 1141 stream >> id;
1137 int mode; 1142 int mode;
1138 stream >> mode; 1143 stream >> mode;
1139 QString pixmapOrColor; 1144 QString pixmapOrColor;
1140 stream >> pixmapOrColor; 1145 stream >> pixmapOrColor;
1141 if ( tabs->view(id) ) 1146 if ( tabs->view(id) )
1142 tabs->view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); 1147 tabs->view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor );
1143 } else if ( msg == "setTextColor(QString,QString)" ) { 1148 } else if ( msg == "setTextColor(QString,QString)" ) {
1144 QString id; 1149 QString id;
1145 stream >> id; 1150 stream >> id;
1146 QString color; 1151 QString color;
1147 stream >> color; 1152 stream >> color;
1148 if ( tabs->view(id) ) 1153 if ( tabs->view(id) )
1149 tabs->view(id)->setTextColor( QColor(color) ); 1154 tabs->view(id)->setTextColor( QColor(color) );
1150 } else if ( msg == "setFont(QString,QString,int,int,int)" ) { 1155 } else if ( msg == "setFont(QString,QString,int,int,int)" ) {
1151 QString id; 1156 QString id;
1152 stream >> id; 1157 stream >> id;
1153 QString fam; 1158 QString fam;
1154 stream >> fam; 1159 stream >> fam;
1155 int size; 1160 int size;
1156 stream >> size; 1161 stream >> size;
1157 int weight; 1162 int weight;
1158 stream >> weight; 1163 stream >> weight;
1159 int italic; 1164 int italic;
1160 stream >> italic; 1165 stream >> italic;
1161 if ( tabs->view(id) ) 1166 if ( tabs->view(id) )
1162 tabs->view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); 1167 tabs->view(id)->setViewFont( QFont(fam, size, weight, italic!=0) );
1163 qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic ); 1168 qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic );
1164 } 1169 }
1165} 1170}
1166 1171
1167void Launcher::storageChanged() 1172void Launcher::storageChanged()
1168{ 1173{
1169 if ( in_lnk_props ) { 1174 if ( in_lnk_props ) {
1170 got_lnk_change = TRUE; 1175 got_lnk_change = TRUE;
1171 lnk_change = QString::null; 1176 lnk_change = QString::null;
1172 } else { 1177 } else {
1173 updateLink( QString::null ); 1178 updateLink( QString::null );
1174 } 1179 }
1175} 1180}
1176 1181
1177 1182
1178bool Launcher::mkdir(const QString &localPath) 1183bool Launcher::mkdir(const QString &localPath)
1179{ 1184{
1180 QDir fullDir(localPath); 1185 QDir fullDir(localPath);
1181 if (fullDir.exists()) 1186 if (fullDir.exists())
1182 return true; 1187 return true;
1183 1188
1184 // at this point the directory doesn't exist 1189 // at this point the directory doesn't exist
1185 // go through the directory tree and start creating the direcotories 1190 // go through the directory tree and start creating the direcotories
1186 // that don't exist; if we can't create the directories, return false 1191 // that don't exist; if we can't create the directories, return false
1187 1192
1188 QString dirSeps = "/"; 1193 QString dirSeps = "/";
1189 int dirIndex = localPath.find(dirSeps); 1194 int dirIndex = localPath.find(dirSeps);
1190 QString checkedPath; 1195 QString checkedPath;
1191 1196
1192 // didn't find any seps; weird, use the cur dir instead 1197 // didn't find any seps; weird, use the cur dir instead
1193 if (dirIndex == -1) { 1198 if (dirIndex == -1) {
1194 //qDebug("No seperators found in path %s", localPath.latin1()); 1199 //qDebug("No seperators found in path %s", localPath.latin1());
1195 checkedPath = QDir::currentDirPath(); 1200 checkedPath = QDir::currentDirPath();
1196 } 1201 }
1197 1202
1198 while (checkedPath != localPath) { 1203 while (checkedPath != localPath) {
1199 // no more seperators found, use the local path 1204 // no more seperators found, use the local path
1200 if (dirIndex == -1) 1205 if (dirIndex == -1)
1201 checkedPath = localPath; 1206 checkedPath = localPath;
1202 else { 1207 else {
1203 // the next directory to check 1208 // the next directory to check
1204 checkedPath = localPath.left(dirIndex) + "/"; 1209 checkedPath = localPath.left(dirIndex) + "/";
1205 // advance the iterator; the next dir seperator 1210 // advance the iterator; the next dir seperator
1206 dirIndex = localPath.find(dirSeps, dirIndex+1); 1211 dirIndex = localPath.find(dirSeps, dirIndex+1);
1207 } 1212 }
1208 1213
1209 QDir checkDir(checkedPath); 1214 QDir checkDir(checkedPath);
1210 if (!checkDir.exists()) { 1215 if (!checkDir.exists()) {
1211 //qDebug("mkdir making dir %s", checkedPath.latin1()); 1216 //qDebug("mkdir making dir %s", checkedPath.latin1());
1212 1217
1213 if (!checkDir.mkdir(checkedPath)) { 1218 if (!checkDir.mkdir(checkedPath)) {
1214 qDebug("Unable to make directory %s", checkedPath.latin1()); 1219 qDebug("Unable to make directory %s", checkedPath.latin1());
1215 return FALSE; 1220 return FALSE;
1216 } 1221 }
1217 } 1222 }
1218 1223
1219 } 1224 }
1220 return TRUE; 1225 return TRUE;
1221} 1226}
1222 1227
1223void Launcher::preloadApps() 1228void Launcher::preloadApps()
1224{ 1229{