From a7f0fef059f2e0a5947e53246ee0796bca13b352 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 5 Feb 2014 14:53:46 +0100 Subject: [PATCH] linkapp.cpp: remove dead/useless code --- src/linkapp.cpp | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/linkapp.cpp b/src/linkapp.cpp index 0c93188..d2fd64f 100644 --- a/src/linkapp.cpp +++ b/src/linkapp.cpp @@ -141,24 +141,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, const char* linkfile) iconPath = this->icon; updateSurfaces(); - } else if (!strncmp(key, "Exec", lkey)) { - string tmp = buf; - pos = tmp.find(' '); - exec = tmp.substr(0, pos); - - if (pos != tmp.npos) { - unsigned int i; - - params = tmp.substr(pos + 1); - - for (i = 0; i < sizeof(tokens) / sizeof(tokens[0]); i++) { - if (params.find(tokens[i]) != params.npos) { - selectordir = CARD_ROOT; - break; - } - } - } - continue; } @@ -554,11 +536,7 @@ void LinkApp::selector(int startSelection, const string &selectorDir) { void LinkApp::launch(const string &selectedFile) { save(); - if (isOpk()) { -#ifdef HAVE_LIBOPK - exec = "/usr/bin/opkrun -m " + metadata + " " + opkFile; -#endif - } else { + if (!isOpk()) { //Set correct working directory string::size_type pos = exec.rfind("/"); if (pos != string::npos) { @@ -584,8 +562,6 @@ void LinkApp::launch(const string &selectedFile) { } } - INFO("Executing '%s' (%s %s)\n", title.c_str(), exec.c_str(), params.c_str()); - if (gmenu2x->confInt["outputLogs"] #if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) && !consoleApp @@ -644,6 +620,7 @@ void LinkApp::launch(const string &selectedFile) { NULL); #endif } else { + INFO("Executing '%s' (%s %s)\n", title.c_str(), exec.c_str(), params.c_str()); execlp(exec.c_str(), exec.c_str(), !params.empty() ? params.c_str() : NULL, NULL);