From a60d97fbffb6cee2219ac8c5561358ef81f76188 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 8 Dec 2012 01:45:21 -0300 Subject: [PATCH] Hide the selector dir/browser link options if OPK doesn't open a file --- src/gmenu2x.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gmenu2x.cpp b/src/gmenu2x.cpp index 79c32de..f488ceb 100644 --- a/src/gmenu2x.cpp +++ b/src/gmenu2x.cpp @@ -1229,14 +1229,19 @@ void GMenu2X::editLink() { 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 + } + if (!menu->selLinkApp()->isOpk() || + !menu->selLinkApp()->getSelectorDir().empty()) { +#endif + 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 } #endif #ifdef ENABLE_CPUFREQ sd.addSetting(new MenuSettingInt(this, ts, tr["Clock frequency"], tr["Cpu clock frequency to set when launching this link"], &linkClock, cpuFreqMin, confInt["maxClock"], cpuFreqMultiple)); #endif - 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