diff options
Diffstat (limited to 'src/MenuCreator.cc')
-rw-r--r-- | src/MenuCreator.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index b98287b..0597d6c 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc | |||
@@ -256,21 +256,11 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem, FbTk::StringConve | |||
256 | // execute and hide menu | 256 | // execute and hide menu |
257 | using namespace FbTk; | 257 | using namespace FbTk; |
258 | RefCount<Command> exec_cmd(FbTk::CommandRegistry::instance().parseLine("exec " + str_cmd)); | 258 | RefCount<Command> exec_cmd(FbTk::CommandRegistry::instance().parseLine("exec " + str_cmd)); |
259 | RefCount<Command> hide_menu(FbTk::CommandRegistry::instance().parseLine("hidemenus")); | 259 | menu.insert(str_label, exec_cmd); |
260 | MacroCommand *exec_and_hide = new FbTk::MacroCommand(); | ||
261 | exec_and_hide->add(hide_menu); | ||
262 | exec_and_hide->add(exec_cmd); | ||
263 | RefCount<Command> exec_and_hide_cmd(exec_and_hide); | ||
264 | menu.insert(str_label, exec_and_hide_cmd); | ||
265 | } else if (str_key == "macrocmd") { | 260 | } else if (str_key == "macrocmd") { |
266 | using namespace FbTk; | 261 | using namespace FbTk; |
267 | RefCount<Command> macro_cmd(FbTk::CommandRegistry::instance().parseLine("macrocmd " + str_cmd)); | 262 | RefCount<Command> macro_cmd(FbTk::CommandRegistry::instance().parseLine("macrocmd " + str_cmd)); |
268 | RefCount<Command> hide_menu(FbTk::CommandRegistry::instance().parseLine("hidemenus")); | 263 | menu.insert(str_label, macro_cmd); |
269 | MacroCommand *exec_and_hide = new FbTk::MacroCommand(); | ||
270 | exec_and_hide->add(hide_menu); | ||
271 | exec_and_hide->add(macro_cmd); | ||
272 | RefCount<Command> exec_and_hide_cmd(exec_and_hide); | ||
273 | menu.insert(str_label, exec_and_hide_cmd); | ||
274 | } else if (str_key == "style") { // style | 264 | } else if (str_key == "style") { // style |
275 | menu.insert(new StyleMenuItem(str_label, str_cmd)); | 265 | menu.insert(new StyleMenuItem(str_label, str_cmd)); |
276 | } else if (str_key == "config") { | 266 | } else if (str_key == "config") { |