mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 21:18:27 +02:00
Hide parameters not suitable for OPKs on the context menu
This commit is contained in:
parent
dec1a8956a
commit
4c4f452abb
@ -1190,14 +1190,23 @@ void GMenu2X::editLink() {
|
||||
string diagIcon = menu->selLinkApp()->getIconPath();
|
||||
|
||||
SettingsDialog sd(this, input, ts, diagTitle, diagIcon);
|
||||
#ifdef HAVE_LIBOPK
|
||||
if (!menu->selLinkApp()->isOpk()) {
|
||||
#endif
|
||||
sd.addSetting(new MenuSettingString(this, ts, tr["Title"], tr["Link title"], &linkTitle, diagTitle, diagIcon));
|
||||
sd.addSetting(new MenuSettingString(this, ts, tr["Description"], tr["Link description"], &linkDescription, diagTitle, diagIcon));
|
||||
sd.addSetting(new MenuSettingMultiString(this, ts, tr["Section"], tr["The section this link belongs to"], &newSection, &menu->getSections()));
|
||||
sd.addSetting(new MenuSettingImage(this, ts, tr["Icon"], tr.translate("Select an icon for the link: $1", linkTitle.c_str(), NULL), &linkIcon, ".png,.bmp,.jpg,.jpeg"));
|
||||
sd.addSetting(new MenuSettingFile(this, ts, tr["Manual"], tr["Select a graphic/textual manual or a readme"], &linkManual, ".man.png,.txt"));
|
||||
#ifdef HAVE_LIBOPK
|
||||
}
|
||||
#endif
|
||||
sd.addSetting(new MenuSettingInt(this, ts, tr["Clock (default: 336)"], tr["Cpu clock frequency to set when launching this link"], &linkClock, cpuFreqMin, confInt["maxClock"], cpuFreqMultiple));
|
||||
sd.addSetting(new MenuSettingDir(this, ts, tr["Selector Directory"], tr["Directory to scan for the selector"], &linkSelDir));
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Selector Browser"], tr["Allow the selector to change directory"], &linkSelBrowser));
|
||||
#ifdef HAVE_LIBOPK
|
||||
if (!menu->selLinkApp()->isOpk()) {
|
||||
#endif
|
||||
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));
|
||||
@ -1205,6 +1214,9 @@ void GMenu2X::editLink() {
|
||||
#ifdef PLATFORM_DINGUX
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Display Console"], tr["Must be enabled for console-based applications"], &menu->selLinkApp()->consoleApp));
|
||||
#endif
|
||||
#ifdef HAVE_LIBOPK
|
||||
}
|
||||
#endif
|
||||
|
||||
if (sd.exec() && sd.edited()) {
|
||||
menu->selLinkApp()->setTitle(linkTitle);
|
||||
|
@ -60,6 +60,7 @@ private:
|
||||
public:
|
||||
#ifdef HAVE_LIBOPK
|
||||
const std::string &getCategory() { return category; }
|
||||
bool isOpk() { return isOPK; }
|
||||
|
||||
LinkApp(GMenu2X *gmenu2x, Touchscreen &ts, InputManager &inputMgr,
|
||||
const char* linkfile, bool opk = false);
|
||||
|
Loading…
Reference in New Issue
Block a user