summaryrefslogtreecommitdiff
authorleseb <leseb>2002-08-30 19:03:23 (UTC)
committer leseb <leseb>2002-08-30 19:03:23 (UTC)
commit2922e5f8c94cf459c75c631a2ec0a4aedc570e67 (patch) (unidiff)
tree85a9e48607a4d1a1a2a3464b135ade74a2619e92
parentf082457be1262b6f96ee4ebfab570f5c8200a11f (diff)
downloadopie-2922e5f8c94cf459c75c631a2ec0a4aedc570e67.zip
opie-2922e5f8c94cf459c75c631a2ec0a4aedc570e67.tar.gz
opie-2922e5f8c94cf459c75c631a2ec0a4aedc570e67.tar.bz2
View docs in RAM
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 02124d2..effcd24 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -495,159 +495,169 @@ Launcher::~Launcher()
495 495
496static bool isVisibleWindow(int wid) 496static bool isVisibleWindow(int wid)
497{ 497{
498 const QList<QWSWindow> &list = qwsServer->clientWindows(); 498 const QList<QWSWindow> &list = qwsServer->clientWindows();
499 QWSWindow* w; 499 QWSWindow* w;
500 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { 500 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
501 if ( w->winId() == wid ) 501 if ( w->winId() == wid )
502 return !w->isFullyObscured(); 502 return !w->isFullyObscured();
503 } 503 }
504 return FALSE; 504 return FALSE;
505} 505}
506 506
507void Launcher::showMaximized() 507void Launcher::showMaximized()
508{ 508{
509 if ( isVisibleWindow( winId() ) ) 509 if ( isVisibleWindow( winId() ) )
510 doMaximize(); 510 doMaximize();
511 else 511 else
512 QTimer::singleShot( 20, this, SLOT(doMaximize()) ); 512 QTimer::singleShot( 20, this, SLOT(doMaximize()) );
513} 513}
514 514
515void Launcher::doMaximize() 515void Launcher::doMaximize()
516{ 516{
517 QMainWindow::showMaximized(); 517 QMainWindow::showMaximized();
518} 518}
519 519
520void Launcher::updateMimeTypes() 520void Launcher::updateMimeTypes()
521{ 521{
522 MimeType::clear(); 522 MimeType::clear();
523 updateMimeTypes(rootFolder); 523 updateMimeTypes(rootFolder);
524} 524}
525 525
526void Launcher::updateMimeTypes(AppLnkSet* folder) 526void Launcher::updateMimeTypes(AppLnkSet* folder)
527{ 527{
528 for ( QListIterator<AppLnk> it( folder->children() ); it.current(); ++it ) { 528 for ( QListIterator<AppLnk> it( folder->children() ); it.current(); ++it ) {
529 AppLnk *app = it.current(); 529 AppLnk *app = it.current();
530 if ( app->type() == "Folder" ) 530 if ( app->type() == "Folder" )
531 updateMimeTypes((AppLnkSet *)app); 531 updateMimeTypes((AppLnkSet *)app);
532 else { 532 else {
533 MimeType::registerApp(*app); 533 MimeType::registerApp(*app);
534 } 534 }
535 } 535 }
536} 536}
537/** This is a HACK.... 537/** This is a HACK....
538 * Reason: scanning huge mediums, microdirvers for examples 538 * Reason: scanning huge mediums, microdirvers for examples
539 * consomes time. To avoid that we invented the MediumMountCheck 539 * consomes time. To avoid that we invented the MediumMountCheck
540 * 540 *
541 * a) the user globally disabled medium checking. We can ignore 541 * a) the user globally disabled medium checking. We can ignore
542 * all removable medium 542 * all removable medium
543 * b) the user enabled medium checking globally and we need to use this mimefilter 543 * b) the user enabled medium checking globally and we need to use this mimefilter
544 * c) the user enabled medium checking on a per medium bases 544 * c) the user enabled medium checking on a per medium bases
545 * c1) we already checked and its not ask again turns 545 * c1) we already checked and its not ask again turns
546 * c2) we need to ask and then apply the mimefilter 546 * c2) we need to ask and then apply the mimefilter
547 */ 547 */
548void Launcher::loadDocs() // ok here comes a hack belonging to Global:: 548void Launcher::loadDocs() // ok here comes a hack belonging to Global::
549{ 549{
550 delete docsFolder; 550 delete docsFolder;
551 docsFolder = new DocLnkSet; 551 docsFolder = new DocLnkSet;
552 552
553 DocLnkSet *tmp = 0; 553 DocLnkSet *tmp = 0;
554 QString home = QString(getenv("HOME")) + "/Documents"; 554 QString home = QString(getenv("HOME")) + "/Documents";
555 tmp = new DocLnkSet( home , QString::null); 555 tmp = new DocLnkSet( home , QString::null);
556 docsFolder->appendFrom( *tmp ); 556 docsFolder->appendFrom( *tmp );
557 delete tmp; 557 delete tmp;
558 558
559 // RAM documents
560 StorageInfo storage;
561 const QList<FileSystem> &fileSystems = storage.fileSystems();
562 QListIterator<FileSystem> it ( fileSystems );
563
564 for ( ; it.current(); ++it ) {
565 if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) {
566 tmp = new DocLnkSet( (*it)->path(), QString::null );
567 docsFolder->appendFrom( *tmp );
568 delete tmp;
569 }
570 }
571
559 Config mediumCfg( "medium"); 572 Config mediumCfg( "medium");
560 mediumCfg.setGroup("main"); 573 mediumCfg.setGroup("main");
561 // a) -zecke we don't want to check 574 // a) -zecke we don't want to check
562 if(!mediumCfg.readBoolEntry("use", true ) ) 575 if(!mediumCfg.readBoolEntry("use", true ) )
563 return; 576 return;
564 577
565 // find out wich filesystems are new in this round 578 // find out wich filesystems are new in this round
566 // We will do this by having a timestamp inside each mountpoint 579 // We will do this by having a timestamp inside each mountpoint
567 // if the current timestamp doesn't match this is a new file system and 580 // if the current timestamp doesn't match this is a new file system and
568 // come up with our MediumMountGui :) let the hacking begin 581 // come up with our MediumMountGui :) let the hacking begin
569 int stamp = uidgen.generate(); 582 int stamp = uidgen.generate();
570 583
571 QString newStamp = QString::number( stamp ); // generates newtime Stamp 584 QString newStamp = QString::number( stamp ); // generates newtime Stamp
572 StorageInfo storage;
573 const QList<FileSystem> &fileSystems = storage.fileSystems();
574 QListIterator<FileSystem> it ( fileSystems );
575 585
576 // b) 586 // b)
577 if( mediumCfg.readBoolEntry("global", true ) ){ 587 if( mediumCfg.readBoolEntry("global", true ) ){
578 QString mime = configToMime(&mediumCfg).join(";"); 588 QString mime = configToMime(&mediumCfg).join(";");
579 for( ; it.current(); ++it ){ 589 for( it.toFirst(); it.current(); ++it ){
580 if( (*it)->isRemovable() ){ 590 if( (*it)->isRemovable() ){
581 tmp = new DocLnkSet( (*it)->path(), mime ); 591 tmp = new DocLnkSet( (*it)->path(), mime );
582 docsFolder->appendFrom( *tmp ); 592 docsFolder->appendFrom( *tmp );
583 delete tmp; 593 delete tmp;
584 } 594 }
585 } // done 595 } // done
586 return; // save the else 596 return; // save the else
587 } 597 }
588 // c) zecke 598 // c) zecke
589 for ( ; it.current(); ++it ) { 599 for ( it.toFirst(); it.current(); ++it ) {
590 if ( (*it)->isRemovable() ) { // let's find out if we should search on it 600 if ( (*it)->isRemovable() ) { // let's find out if we should search on it
591 Config cfg( (*it)->path() + "/.opiestorage.cf", Config::File); 601 Config cfg( (*it)->path() + "/.opiestorage.cf", Config::File);
592 cfg.setGroup("main"); 602 cfg.setGroup("main");
593 QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); 603 QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() );
594 /** This medium is uptodate 604 /** This medium is uptodate
595 */ 605 */
596 if( stamp == m_timeStamp ){ // ok we know this card 606 if( stamp == m_timeStamp ){ // ok we know this card
597 cfg.writeEntry("timestamp", newStamp ); //just write a new timestamp 607 cfg.writeEntry("timestamp", newStamp ); //just write a new timestamp
598 // we need to scan the list now. Hopefully the cache will be there 608 // we need to scan the list now. Hopefully the cache will be there
599 // read the mimetypes from the config and search for documents 609 // read the mimetypes from the config and search for documents
600 QStringList mimetypes = configToMime( &cfg); 610 QStringList mimetypes = configToMime( &cfg);
601 tmp = new DocLnkSet( (*it)->path(), mimetypes.join(";") ); 611 tmp = new DocLnkSet( (*it)->path(), mimetypes.join(";") );
602 docsFolder->appendFrom( *tmp ); 612 docsFolder->appendFrom( *tmp );
603 delete tmp; 613 delete tmp;
604 614
605 }else{ // come up with the gui cause this a new card 615 }else{ // come up with the gui cause this a new card
606 MediumMountGui medium(&cfg, (*it)->path() ); 616 MediumMountGui medium(&cfg, (*it)->path() );
607 if( medium.check() ){ // we did not ask before or ask again is off 617 if( medium.check() ){ // we did not ask before or ask again is off
608 /** c2) */ 618 /** c2) */
609 if( medium.exec() ){ // he clicked yes so search it 619 if( medium.exec() ){ // he clicked yes so search it
610 // speicher 620 // speicher
611 //cfg.read(); // cause of a race we need to reread - fixed 621 //cfg.read(); // cause of a race we need to reread - fixed
612 cfg.setGroup("main"); 622 cfg.setGroup("main");
613 cfg.writeEntry("timestamp", newStamp ); 623 cfg.writeEntry("timestamp", newStamp );
614 cfg.write(); 624 cfg.write();
615 tmp = new DocLnkSet( (*it)->path(), medium.mimeTypes().join(";" ) ); 625 tmp = new DocLnkSet( (*it)->path(), medium.mimeTypes().join(";" ) );
616 docsFolder->appendFrom( *tmp ); 626 docsFolder->appendFrom( *tmp );
617 delete tmp; 627 delete tmp;
618 }// no else 628 }// no else
619 /** c1) */ 629 /** c1) */
620 }else{ // we checked 630 }else{ // we checked
621 // do something different see what we need to do 631 // do something different see what we need to do
622 // let's see if we should check the device 632 // let's see if we should check the device
623 cfg.setGroup("main" ); 633 cfg.setGroup("main" );
624 bool check = cfg.readBoolEntry("autocheck", true ); 634 bool check = cfg.readBoolEntry("autocheck", true );
625 if( check ){ // find the documents 635 if( check ){ // find the documents
626 tmp = new DocLnkSet( (*it)->path(), configToMime(&cfg ).join(";") ); 636 tmp = new DocLnkSet( (*it)->path(), configToMime(&cfg ).join(";") );
627 docsFolder->appendFrom( *tmp ); 637 docsFolder->appendFrom( *tmp );
628 delete tmp; 638 delete tmp;
629 } 639 }
630 } 640 }
631 } 641 }
632 } 642 }
633 } 643 }
634 m_timeStamp = newStamp; 644 m_timeStamp = newStamp;
635} 645}
636 646
637void Launcher::updateTabs() 647void Launcher::updateTabs()
638{ 648{
639 MimeType::updateApplications(); // ### reads all applnks twice 649 MimeType::updateApplications(); // ### reads all applnks twice
640 650
641 delete rootFolder; 651 delete rootFolder;
642 rootFolder = new AppLnkSet( MimeType::appsFolderName() ); 652 rootFolder = new AppLnkSet( MimeType::appsFolderName() );
643 653
644 loadDocs(); 654 loadDocs();
645 655
646 tabs->initializeCategories(rootFolder, docsFolder, storage->fileSystems()); 656 tabs->initializeCategories(rootFolder, docsFolder, storage->fileSystems());
647} 657}
648 658
649void Launcher::updateDocs() 659void Launcher::updateDocs()
650{ 660{
651 loadDocs(); 661 loadDocs();
652 tabs->updateDocs(docsFolder,storage->fileSystems()); 662 tabs->updateDocs(docsFolder,storage->fileSystems());
653} 663}
@@ -766,138 +776,138 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
766 mkdir( "/tmp/rdiff" ); 776 mkdir( "/tmp/rdiff" );
767 QDir dir; 777 QDir dir;
768 dir.setPath( "/tmp/rdiff" ); 778 dir.setPath( "/tmp/rdiff" );
769 QStringList entries = dir.entryList(); 779 QStringList entries = dir.entryList();
770 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) 780 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
771 dir.remove( *it ); 781 dir.remove( *it );
772 } else if ( msg == "sendHandshakeInfo()" ) { 782 } else if ( msg == "sendHandshakeInfo()" ) {
773 QString home = getenv( "HOME" ); 783 QString home = getenv( "HOME" );
774 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" ); 784 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" );
775 e << home; 785 e << home;
776 int locked = (int) Desktop::screenLocked(); 786 int locked = (int) Desktop::screenLocked();
777 e << locked; 787 e << locked;
778 // register an app for autostart 788 // register an app for autostart
779 // if clear is send the list is cleared. 789 // if clear is send the list is cleared.
780 } else if ( msg == "autoStart(QString)" ) { 790 } else if ( msg == "autoStart(QString)" ) {
781 QString appName; 791 QString appName;
782 stream >> appName; 792 stream >> appName;
783 Config cfg( "autostart" ); 793 Config cfg( "autostart" );
784 cfg.setGroup( "AutoStart" ); 794 cfg.setGroup( "AutoStart" );
785 if ( appName.compare("clear") == 0){ 795 if ( appName.compare("clear") == 0){
786 cfg.writeEntry("Apps", ""); 796 cfg.writeEntry("Apps", "");
787 } 797 }
788 } else if ( msg == "autoStart(QString,QString)" ) { 798 } else if ( msg == "autoStart(QString,QString)" ) {
789 QString modifier, appName; 799 QString modifier, appName;
790 stream >> modifier >> appName; 800 stream >> modifier >> appName;
791 Config cfg( "autostart" ); 801 Config cfg( "autostart" );
792 cfg.setGroup( "AutoStart" ); 802 cfg.setGroup( "AutoStart" );
793 if ( modifier.compare("add") == 0 ){ 803 if ( modifier.compare("add") == 0 ){
794 // only add if appname is entered 804 // only add if appname is entered
795 if (!appName.isEmpty()) { 805 if (!appName.isEmpty()) {
796 cfg.writeEntry("Apps", appName); 806 cfg.writeEntry("Apps", appName);
797 } 807 }
798 } else if (modifier.compare("remove") == 0 ) { 808 } else if (modifier.compare("remove") == 0 ) {
799 // need to change for multiple entries 809 // need to change for multiple entries
800 // actually remove is right now simular to clear, but in future there 810 // actually remove is right now simular to clear, but in future there
801 // should be multiple apps in autostart possible. 811 // should be multiple apps in autostart possible.
802 QString checkName; 812 QString checkName;
803 checkName = cfg.readEntry("Apps", ""); 813 checkName = cfg.readEntry("Apps", "");
804 if (checkName == appName) { 814 if (checkName == appName) {
805 cfg.writeEntry("Apps", ""); 815 cfg.writeEntry("Apps", "");
806 } 816 }
807 } 817 }
808 // case the autostart feature should be delayed 818 // case the autostart feature should be delayed
809 } else if ( msg == "autoStart(QString,QString,QString)") { 819 } else if ( msg == "autoStart(QString,QString,QString)") {
810 QString modifier, appName, delay; 820 QString modifier, appName, delay;
811 stream >> modifier >> appName >> delay; 821 stream >> modifier >> appName >> delay;
812 Config cfg( "autostart" ); 822 Config cfg( "autostart" );
813 cfg.setGroup( "AutoStart" ); 823 cfg.setGroup( "AutoStart" );
814 if ( modifier.compare("add") == 0 ){ 824 if ( modifier.compare("add") == 0 ){
815 // only add it appname is entered 825 // only add it appname is entered
816 if (!appName.isEmpty()) { 826 if (!appName.isEmpty()) {
817 cfg.writeEntry("Apps", appName); 827 cfg.writeEntry("Apps", appName);
818 cfg.writeEntry("Delay", delay); 828 cfg.writeEntry("Delay", delay);
819 } 829 }
820 } else { 830 } else {
821 } 831 }
822 } else if ( msg == "sendCardInfo()" ) { 832 } else if ( msg == "sendCardInfo()" ) {
823 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" ); 833 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" );
824 const QList<FileSystem> &fs = storage->fileSystems(); 834 const QList<FileSystem> &fs = storage->fileSystems();
825 QListIterator<FileSystem> it ( fs ); 835 QListIterator<FileSystem> it ( fs );
826 QString s; 836 QString s;
827 QString homeDir = getenv("HOME"); 837 QString homeDir = getenv("HOME");
828 QString hardDiskHome; 838 QString hardDiskHome;
829 for ( ; it.current(); ++it ) { 839 for ( ; it.current(); ++it ) {
830 if ( (*it)->isRemovable() ) 840 if ( (*it)->isRemovable() || (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" )
831 s += (*it)->name() + "=" + (*it)->path() + "/Documents " 841 s += (*it)->name() + "=" + (*it)->path() + "/Documents "
832 + QString::number( (*it)->availBlocks() * (*it)->blockSize() ) 842 + QString::number( (*it)->availBlocks() * (*it)->blockSize() )
833 + " " + (*it)->options() + ";"; 843 + " " + (*it)->options() + ";";
834 else if ( (*it)->disk() == "/dev/mtdblock1" || 844 else if ( (*it)->disk() == "/dev/mtdblock1" ||
835 (*it)->disk() == "/dev/mtdblock/1" ) 845 (*it)->disk() == "/dev/mtdblock/1" )
836 s += (*it)->name() + "=" + homeDir + "/Documents " 846 s += (*it)->name() + "=" + homeDir + "/Documents "
837 + QString::number( (*it)->availBlocks() * (*it)->blockSize() ) 847 + QString::number( (*it)->availBlocks() * (*it)->blockSize() )
838 + " " + (*it)->options() + ";"; 848 + " " + (*it)->options() + ";";
839 else if ( (*it)->name().contains( "Hard Disk") && 849 else if ( (*it)->name().contains( tr("Hard Disk") ) &&
840 homeDir.contains( (*it)->path() ) && 850 homeDir.contains( (*it)->path() ) &&
841 (*it)->path().length() > hardDiskHome.length() ) 851 (*it)->path().length() > hardDiskHome.length() )
842 hardDiskHome = 852 hardDiskHome =
843 (*it)->name() + "=" + homeDir + "/Documents " 853 (*it)->name() + "=" + homeDir + "/Documents "
844 + QString::number( (*it)->availBlocks() * (*it)->blockSize() ) 854 + QString::number( (*it)->availBlocks() * (*it)->blockSize() )
845 + " " + (*it)->options() + ";"; 855 + " " + (*it)->options() + ";";
846 } 856 }
847 if ( !hardDiskHome.isEmpty() ) 857 if ( !hardDiskHome.isEmpty() )
848 s += hardDiskHome; 858 s += hardDiskHome;
849 859
850 e << s; 860 e << s;
851 } else if ( msg == "sendSyncDate(QString)" ) { 861 } else if ( msg == "sendSyncDate(QString)" ) {
852 QString app; 862 QString app;
853 stream >> app; 863 stream >> app;
854 Config cfg( "qpe" ); 864 Config cfg( "qpe" );
855 cfg.setGroup("SyncDate"); 865 cfg.setGroup("SyncDate");
856 QCopEnvelope e( "QPE/Desktop", "syncDate(QString,QString)" ); 866 QCopEnvelope e( "QPE/Desktop", "syncDate(QString,QString)" );
857 e << app << cfg.readEntry( app ); 867 e << app << cfg.readEntry( app );
858 //qDebug("QPE/System sendSyncDate for %s: response %s", app.latin1(), 868 //qDebug("QPE/System sendSyncDate for %s: response %s", app.latin1(),
859 //cfg.readEntry( app ).latin1() ); 869 //cfg.readEntry( app ).latin1() );
860 } else if ( msg == "setSyncDate(QString,QString)" ) { 870 } else if ( msg == "setSyncDate(QString,QString)" ) {
861 QString app, date; 871 QString app, date;
862 stream >> app >> date; 872 stream >> app >> date;
863 Config cfg( "qpe" ); 873 Config cfg( "qpe" );
864 cfg.setGroup("SyncDate"); 874 cfg.setGroup("SyncDate");
865 cfg.writeEntry( app, date ); 875 cfg.writeEntry( app, date );
866 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1()); 876 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1());
867 } else if ( msg == "startSync(QString)" ) { 877 } else if ( msg == "startSync(QString)" ) {
868 QString what; 878 QString what;
869 stream >> what; 879 stream >> what;
870 delete syncDialog; syncDialog = 0; 880 delete syncDialog; syncDialog = 0;
871 syncDialog = new SyncDialog( this, "syncProgress", FALSE, 881 syncDialog = new SyncDialog( this, "syncProgress", FALSE,
872 WStyle_Tool | WStyle_Customize | 882 WStyle_Tool | WStyle_Customize |
873 Qt::WStyle_StaysOnTop ); 883 Qt::WStyle_StaysOnTop );
874 syncDialog->showMaximized(); 884 syncDialog->showMaximized();
875 syncDialog->whatLabel->setText( "<b>" + what + "</b>" ); 885 syncDialog->whatLabel->setText( "<b>" + what + "</b>" );
876 connect( syncDialog->buttonCancel, SIGNAL( clicked() ), 886 connect( syncDialog->buttonCancel, SIGNAL( clicked() ),
877 SLOT( cancelSync() ) ); 887 SLOT( cancelSync() ) );
878 } else if ( msg == "stopSync()") { 888 } else if ( msg == "stopSync()") {
879 delete syncDialog; syncDialog = 0; 889 delete syncDialog; syncDialog = 0;
880 } else if ( msg == "getAllDocLinks()" ) { 890 } else if ( msg == "getAllDocLinks()" ) {
881 loadDocs(); 891 loadDocs();
882 892
883 QString contents; 893 QString contents;
884 894
885 for ( QListIterator<DocLnk> it( docsFolder->children() ); it.current(); ++it ) { 895 for ( QListIterator<DocLnk> it( docsFolder->children() ); it.current(); ++it ) {
886 DocLnk *doc = it.current(); 896 DocLnk *doc = it.current();
887 QFileInfo fi( doc->file() ); 897 QFileInfo fi( doc->file() );
888 if ( !fi.exists() ) 898 if ( !fi.exists() )
889 continue; 899 continue;
890 900
891 bool fake = !doc->linkFileKnown(); 901 bool fake = !doc->linkFileKnown();
892 if ( !fake ) { 902 if ( !fake ) {
893 QFile f( doc->linkFile() ); 903 QFile f( doc->linkFile() );
894 if ( f.open( IO_ReadOnly ) ) { 904 if ( f.open( IO_ReadOnly ) ) {
895 QTextStream ts( &f ); 905 QTextStream ts( &f );
896 ts.setEncoding( QTextStream::UnicodeUTF8 ); 906 ts.setEncoding( QTextStream::UnicodeUTF8 );
897 contents += ts.read(); 907 contents += ts.read();
898 f.close(); 908 f.close();
899 } else 909 } else
900 fake = TRUE; 910 fake = TRUE;
901 } 911 }
902 if (fake) { 912 if (fake) {
903 contents += "[Desktop Entry]\n"; 913 contents += "[Desktop Entry]\n";