mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-02-16 23:34:43 +02:00
Remove "don't leave" feature
If the application in question daemonizes, it will continue running no matter whether we start it with system() or execlp(). So I don't see a reason for this feature to exist and removing it means less code paths to worry about.
This commit is contained in:
parent
dfa5413b5b
commit
9c497e7867
@ -899,7 +899,6 @@ void GMenu2X::editLink() {
|
||||
sd.addSetting(new MenuSettingString(this, ts, tr["Selector Filter"], tr["Selector filter (Separate values with a comma)"], &linkSelFilter, diagTitle, diagIcon));
|
||||
sd.addSetting(new MenuSettingDir(this, ts, tr["Selector Screenshots"], tr["Directory of the screenshots for the selector"], &linkSelScreens));
|
||||
sd.addSetting(new MenuSettingFile(this, ts, tr["Selector Aliases"], tr["File containing a list of aliases for the selector"], &linkSelAliases));
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Don't Leave"], tr["Don't quit GMenu2X when launching this link"], &linkApp->runsInBackgroundRef()));
|
||||
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Display Console"], tr["Must be enabled for console-based applications"], &linkApp->consoleApp));
|
||||
#endif
|
||||
|
@ -68,7 +68,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
{
|
||||
manual = "";
|
||||
file = linkfile;
|
||||
dontleave = false;
|
||||
#ifdef ENABLE_CPUFREQ
|
||||
setClock(gmenu2x->getDefaultAppClock());
|
||||
#endif
|
||||
@ -133,9 +132,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
} else if (!strncmp(key, "X-OD-Manual", lkey)) {
|
||||
manual = buf;
|
||||
|
||||
} else if (!strncmp(key, "X-OD-Daemon", lkey)) {
|
||||
dontleave = !strncmp(val, "true", lval);
|
||||
|
||||
} else if (!strncmp(key, "Icon", lkey)) {
|
||||
/* Read the icon from the OPK only
|
||||
* if it doesn't exist on the skin */
|
||||
@ -239,8 +235,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
params = value;
|
||||
} else if (name == "manual") {
|
||||
manual = value;
|
||||
} else if (name == "dontleave") {
|
||||
if (value=="true") dontleave = true;
|
||||
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||
} else if (name == "consoleapp") {
|
||||
if (value == "true") consoleApp = true;
|
||||
@ -339,7 +333,6 @@ bool LinkApp::save() {
|
||||
if (exec!="" ) f << "exec=" << exec << endl;
|
||||
if (params!="" ) f << "params=" << params << endl;
|
||||
if (manual!="" ) f << "manual=" << manual << endl;
|
||||
if (dontleave ) f << "dontleave=true" << endl;
|
||||
#if defined(PLATFORM_A320) || defined(PLATFORM_GCW0)
|
||||
if (consoleApp ) f << "consoleapp=true" << endl;
|
||||
#endif
|
||||
@ -656,9 +649,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
||||
if (isOPK)
|
||||
command += " ; umount -l " + opkMount;
|
||||
#endif
|
||||
if (dontleave) {
|
||||
system(command.c_str());
|
||||
} else {
|
||||
|
||||
gmenu2x->saveSelection();
|
||||
|
||||
if (selectedFile == "") {
|
||||
@ -718,7 +709,6 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
||||
//try relaunching gmenu2x
|
||||
gmenu2x->main();
|
||||
}
|
||||
}
|
||||
|
||||
const string &LinkApp::getExec() {
|
||||
return exec;
|
||||
|
@ -109,7 +109,6 @@ public:
|
||||
|
||||
const std::string &getFile() { return file; }
|
||||
void renameFile(const std::string &name);
|
||||
bool &runsInBackgroundRef() { return dontleave; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user