aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-29 00:44:41 (GMT)
committerfluxgen <fluxgen>2003-08-29 00:44:41 (GMT)
commit76c1bd4b62ed62ffae1f3f6da8dde9716440d87c (patch)
tree121b78bbf53389c6b38ad0aa2e2feecd978b29a4 /src/Toolbar.cc
parent028897367989bc2d7402e4d9920fdf8889034162 (diff)
downloadfluxbox-76c1bd4b62ed62ffae1f3f6da8dde9716440d87c.zip
fluxbox-76c1bd4b62ed62ffae1f3f6da8dde9716440d87c.tar.bz2
fixed workspace theme for old themes
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 1f03cc5..5d508e4 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -22,18 +22,20 @@
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.119 2003/08/28 15:04:47 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.120 2003/08/29 00:44:41 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
29// themes 29// themes
30#include "ToolbarTheme.hh" 30#include "ToolbarTheme.hh"
31#include "WorkspaceNameTheme.hh"
31 32
32// tools 33// tools
33#include "IconbarTool.hh" 34#include "IconbarTool.hh"
34#include "WorkspaceNameTool.hh" 35#include "WorkspaceNameTool.hh"
35#include "ClockTool.hh" 36#include "ClockTool.hh"
36#include "SystemTray.hh" 37#include "SystemTray.hh"
38
37 39
38#include "I18n.hh" 40#include "I18n.hh"
39#include "fluxbox.hh" 41#include "fluxbox.hh"
@@ -216,7 +218,6 @@ Toolbar::Frame::~Frame() {
216} 218}
217 219
218Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t width): 220Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t width):
219 m_editing(false),
220 m_hidden(false), 221 m_hidden(false),
221 frame(*this, scrn.screenNumber()), 222 frame(*this, scrn.screenNumber()),
222 m_window_pm(0), 223 m_window_pm(0),
@@ -232,7 +233,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi
232 true), 233 true),
233 m_theme(scrn.screenNumber()), 234 m_theme(scrn.screenNumber()),
234 m_clock_theme(scrn.screenNumber(), "toolbar.clock", "Toolbar.Clock"), 235 m_clock_theme(scrn.screenNumber(), "toolbar.clock", "Toolbar.Clock"),
235 m_workspace_theme(scrn.screenNumber(), "toolbar.workspace", "Toolbar.Workspace"), 236 m_workspace_theme(new WorkspaceNameTheme(scrn.screenNumber(), "toolbar.workspace", "Toolbar.Workspace")),
236 m_iconbar_theme(scrn.screenNumber(), "toolbar.iconbar", "Toolbar.Iconbar"), 237 m_iconbar_theme(scrn.screenNumber(), "toolbar.iconbar", "Toolbar.Iconbar"),
237 m_layeritem(frame.window, layer), 238 m_layeritem(frame.window, layer),
238 m_strut(0), 239 m_strut(0),
@@ -279,7 +280,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi
279 // set antialias on themes 280 // set antialias on themes
280 m_clock_theme.setAntialias(screen().antialias()); 281 m_clock_theme.setAntialias(screen().antialias());
281 m_iconbar_theme.setAntialias(screen().antialias()); 282 m_iconbar_theme.setAntialias(screen().antialias());
282 m_workspace_theme.setAntialias(screen().antialias()); 283 m_workspace_theme->setAntialias(screen().antialias());
283 284
284 // setup hide timer 285 // setup hide timer
285 m_hide_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay()); 286 m_hide_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay());
@@ -378,7 +379,7 @@ void Toolbar::lower() {
378void Toolbar::reconfigure() { 379void Toolbar::reconfigure() {
379 m_clock_theme.setAntialias(screen().antialias()); 380 m_clock_theme.setAntialias(screen().antialias());
380 m_iconbar_theme.setAntialias(screen().antialias()); 381 m_iconbar_theme.setAntialias(screen().antialias());
381 m_workspace_theme.setAntialias(screen().antialias()); 382 m_workspace_theme->setAntialias(screen().antialias());
382 383
383 384
384 385
@@ -425,7 +426,7 @@ void Toolbar::reconfigure() {
425 StringList::const_iterator item_it_end = m_tools.end(); 426 StringList::const_iterator item_it_end = m_tools.end();
426 for (; item_it != item_it_end; ++item_it) { 427 for (; item_it != item_it_end; ++item_it) {
427 if (*item_it == "workspacename") { 428 if (*item_it == "workspacename") {
428 WorkspaceNameTool *item = new WorkspaceNameTool(frame.window, m_workspace_theme, screen()); 429 WorkspaceNameTool *item = new WorkspaceNameTool(frame.window, *m_workspace_theme, screen());
429 using namespace FbTk; 430 using namespace FbTk;
430 RefCount<Command> showmenu(new ShowMenuAboveToolbar(*this)); 431 RefCount<Command> showmenu(new ShowMenuAboveToolbar(*this));
431 item->button().setOnClick(showmenu); 432 item->button().setOnClick(showmenu);
@@ -621,8 +622,8 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
621 if (max_height < m_clock_theme.font().height()) 622 if (max_height < m_clock_theme.font().height())
622 max_height = m_clock_theme.font().height(); 623 max_height = m_clock_theme.font().height();
623 624
624 if (max_height < m_workspace_theme.font().height()) 625 if (max_height < m_workspace_theme->font().height())
625 max_height = m_workspace_theme.font().height(); 626 max_height = m_workspace_theme->font().height();
626 627
627 if (max_height < m_iconbar_theme.focusedText().font().height()) 628 if (max_height < m_iconbar_theme.focusedText().font().height())
628 max_height = m_iconbar_theme.focusedText().font().height(); 629 max_height = m_iconbar_theme.focusedText().font().height();
@@ -761,12 +762,6 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
761} 762}
762 763
763void Toolbar::toggleHidden() { 764void Toolbar::toggleHidden() {
764 if (isEditing()) { // don't hide if we're editing workspace label
765 m_hide_timer.fireOnce(false);
766 m_hide_timer.start(); // restart timer and try next timeout
767 return;
768 }
769
770 m_hide_timer.fireOnce(true); 765 m_hide_timer.fireOnce(true);
771 766
772 // toggle hidden 767 // toggle hidden