all repos — fluxbox @ 76c1bd4b62ed62ffae1f3f6da8dde9716440d87c

custom fork of the fluxbox windowmanager

fixed workspace theme for old themes
fluxgen fluxgen
commit

76c1bd4b62ed62ffae1f3f6da8dde9716440d87c

parent

028897367989bc2d7402e4d9920fdf8889034162

2 files changed, 12 insertions(+), 19 deletions(-)

jump to
M src/Toolbar.ccsrc/Toolbar.cc

@@ -22,18 +22,20 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.119 2003/08/28 15:04:47 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.120 2003/08/29 00:44:41 fluxgen Exp $ #include "Toolbar.hh" // themes #include "ToolbarTheme.hh" +#include "WorkspaceNameTheme.hh" // tools #include "IconbarTool.hh" #include "WorkspaceNameTool.hh" #include "ClockTool.hh" #include "SystemTray.hh" + #include "I18n.hh" #include "fluxbox.hh"

@@ -216,7 +218,6 @@ evm.remove(window);

} Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t width): - m_editing(false), m_hidden(false), frame(*this, scrn.screenNumber()), m_window_pm(0),

@@ -232,7 +233,7 @@ this,

true), m_theme(scrn.screenNumber()), m_clock_theme(scrn.screenNumber(), "toolbar.clock", "Toolbar.Clock"), - m_workspace_theme(scrn.screenNumber(), "toolbar.workspace", "Toolbar.Workspace"), + m_workspace_theme(new WorkspaceNameTheme(scrn.screenNumber(), "toolbar.workspace", "Toolbar.Workspace")), m_iconbar_theme(scrn.screenNumber(), "toolbar.iconbar", "Toolbar.Iconbar"), m_layeritem(frame.window, layer), m_strut(0),

@@ -279,7 +280,7 @@

// set antialias on themes m_clock_theme.setAntialias(screen().antialias()); m_iconbar_theme.setAntialias(screen().antialias()); - m_workspace_theme.setAntialias(screen().antialias()); + m_workspace_theme->setAntialias(screen().antialias()); // setup hide timer m_hide_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay());

@@ -378,7 +379,7 @@

void Toolbar::reconfigure() { m_clock_theme.setAntialias(screen().antialias()); m_iconbar_theme.setAntialias(screen().antialias()); - m_workspace_theme.setAntialias(screen().antialias()); + m_workspace_theme->setAntialias(screen().antialias());

@@ -425,7 +426,7 @@ StringList::const_iterator item_it = m_tools.begin();

StringList::const_iterator item_it_end = m_tools.end(); for (; item_it != item_it_end; ++item_it) { if (*item_it == "workspacename") { - WorkspaceNameTool *item = new WorkspaceNameTool(frame.window, m_workspace_theme, screen()); + WorkspaceNameTool *item = new WorkspaceNameTool(frame.window, *m_workspace_theme, screen()); using namespace FbTk; RefCount<Command> showmenu(new ShowMenuAboveToolbar(*this)); item->button().setOnClick(showmenu);

@@ -621,8 +622,8 @@ unsigned int max_height = 0;

if (max_height < m_clock_theme.font().height()) max_height = m_clock_theme.font().height(); - if (max_height < m_workspace_theme.font().height()) - max_height = m_workspace_theme.font().height(); + if (max_height < m_workspace_theme->font().height()) + max_height = m_workspace_theme->font().height(); if (max_height < m_iconbar_theme.focusedText().font().height()) max_height = m_iconbar_theme.focusedText().font().height();

@@ -761,12 +762,6 @@ }

} void Toolbar::toggleHidden() { - if (isEditing()) { // don't hide if we're editing workspace label - m_hide_timer.fireOnce(false); - m_hide_timer.start(); // restart timer and try next timeout - return; - } - m_hide_timer.fireOnce(true); // toggle hidden
M src/Toolbar.hhsrc/Toolbar.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.hh,v 1.45 2003/08/28 13:58:17 fluxgen Exp $ +// $Id: Toolbar.hh,v 1.46 2003/08/29 00:44:41 fluxgen Exp $ #ifndef TOOLBAR_HH #define TOOLBAR_HH

@@ -114,8 +114,6 @@

inline FbTk::Menu &layermenu() { return m_layermenu; } inline const FbTk::Menu &layermenu() const { return m_layermenu; } - /// are we in workspacename editing? - inline bool isEditing() const { return m_editing; } /// are we hidden? inline bool isHidden() const { return m_hidden; } /// do we auto hide the toolbar?

@@ -146,7 +144,6 @@ void setupMenus();

void clearStrut(); void updateStrut(); - bool m_editing; ///< edit workspace label mode bool m_hidden; ///< hidden state /// Toolbar frame

@@ -171,7 +168,8 @@ LayerMenu<Toolbar> m_layermenu;

// themes ToolbarTheme m_theme; - ToolTheme m_clock_theme, m_workspace_theme; + ToolTheme m_clock_theme; + std::auto_ptr<ToolTheme> m_workspace_theme; IconbarTheme m_iconbar_theme; FbTk::XLayerItem m_layeritem;