summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-06-11 22:25:10 (UTC)
committer harlekin <harlekin>2002-06-11 22:25:10 (UTC)
commit7bace0e2b8613aaf229acea03107c68159cfa6de (patch) (unidiff)
treece295ce492a11e7ef71e5f16ef4e47fd0b311617
parent7ab79b2a607a0790d9ef040c76ae2687d9c5a3f8 (diff)
downloadopie-7bace0e2b8613aaf229acea03107c68159cfa6de.zip
opie-7bace0e2b8613aaf229acea03107c68159cfa6de.tar.gz
opie-7bace0e2b8613aaf229acea03107c68159cfa6de.tar.bz2
attempt to fix remove from autostart
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 59b38e3..e9e17f7 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -785,49 +785,49 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
785 if ( appName.compare("clear") == 0){ 785 if ( appName.compare("clear") == 0){
786 cfg.writeEntry("Apps", ""); 786 cfg.writeEntry("Apps", "");
787 } 787 }
788 } else if ( msg == "autoStart(QString,QString)" ) { 788 } else if ( msg == "autoStart(QString,QString)" ) {
789 QString modifier, appName; 789 QString modifier, appName;
790 stream >> modifier >> appName; 790 stream >> modifier >> appName;
791 Config cfg( "autostart" ); 791 Config cfg( "autostart" );
792 cfg.setGroup( "AutoStart" ); 792 cfg.setGroup( "AutoStart" );
793 if ( modifier.compare("add") == 0 ){ 793 if ( modifier.compare("add") == 0 ){
794 // only add if appname is entered 794 // only add if appname is entered
795 if (!appName.isEmpty()) { 795 if (!appName.isEmpty()) {
796 cfg.writeEntry("Apps", appName); 796 cfg.writeEntry("Apps", appName);
797 } 797 }
798 } else if (modifier.compare("remove") == 0 ) { 798 } else if (modifier.compare("remove") == 0 ) {
799 // need to change for multiple entries 799 // need to change for multiple entries
800 // actually remove is right now simular to clear, but in future there 800 // actually remove is right now simular to clear, but in future there
801 // should be multiple apps in autostart possible. 801 // should be multiple apps in autostart possible.
802 QString checkName; 802 QString checkName;
803 checkName = cfg.readEntry("Apps", ""); 803 checkName = cfg.readEntry("Apps", "");
804 if (checkName == appName) { 804 if (checkName == appName) {
805 cfg.writeEntry("Apps", ""); 805 cfg.writeEntry("Apps", "");
806 } 806 }
807 } 807 }
808 // case the autostart feature should be delayed 808 // case the autostart feature should be delayed
809 } else if ( msg == "autoStart(QString, QString, QString)") { 809 } else if ( msg == "autoStart(QString,QString,QString)") {
810 QString modifier, appName, delay; 810 QString modifier, appName, delay;
811 stream >> modifier >> appName >> delay; 811 stream >> modifier >> appName >> delay;
812 Config cfg( "autostart" ); 812 Config cfg( "autostart" );
813 cfg.setGroup( "AutoStart" ); 813 cfg.setGroup( "AutoStart" );
814 if ( modifier.compare("add") == 0 ){ 814 if ( modifier.compare("add") == 0 ){
815 // only add it appname is entered 815 // only add it appname is entered
816 if (!appName.isEmpty()) { 816 if (!appName.isEmpty()) {
817 cfg.writeEntry("Apps", appName); 817 cfg.writeEntry("Apps", appName);
818 cfg.writeEntry("Delay", delay); 818 cfg.writeEntry("Delay", delay);
819 } 819 }
820 } else { 820 } else {
821 } 821 }
822 } else if ( msg == "sendCardInfo()" ) { 822 } else if ( msg == "sendCardInfo()" ) {
823 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" ); 823 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" );
824 const QList<FileSystem> &fs = storage->fileSystems(); 824 const QList<FileSystem> &fs = storage->fileSystems();
825 QListIterator<FileSystem> it ( fs ); 825 QListIterator<FileSystem> it ( fs );
826 QString s; 826 QString s;
827 QString homeDir = getenv("HOME"); 827 QString homeDir = getenv("HOME");
828 QString hardDiskHome; 828 QString hardDiskHome;
829 for ( ; it.current(); ++it ) { 829 for ( ; it.current(); ++it ) {
830 if ( (*it)->isRemovable() ) 830 if ( (*it)->isRemovable() )
831 s += (*it)->name() + "=" + (*it)->path() + "/Documents " 831 s += (*it)->name() + "=" + (*it)->path() + "/Documents "
832 + QString::number( (*it)->availBlocks() * (*it)->blockSize() ) 832 + QString::number( (*it)->availBlocks() * (*it)->blockSize() )
833 + " " + (*it)->options() + ";"; 833 + " " + (*it)->options() + ";";