diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-04-30 10:06:31 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-04-30 10:06:31 (GMT) |
commit | 92d1e5fcfb5a44d6d4cfea7fdfa34bf659a377ad (patch) | |
tree | c52860224d96d0b2dd6db13809df0cc7f9f5ff35 | |
parent | f552b328bc07c3b842777d5c449febb58cd817bb (diff) | |
download | fluxbox-92d1e5fcfb5a44d6d4cfea7fdfa34bf659a377ad.zip fluxbox-92d1e5fcfb5a44d6d4cfea7fdfa34bf659a377ad.tar.bz2 |
don't allow empty root menu
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/Screen.cc | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0.1: | 2 | Changes for 1.0.1: |
3 | *08/04/30: | ||
4 | * Don't allow empty root menu (Mark) | ||
5 | Screen.cc | ||
3 | *08/04/27: | 6 | *08/04/27: |
4 | * Added SimpleObserver class. (Henrik) | 7 | * Added SimpleObserver class. (Henrik) |
5 | SimpleObserver.hh, SendToMenu.hh/cc, Toolbar.hh/cc, | 8 | 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() { | |||
1522 | 1522 | ||
1523 | } | 1523 | } |
1524 | 1524 | ||
1525 | if (m_rootmenu.get() == 0) { | 1525 | if (m_rootmenu.get() == 0 || m_rootmenu->numberOfItems() == 0) { |
1526 | _FB_USES_NLS; | 1526 | _FB_USES_NLS; |
1527 | m_rootmenu.reset(createMenu(_FB_XTEXT(Menu, DefaultRootMenu, "Fluxbox default menu", "Title of fallback root menu"))); | 1527 | m_rootmenu.reset(createMenu(_FB_XTEXT(Menu, DefaultRootMenu, "Fluxbox default menu", "Title of fallback root menu"))); |
1528 | FbTk::RefCount<FbTk::Command<void> > restart_fb(FbTk::CommandParser<void>::instance().parse("restart")); | 1528 | FbTk::RefCount<FbTk::Command<void> > restart_fb(FbTk::CommandParser<void>::instance().parse("restart")); |