From b20b243b48683d209f8134b46c6dcea4df94b6cc Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck <mark@fluxbox.org> Date: Thu, 3 Jan 2008 19:37:21 -0800 Subject: remove some unnecessary code --- src/FbWinFrame.cc | 2 -- src/FbWinFrame.hh | 10 ---------- src/Window.cc | 6 ++++-- src/Window.hh | 11 ----------- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index c31b74f..9056d54 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -90,10 +90,8 @@ FbWinFrame::FbWinFrame(BScreen &screen, FbWinFrameTheme &theme, FbTk::ImageContr m_shaded(false), m_focused_alpha(AlphaAcc(theme, &FbWinFrameTheme::focusedAlpha)), m_unfocused_alpha(AlphaAcc(theme, &FbWinFrameTheme::unfocusedAlpha)), - m_themelistener(*this), m_shape(m_window, theme.shapePlace()), m_disable_themeshape(false) { - m_theme.reconfigSig().attach(&m_themelistener); init(); } diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index bf71566..5d81dba 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh @@ -396,16 +396,6 @@ private: FbTk::DefaultValue<unsigned char, AlphaAcc> m_focused_alpha; FbTk::DefaultValue<unsigned char, AlphaAcc> m_unfocused_alpha; - class ThemeListener: public FbTk::Observer { - public: - ThemeListener(FbWinFrame &frame):m_frame(frame) { } - void update(FbTk::Subject *) { - m_frame.reconfigure(); - } - private: - FbWinFrame &m_frame; - }; - ThemeListener m_themelistener; FbTk::Shape m_shape; bool m_disable_themeshape; diff --git a/src/Window.cc b/src/Window.cc index 45efd39..7f14ee8 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -269,7 +269,6 @@ FluxboxWindow::FluxboxWindow(WinClient &client, FbWinFrameTheme &tm, m_statesig(*this), m_layersig(*this), m_workspacesig(*this), - m_themelistener(*this), m_creation_time(0), moving(false), resizing(false), shaded(false), iconic(false), stuck(false), m_initialized(false), fullscreen(false), @@ -299,7 +298,7 @@ FluxboxWindow::FluxboxWindow(WinClient &client, FbWinFrameTheme &tm, m_parent(client.screen().rootWindow()), m_resize_corner(RIGHTBOTTOM) { - tm.reconfigSig().attach(&m_themelistener); + tm.reconfigSig().attach(this); init(); @@ -3011,6 +3010,9 @@ void FluxboxWindow::update(FbTk::Subject *subj) { if (FocusControl::focusedFbWindow()) setFullscreenLayer(); } + } else if (subj == &frame().theme().reconfigSig()) { + reconfigTheme(); + frame().reconfigure(); } } diff --git a/src/Window.hh b/src/Window.hh index 419e152..8d0c6f1 100644 --- a/src/Window.hh +++ b/src/Window.hh @@ -556,17 +556,6 @@ private: m_layersig, m_workspacesig; - class ThemeListener: public FbTk::Observer { - public: - ThemeListener(FluxboxWindow &win):m_win(win) { } - void update(FbTk::Subject *) { - m_win.reconfigTheme(); - } - private: - FluxboxWindow &m_win; - }; - ThemeListener m_themelistener; - time_t m_creation_time; // Window states -- cgit v0.11.2