From 92d1e5fcfb5a44d6d4cfea7fdfa34bf659a377ad Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Wed, 30 Apr 2008 03:06:31 -0700 Subject: don't allow empty root menu --- ChangeLog | 3 +++ src/Screen.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 214eccd..6056785 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0.1: +*08/04/30: + * Don't allow empty root menu (Mark) + Screen.cc *08/04/27: * Added SimpleObserver class. (Henrik) SimpleObserver.hh, SendToMenu.hh/cc, Toolbar.hh/cc, diff --git a/src/Screen.cc b/src/Screen.cc index f26caee..e582b44 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1522,7 +1522,7 @@ void BScreen::initMenu() { } - if (m_rootmenu.get() == 0) { + if (m_rootmenu.get() == 0 || m_rootmenu->numberOfItems() == 0) { _FB_USES_NLS; m_rootmenu.reset(createMenu(_FB_XTEXT(Menu, DefaultRootMenu, "Fluxbox default menu", "Title of fallback root menu"))); FbTk::RefCount > restart_fb(FbTk::CommandParser::instance().parse("restart")); -- cgit v0.11.2