mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-01-12 01:40:15 +02:00
Removed the "wrapper" feature.
It is up to the system to restart GMenu2X when the application exits.
This commit is contained in:
parent
8f57afcf53
commit
7687212b4e
@ -1704,7 +1704,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["Wrapper"], tr["Explicitly relaunch GMenu2X after execution"], &menu->selLinkApp()->needsWrapperRef()));
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Don't Leave"], tr["Don't quit GMenu2X when launching this link"], &menu->selLinkApp()->runsInBackgroundRef()));
|
||||
|
||||
if (sd.exec() && sd.edited()) {
|
||||
|
@ -46,7 +46,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
{
|
||||
manual = "";
|
||||
file = linkfile;
|
||||
wrapper = false;
|
||||
dontleave = false;
|
||||
setClock(336);
|
||||
selectordir = "";
|
||||
@ -77,8 +76,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
params = value;
|
||||
} else if (name == "manual") {
|
||||
manual = value;
|
||||
} else if (name == "wrapper") {
|
||||
if (value=="true") wrapper = true;
|
||||
} else if (name == "dontleave") {
|
||||
if (value=="true") dontleave = true;
|
||||
} else if (name == "clock") {
|
||||
@ -169,7 +166,6 @@ bool LinkApp::save() {
|
||||
if (selectorfilter!="" ) f << "selectorfilter=" << selectorfilter << endl;
|
||||
if (selectorscreens!="") f << "selectorscreens=" << selectorscreens << endl;
|
||||
if (aliasfile!="" ) f << "selectoraliases=" << aliasfile << endl;
|
||||
if (wrapper ) f << "wrapper=true" << endl;
|
||||
if (dontleave ) f << "dontleave=true" << endl;
|
||||
f.close();
|
||||
sync();
|
||||
@ -393,7 +389,6 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
||||
|
||||
if (params!="") command += " " + params;
|
||||
if (gmenu2x->confInt["outputLogs"]) command += " &> " + cmdclean(gmenu2x->getHome()) + "/log.txt";
|
||||
if (wrapper) command += "; sync & cd "+cmdclean(gmenu2x->getExePath())+"; exec ./gmenu2x";
|
||||
if (dontleave) {
|
||||
system(command.c_str());
|
||||
} else {
|
||||
|
@ -46,7 +46,6 @@ private:
|
||||
std::string aliasfile;
|
||||
std::string file;
|
||||
|
||||
bool wrapper;
|
||||
bool dontleave;
|
||||
|
||||
void start();
|
||||
@ -89,7 +88,6 @@ public:
|
||||
|
||||
const std::string &getFile() { return file; }
|
||||
void renameFile(const std::string &name);
|
||||
bool &needsWrapperRef() { return wrapper; }
|
||||
bool &runsInBackgroundRef() { return dontleave; }
|
||||
};
|
||||
|
||||
|
@ -194,16 +194,12 @@ bool Menu::addLink(string path, string file, string section) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//if the extension is not equal to gpu or dge then enable the wrapper by default
|
||||
bool wrapper = false;
|
||||
|
||||
//strip the extension from the filename
|
||||
string title = file;
|
||||
string::size_type pos = title.rfind(".");
|
||||
if (pos!=string::npos && pos>0) {
|
||||
string ext = title.substr(pos, title.length());
|
||||
transform(ext.begin(), ext.end(), ext.begin(), (int(*)(int)) tolower);
|
||||
if (ext == ".gpu" || ext == ".dge") wrapper = false;
|
||||
title = title.substr(0, pos);
|
||||
}
|
||||
|
||||
@ -278,7 +274,6 @@ bool Menu::addLink(string path, string file, string section) {
|
||||
if (!description.empty()) f << "description=" << description << endl;
|
||||
if (!icon.empty()) f << "icon=" << icon << endl;
|
||||
if (!manual.empty()) f << "manual=" << manual << endl;
|
||||
if (wrapper) f << "wrapper=true" << endl;
|
||||
f.close();
|
||||
sync();
|
||||
int isection = find(sections.begin(),sections.end(),section) - sections.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user