From 03834d34720b1ca9b03c7260980c37e9c67d8144 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sun, 3 Jul 2011 14:17:53 +0200 Subject: Add support for lua commands to MenuCreator --- src/MenuCreator.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index abd6691..c1eeca4 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc @@ -32,6 +32,7 @@ #include "WindowMenuAccessor.hh" #include "ClientMenu.hh" +#include "FbCommands.hh" #include "WorkspaceMenu.hh" #include "LayerMenu.hh" #include "SendToMenu.hh" @@ -285,6 +286,9 @@ insertMenuItem(lua::state &l, FbTk::Menu &menu, FbTk::StringConvertor &parent_co menu.insert(str_label, exit_cmd); } else if (str_key == "config") { menu.insert(str_label, RefMenu(screen->configMenu()) ); + } else if (str_key == "lua") { + l.rawgetfield(-1, "param"); + menu.insert(str_label, RefCmd(new FbCommands::LuaCmd(l)) ); } else if(str_key == "menu") { RefMenu t(MenuCreator::createMenu("", screen_number)); l.pushvalue(-1); -- cgit v0.11.2