moved MenuContext class
fluxgen fluxgen
1 files changed,
14 insertions(+),
13 deletions(-)
jump to
M
src/MenuCreator.cc
→
src/MenuCreator.cc
@@ -143,6 +143,19 @@ Parser::Item m_key, m_label, m_cmd, m_icon;
FbTk::Menu *m_menu; }; +class MenuContext: public LayerObject { +public: + void moveToLayer(int layer_number) { + if (WindowCmd<void>::window() == 0) + return; + WindowCmd<void>::window()->moveToLayer(layer_number); + } + int layerNumber() const { + if (WindowCmd<void>::window() == 0) + return -1; + return WindowCmd<void>::window()->layerItem().getLayerNum(); + } +}; static void translateMenuItem(Parser &parse, ParseItem &item);@@ -532,19 +545,7 @@ BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber());
if (screen == 0) return false; - class MenuContext: public LayerObject { - public: - void moveToLayer(int layer_number) { - if (WindowCmd<void>::window() == 0) - return; - WindowCmd<void>::window()->moveToLayer(layer_number); - } - int layerNumber() const { - if (WindowCmd<void>::window() == 0) - return -1; - return WindowCmd<void>::window()->layerItem().getLayerNum(); - } - } static context; + static MenuContext context; FbTk::Menu *submenu = new LayerMenu(screen->menuTheme(), screen->imageControl(),