diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-04-17 23:07:11 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-04-17 23:07:11 +0000 |
| commit | 307da13fff916694f870ecb77aaf3ce0cf51d09e (patch) | |
| tree | ed958a10e8651c42edafb00a321355ef8f1e0833 /src/Toolbar.cc | |
| parent | 9cd9d92bb1d66db9329bf5cd6e42e8b0096945e6 (diff) | |
menus update their values when they are reconfigure()d.
the screen, toolbar and slit rc values are reloaded in BScreen::reconfigure() before the menus.
the toolbar and slit rc values are explicitly loaded in their constructors, as is BScreen's.
Diffstat (limited to 'src/Toolbar.cc')
| -rw-r--r-- | src/Toolbar.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index f5aa7f90..d0753aab 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -73,6 +73,7 @@ Toolbar::Toolbar(BScreen &scrn, Resource &conf) : screen(scrn), m_placement = BottomCenter; m_ontop = false; m_hidden = m_autohide = false; + load(); // get the clock updating every minute clock_timer = new BTimer(openbox, *this); @@ -1271,9 +1272,13 @@ Toolbarmenu::Toolbarmenu(Toolbar &tb) : Basemenu(tb.screen), toolbar(tb) { "Edit current workspace name"), 3); update(); + + setValues(); +} - if (toolbar.onTop()) setItemSelected(1, True); - if (toolbar.autoHide()) setItemSelected(2, True); +void Toolbarmenu::setValues() { + setItemSelected(1, toolbar.onTop()); + setItemSelected(2, toolbar.autoHide()); } @@ -1328,6 +1333,7 @@ void Toolbarmenu::internal_hide() { void Toolbarmenu::reconfigure() { + setValues(); placementmenu->reconfigure(); Basemenu::reconfigure(); @@ -1356,7 +1362,6 @@ Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu &tm) update(); } - void Toolbarmenu::Placementmenu::itemSelected(int button, int index) { if (button != 1) return; |
