summaryrefslogtreecommitdiff
path: root/core/launcher/launcher.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/launcher.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 1449269..979eee6 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -751,13 +751,13 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
} else if ( msg == "autoStart(QString,QString)" ) {
QString modifier, appName;
stream >> modifier >> appName;
Config cfg( "autostart" );
cfg.setGroup( "AutoStart" );
if ( modifier.compare("add") == 0 ){
- // only add it appname is entered
+ // only add if appname is entered
if (!appName.isEmpty()) {
cfg.writeEntry("Apps", appName);
}
} else if (modifier.compare("remove") == 0 ) {
// need to change for multiple entries
// actually remove is right now simular to clear, but in future there
@@ -765,12 +765,26 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
QString checkName;
checkName = cfg.readEntry("Apps", "");
if (checkName == appName) {
cfg.writeEntry("Apps", "");
}
}
+ // case the autostart feature should be delayed
+ } else if ( msg == "autoStart(QString, QString, QString)") {
+ QString modifier, appName, delay;
+ stream >> modifier >> appName >> delay;
+ Config cfg( "autostart" );
+ cfg.setGroup( "AutoStart" );
+ if ( modifier.compare("add") == 0 ){
+ // only add it appname is entered
+ if (!appName.isEmpty()) {
+ cfg.writeEntry("Apps", appName);
+ cfg.writeEntry("Delay", delay);
+ }
+ } else {
+ }
} else if ( msg == "sendCardInfo()" ) {
QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" );
const QList<FileSystem> &fs = storage->fileSystems();
QListIterator<FileSystem> it ( fs );
QString s;
QString homeDir = getenv("HOME");