diff --git a/src/linkapp.cpp b/src/linkapp.cpp index 24808b5..6f49949 100644 --- a/src/linkapp.cpp +++ b/src/linkapp.cpp @@ -57,14 +57,11 @@ using namespace std; static const char *tokens[] = { "%f", "%F", "%u", "%U", }; #ifdef HAVE_LIBOPK -LinkApp::LinkApp(GMenu2X *gmenu2x_, InputManager &inputMgr_, - const char* linkfile, struct OPK *opk) +LinkApp::LinkApp(GMenu2X *gmenu2x_, const char* linkfile, struct OPK *opk) #else -LinkApp::LinkApp(GMenu2X *gmenu2x_, InputManager &inputMgr_, - const char* linkfile) +LinkApp::LinkApp(GMenu2X *gmenu2x_, const char* linkfile) #endif : Link(gmenu2x_, BIND(&LinkApp::start)) - , inputMgr(inputMgr_) { manual = ""; file = linkfile; @@ -481,7 +478,7 @@ void LinkApp::showManual() { repaint = false; } - switch(inputMgr.waitForPressedButton()) { + switch(gmenu2x->input.waitForPressedButton()) { case InputManager::SETTINGS: case InputManager::CANCEL: close = true; diff --git a/src/linkapp.h b/src/linkapp.h index fa0fdbc..a49f4c0 100644 --- a/src/linkapp.h +++ b/src/linkapp.h @@ -26,7 +26,6 @@ #include class GMenu2X; -class InputManager; /** Parses links files. @@ -35,7 +34,6 @@ Parses links files. */ class LinkApp : public Link { private: - InputManager &inputMgr; std::string sclock; int iclock; std::string exec, params, workdir, manual, selectordir, selectorfilter, selectorscreens; @@ -61,11 +59,9 @@ public: bool isOpk() { return isOPK; } const std::string &getOpkFile() { return opkFile; } - LinkApp(GMenu2X *gmenu2x, InputManager &inputMgr, - const char* linkfile, struct OPK *opk = NULL); + LinkApp(GMenu2X *gmenu2x, const char* linkfile, struct OPK *opk = NULL); #else - LinkApp(GMenu2X *gmenu2x, InputManager &inputMgr, - const char* linkfile); + LinkApp(GMenu2X *gmenu2x, const char* linkfile); bool isOpk() { return false; } #endif diff --git a/src/menu.cpp b/src/menu.cpp index 07cbdf7..3f4b5ad 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -500,7 +500,7 @@ bool Menu::addLink(string path, string file, string section) { INFO("Section: '%s(%i)'\n", sections[isection].c_str(), isection); - LinkApp* link = new LinkApp(gmenu2x, gmenu2x->input, linkpath.c_str()); + LinkApp* link = new LinkApp(gmenu2x, linkpath.c_str()); link->setSize(gmenu2x->skinConfInt["linkWidth"],gmenu2x->skinConfInt["linkHeight"]); links[isection].push_back( link ); } @@ -703,7 +703,7 @@ void Menu::openPackage(std::string path, bool order) if (!has_metadata) break; - link = new LinkApp(gmenu2x, gmenu2x->input, path.c_str(), opk); + link = new LinkApp(gmenu2x, path.c_str(), opk); link->setSize(gmenu2x->skinConfInt["linkWidth"], gmenu2x->skinConfInt["linkHeight"]); addSection(link->getCategory()); @@ -845,7 +845,7 @@ void Menu::readLinks() { sort(linkfiles.begin(), linkfiles.end(),case_less()); for (uint x=0; xinput, linkfiles[x].c_str()); + LinkApp *link = new LinkApp(gmenu2x, linkfiles[x].c_str()); link->setSize(gmenu2x->skinConfInt["linkWidth"], gmenu2x->skinConfInt["linkHeight"]); if (link->targetExists()) links[i].push_back(link);