diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-03 12:17:53 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2013-02-17 09:36:37 (GMT) |
commit | f321ca9b7ee5592c778921325b2b18f477b2bb84 (patch) | |
tree | bed6b5f1213a3d6cd46c8f085457dfa1113ac624 /src | |
parent | 610ee524969dde05fde519507c98f75d7732c6cb (diff) | |
download | fluxbox_pavel-f321ca9b7ee5592c778921325b2b18f477b2bb84.zip fluxbox_pavel-f321ca9b7ee5592c778921325b2b18f477b2bb84.tar.bz2 |
Add support for lua commands to MenuCreator
Diffstat (limited to 'src')
-rw-r--r-- | src/MenuCreator.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index 8f7c8a4..17b3152 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "WindowMenuAccessor.hh" | 32 | #include "WindowMenuAccessor.hh" |
33 | 33 | ||
34 | #include "ClientMenu.hh" | 34 | #include "ClientMenu.hh" |
35 | #include "FbCommands.hh" | ||
35 | #include "WorkspaceMenu.hh" | 36 | #include "WorkspaceMenu.hh" |
36 | #include "LayerMenu.hh" | 37 | #include "LayerMenu.hh" |
37 | #include "SendToMenu.hh" | 38 | #include "SendToMenu.hh" |
@@ -286,6 +287,9 @@ insertMenuItem(lua::state &l, FbTk::Menu &menu, FbTk::StringConvertor &parent_co | |||
286 | menu.insert(str_label, exit_cmd); | 287 | menu.insert(str_label, exit_cmd); |
287 | } else if (str_key == "config") { | 288 | } else if (str_key == "config") { |
288 | menu.insert(str_label, RefMenu(screen->configMenu()) ); | 289 | menu.insert(str_label, RefMenu(screen->configMenu()) ); |
290 | } else if (str_key == "lua") { | ||
291 | l.rawgetfield(-1, "param"); | ||
292 | menu.insert(str_label, RefCmd(new FbCommands::LuaCmd(l)) ); | ||
289 | } else if(str_key == "menu") { | 293 | } else if(str_key == "menu") { |
290 | RefMenu t(MenuCreator::createMenu("", screen_number)); | 294 | RefMenu t(MenuCreator::createMenu("", screen_number)); |
291 | l.pushvalue(-1); | 295 | l.pushvalue(-1); |