diff --git a/src/ConfigMenu.hh b/src/ConfigMenu.hh index b778f0f4..5cb67f43 100644 --- a/src/ConfigMenu.hh +++ b/src/ConfigMenu.hh @@ -24,7 +24,7 @@ class BScreen; -class ScreenResource; +struct ScreenResource; namespace FbTk{ class Menu; @@ -36,6 +36,8 @@ public: // makes the setup() function-signature shorter struct SetupHelper { + SetupHelper(BScreen& _s, FbTk::ResourceManager& _rm, ScreenResource& _r) : + screen(_s), rm(_rm), resource(_r) { } BScreen& screen; FbTk::ResourceManager& rm; ScreenResource& resource; diff --git a/src/Screen.cc b/src/Screen.cc index 666bb3e0..1edcd93a 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1408,11 +1408,7 @@ float BScreen::getYGap(int head) { void BScreen::setupConfigmenu(FbTk::Menu &menu) { - struct ConfigMenu::SetupHelper sh; - sh.screen = *this; - sh.rm = m_resource_manager; - sh.resource = resource; - + struct ConfigMenu::SetupHelper sh(*this, m_resource_manager, resource); menu.removeAll(); ConfigMenu::setup(menu, sh); menu.updateMenu();