1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-23 03:24:38 +02:00

Eliminated selectedDir argument to LinkApp::launch()

This commit is contained in:
Maarten ter Huurne 2013-08-16 09:38:16 +02:00
parent 6c80a663e1
commit d6deb29ba0
2 changed files with 8 additions and 10 deletions

View File

@ -542,18 +542,18 @@ void LinkApp::selector(int startSelection, const string &selectorDir) {
Selector sel(gmenu2x, this, selectorDir); Selector sel(gmenu2x, this, selectorDir);
int selection = sel.exec(startSelection); int selection = sel.exec(startSelection);
if (selection!=-1) { if (selection!=-1) {
gmenu2x->writeTmp(selection, sel.getDir()); const string &selectedDir = sel.getDir();
launch(sel.getFile(), sel.getDir()); if (!selectedDir.empty()) {
selectordir = selectedDir;
}
gmenu2x->writeTmp(selection, selectedDir);
launch(sel.getFile());
} }
} }
void LinkApp::launch(const string &selectedFile, const string &selectedDir) { void LinkApp::launch(const string &selectedFile) {
drawRun(); drawRun();
if (selectedDir.empty())
selectordir = getSelectorDir();
else
selectordir = selectedDir;
save(); save();
if (isOpk()) { if (isOpk()) {

View File

@ -53,9 +53,7 @@ private:
#endif #endif
void start(); void start();
void launch( void launch(const std::string &selectedFile = "");
const std::string &selectedFile = "",
const std::string &selectedDir = "");
protected: protected:
virtual const std::string &searchIcon(); virtual const std::string &searchIcon();