From add8bcec482acaff30a3d408c5043ee251251ea3 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sun, 3 Jul 2011 17:51:51 +0200 Subject: Fix a bug in the default root menu --- src/Screen.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index b9d9a71..18a710e 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1381,13 +1381,17 @@ void BScreen::rereadMenu() { if (m_rootmenu->numberOfItems() == 0) { _FB_USES_NLS; + typedef FbTk::RefCount > RefCmd; + const FbTk::CommandParser &parser = FbTk::CommandParser::instance(); + m_rootmenu->setLabel(_FB_XTEXT(Menu, DefaultRootMenu, "Fluxbox default menu", "Title of fallback root menu")); - FbTk::RefCount > restart_fb(FbTk::CommandParser::instance().parse("restart")); - FbTk::RefCount > exit_fb(FbTk::CommandParser::instance().parse("exit")); - FbTk::RefCount > execute_xterm(FbTk::CommandParser::instance().parse("exec xterm")); + RefCmd execute_xterm(parser.parse("exec", "xterm")); + RefCmd reconfigure_fb(parser.parse("reconfigure")); + RefCmd restart_fb(parser.parse("restart")); + RefCmd exit_fb(parser.parse("exit")); m_rootmenu->insert("xterm", execute_xterm); m_rootmenu->insert(_FB_XTEXT(Menu, Reconfigure, "Reconfigure", - "Reload Configuration command")), + "Reload Configuration command"), reconfigure_fb); m_rootmenu->insert(_FB_XTEXT(Menu, Restart, "Restart", "Restart command"), restart_fb); m_rootmenu->insert(_FB_XTEXT(Menu, Exit, "Exit", "Exit command"), -- cgit v0.11.2