diff options
author | rathnor <rathnor> | 2003-05-24 05:49:31 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-05-24 05:49:31 (GMT) |
commit | 270cbb65922487faded4b8997bd8cd4f57a2dc95 (patch) | |
tree | 4c51a29b404a0df226f3dbbf8f1f100bee307772 /src | |
parent | 33a65073a955d850f2a9601ea1368862b36959ff (diff) | |
download | fluxbox-270cbb65922487faded4b8997bd8cd4f57a2dc95.zip fluxbox-270cbb65922487faded4b8997bd8cd4f57a2dc95.tar.bz2 |
toolbar crash (menu bug) and initialisation fixups
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/Menu.cc | 5 | ||||
-rw-r--r-- | src/Screen.cc | 9 | ||||
-rw-r--r-- | src/Toolbar.cc | 5 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index a42193b..37d40fc 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Menu.cc,v 1.22 2003/05/17 10:44:32 fluxgen Exp $ | 25 | // $Id: Menu.cc,v 1.23 2003/05/24 05:49:31 rathnor Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -270,8 +270,7 @@ int Menu::remove(unsigned int index) { | |||
270 | 270 | ||
271 | void Menu::removeAll() { | 271 | void Menu::removeAll() { |
272 | while (!menuitems.empty()) { | 272 | while (!menuitems.empty()) { |
273 | delete menuitems.back(); | 273 | remove(0); |
274 | menuitems.pop_back(); | ||
275 | } | 274 | } |
276 | m_need_update = true; | 275 | m_need_update = true; |
277 | } | 276 | } |
diff --git a/src/Screen.cc b/src/Screen.cc index 753acbe..c1bb3db 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.176 2003/05/22 01:17:15 rathnor Exp $ | 25 | // $Id: Screen.cc,v 1.177 2003/05/24 05:49:31 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -654,11 +654,8 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
654 | 654 | ||
655 | workspacemenu->setItemSelected(2, true); | 655 | workspacemenu->setItemSelected(2, true); |
656 | 656 | ||
657 | if (toolbar()) { | 657 | // if toolbar needs initialisation, do it in ToolbarHandler instead |
658 | toolbar()->setPlacement(*resource.toolbar_placement); | 658 | // so it will work when destroyed later etc |
659 | toolbar()->theme().font().setAntialias(*resource.antialias); | ||
660 | toolbar()->reconfigure(); | ||
661 | } | ||
662 | 659 | ||
663 | initMenu(); // create and initiate rootmenu | 660 | initMenu(); // create and initiate rootmenu |
664 | 661 | ||
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index a000c99..e5b5a5a 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Toolbar.cc,v 1.86 2003/05/19 15:32:47 rathnor Exp $ | 25 | // $Id: Toolbar.cc,v 1.87 2003/05/24 05:49:31 rathnor Exp $ |
26 | 26 | ||
27 | #include "Toolbar.hh" | 27 | #include "Toolbar.hh" |
28 | 28 | ||
@@ -279,7 +279,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi | |||
279 | this, | 279 | this, |
280 | true), | 280 | true), |
281 | m_theme(scrn.screenNumber()), | 281 | m_theme(scrn.screenNumber()), |
282 | m_place(BOTTOMCENTER), | 282 | m_place(scrn.toolbarPlacement()), |
283 | m_themelistener(*this), | 283 | m_themelistener(*this), |
284 | m_layeritem(frame.window, layer) { | 284 | m_layeritem(frame.window, layer) { |
285 | 285 | ||
@@ -332,6 +332,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi | |||
332 | frame.pwbutton.setOnClick(prevwindow); | 332 | frame.pwbutton.setOnClick(prevwindow); |
333 | frame.nwbutton.setOnClick(nextwindow); | 333 | frame.nwbutton.setOnClick(nextwindow); |
334 | 334 | ||
335 | reconfigure(); // get everything together | ||
335 | frame.window.showSubwindows(); | 336 | frame.window.showSubwindows(); |
336 | frame.window.show(); | 337 | frame.window.show(); |
337 | } | 338 | } |