From e11fb1b473207fa5f4ff74af3ae6b057de7b43cd Mon Sep 17 00:00:00 2001 From: akir Date: Thu, 9 Sep 2004 14:32:56 +0000 Subject: added forgotten [macrocmd] to menuitems --- src/MenuCreator.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index dec82c9..294b6ae 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuCreator.cc,v 1.13 2004/08/29 21:11:24 akir Exp $ +// $Id: MenuCreator.cc,v 1.14 2004/09/09 14:32:56 akir Exp $ #include "MenuCreator.hh" @@ -202,6 +202,16 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) { exec_and_hide->add(exec_cmd); RefCount exec_and_hide_cmd(exec_and_hide); menu.insert(str_label.c_str(), exec_and_hide_cmd); + } else if (str_key == "macrocmd") { + using namespace FbTk; + RefCount macro_cmd(CommandParser::instance().parseLine("macrocmd " + str_cmd)); + RefCount hide_menu(new SimpleCommand(menu, + &Menu::hide)); + MacroCommand *exec_and_hide = new FbTk::MacroCommand(); + exec_and_hide->add(hide_menu); + exec_and_hide->add(macro_cmd); + RefCount exec_and_hide_cmd(exec_and_hide); + menu.insert(str_label.c_str(), exec_and_hide_cmd); } else if (str_key == "style") { // style menu.insert(new StyleMenuItem(str_label, str_cmd)); } else if (str_key == "config") { -- cgit v0.11.2