toolbar crash (menu bug) and initialisation fixups

This commit is contained in:
rathnor 2003-05-24 05:49:31 +00:00
parent 33a65073a9
commit 270cbb6592
4 changed files with 11 additions and 11 deletions

View file

@ -1,5 +1,8 @@
(Format: Year/Month/Day)
Changes for 0.9.3:
*03/05/24:
* Fix crash when toolbar turned off, and toolbar initialisation (Simon)
Menu.cc Screen.cc Toolbar.cc
*03/05/21:
* Fix cascade placement for multiple heads (Simon)
Workspace.hh/cc Window.hh/cc FbWinFrame.hh/cc

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Menu.cc,v 1.22 2003/05/17 10:44:32 fluxgen Exp $
// $Id: Menu.cc,v 1.23 2003/05/24 05:49:31 rathnor Exp $
//use GNU extensions
#ifndef _GNU_SOURCE
@ -270,8 +270,7 @@ int Menu::remove(unsigned int index) {
void Menu::removeAll() {
while (!menuitems.empty()) {
delete menuitems.back();
menuitems.pop_back();
remove(0);
}
m_need_update = true;
}

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Screen.cc,v 1.176 2003/05/22 01:17:15 rathnor Exp $
// $Id: Screen.cc,v 1.177 2003/05/24 05:49:31 rathnor Exp $
#include "Screen.hh"
@ -654,11 +654,8 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
workspacemenu->setItemSelected(2, true);
if (toolbar()) {
toolbar()->setPlacement(*resource.toolbar_placement);
toolbar()->theme().font().setAntialias(*resource.antialias);
toolbar()->reconfigure();
}
// if toolbar needs initialisation, do it in ToolbarHandler instead
// so it will work when destroyed later etc
initMenu(); // create and initiate rootmenu

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Toolbar.cc,v 1.86 2003/05/19 15:32:47 rathnor Exp $
// $Id: Toolbar.cc,v 1.87 2003/05/24 05:49:31 rathnor Exp $
#include "Toolbar.hh"
@ -279,7 +279,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi
this,
true),
m_theme(scrn.screenNumber()),
m_place(BOTTOMCENTER),
m_place(scrn.toolbarPlacement()),
m_themelistener(*this),
m_layeritem(frame.window, layer) {
@ -332,6 +332,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi
frame.pwbutton.setOnClick(prevwindow);
frame.nwbutton.setOnClick(nextwindow);
reconfigure(); // get everything together
frame.window.showSubwindows();
frame.window.show();
}