aboutsummaryrefslogtreecommitdiff
path: root/src/MenuCreator.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-12-13 18:42:05 (GMT)
committermarkt <markt>2007-12-13 18:42:05 (GMT)
commitb001ea9f1feb32a878b95a0b78c3fb0240f6df68 (patch)
treeb9440acc1d1b44302f21eefb1fbda30096a50499 /src/MenuCreator.cc
parent8b7464046cea5e521ac46811591b0fce0c45aca1 (diff)
downloadfluxbox-b001ea9f1feb32a878b95a0b78c3fb0240f6df68.zip
fluxbox-b001ea9f1feb32a878b95a0b78c3fb0240f6df68.tar.bz2
close menus when they lose focus, instead of on [exec] commands
Diffstat (limited to 'src/MenuCreator.cc')
-rw-r--r--src/MenuCreator.cc14
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") {