mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-26 22:28:58 +02:00
Simplify again the prototype of LinkApp as gmenu2x->input is public
This commit is contained in:
parent
1ff17d83c9
commit
b73391486f
@ -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;
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <string>
|
||||
|
||||
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
|
||||
|
||||
|
@ -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; x<linkfiles.size(); x++) {
|
||||
LinkApp *link = new LinkApp(gmenu2x, gmenu2x->input, 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);
|
||||
|
Loading…
Reference in New Issue
Block a user