diff options
Diffstat (limited to 'src/FocusableTheme.hh')
-rw-r--r-- | src/FocusableTheme.hh | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/FocusableTheme.hh b/src/FocusableTheme.hh index d379c15..df73881 100644 --- a/src/FocusableTheme.hh +++ b/src/FocusableTheme.hh | |||
@@ -23,13 +23,11 @@ | |||
23 | #define FOCUSABLETHEME_HH | 23 | #define FOCUSABLETHEME_HH |
24 | 24 | ||
25 | #include "Focusable.hh" | 25 | #include "Focusable.hh" |
26 | #include "FbTk/Observer.hh" | ||
27 | #include "FbTk/Theme.hh" | 26 | #include "FbTk/Theme.hh" |
28 | #include "FbTk/RelaySignal.hh" | 27 | #include "FbTk/RelaySignal.hh" |
29 | 28 | ||
30 | template <typename BaseTheme> | 29 | template <typename BaseTheme> |
31 | class FocusableTheme: public FbTk::ThemeProxy<BaseTheme>, | 30 | class FocusableTheme: public FbTk::ThemeProxy<BaseTheme> { |
32 | private FbTk::Observer { | ||
33 | public: | 31 | public: |
34 | FocusableTheme(Focusable &win, FbTk::ThemeProxy<BaseTheme> &focused, | 32 | FocusableTheme(Focusable &win, FbTk::ThemeProxy<BaseTheme> &focused, |
35 | FbTk::ThemeProxy<BaseTheme> &unfocused): | 33 | FbTk::ThemeProxy<BaseTheme> &unfocused): |
@@ -37,8 +35,8 @@ public: | |||
37 | 35 | ||
38 | m_signals.join(m_win.focusSig(), | 36 | m_signals.join(m_win.focusSig(), |
39 | FbTk::MemFunIgnoreArgs(m_reconfig_sig, &FbTk::Signal<>::emit)); | 37 | FbTk::MemFunIgnoreArgs(m_reconfig_sig, &FbTk::Signal<>::emit)); |
40 | 38 | m_signals.join(m_win.attentionSig(), | |
41 | m_win.attentionSig().attach(this); | 39 | FbTk::MemFunIgnoreArgs(m_reconfig_sig, &FbTk::Signal<>::emit)); |
42 | m_signals.join(m_focused_theme.reconfigSig(), | 40 | m_signals.join(m_focused_theme.reconfigSig(), |
43 | FbTk::MemFun(m_reconfig_sig, &FbTk::Signal<>::emit)); | 41 | FbTk::MemFun(m_reconfig_sig, &FbTk::Signal<>::emit)); |
44 | m_signals.join(m_unfocused_theme.reconfigSig(), | 42 | m_signals.join(m_unfocused_theme.reconfigSig(), |
@@ -66,8 +64,6 @@ public: | |||
66 | } | 64 | } |
67 | 65 | ||
68 | private: | 66 | private: |
69 | void update(FbTk::Subject *subj) { m_reconfig_sig.emit(); } | ||
70 | |||
71 | Focusable &m_win; | 67 | Focusable &m_win; |
72 | FbTk::ThemeProxy<BaseTheme> &m_focused_theme, &m_unfocused_theme; | 68 | FbTk::ThemeProxy<BaseTheme> &m_focused_theme, &m_unfocused_theme; |
73 | FbTk::Signal<> m_reconfig_sig; | 69 | FbTk::Signal<> m_reconfig_sig; |