diff options
Diffstat (limited to 'src/FocusableTheme.hh')
-rw-r--r-- | src/FocusableTheme.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/FocusableTheme.hh b/src/FocusableTheme.hh index d0f5d9e..cc14e62 100644 --- a/src/FocusableTheme.hh +++ b/src/FocusableTheme.hh | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "Focusable.hh" | 25 | #include "Focusable.hh" |
26 | #include "FbTk/Observer.hh" | 26 | #include "FbTk/Observer.hh" |
27 | #include "FbTk/Theme.hh" | 27 | #include "FbTk/Theme.hh" |
28 | #include "FbTk/RelaySignal.hh" | ||
28 | 29 | ||
29 | template <typename BaseTheme> | 30 | template <typename BaseTheme> |
30 | class FocusableTheme: public FbTk::ThemeProxy<BaseTheme>, | 31 | class FocusableTheme: public FbTk::ThemeProxy<BaseTheme>, |
@@ -33,7 +34,9 @@ public: | |||
33 | FocusableTheme(Focusable &win, FbTk::ThemeProxy<BaseTheme> &focused, | 34 | FocusableTheme(Focusable &win, FbTk::ThemeProxy<BaseTheme> &focused, |
34 | FbTk::ThemeProxy<BaseTheme> &unfocused): | 35 | FbTk::ThemeProxy<BaseTheme> &unfocused): |
35 | m_win(win), m_focused_theme(focused), m_unfocused_theme(unfocused) { | 36 | m_win(win), m_focused_theme(focused), m_unfocused_theme(unfocused) { |
36 | m_win.focusSig().attach(this); | 37 | // relay focus signal to reconfig signal |
38 | FbTk::relaySignal(m_signals, m_win.focusSig(), m_reconfig_sig); | ||
39 | |||
37 | m_win.attentionSig().attach(this); | 40 | m_win.attentionSig().attach(this); |
38 | m_focused_theme.reconfigSig().attach(this); | 41 | m_focused_theme.reconfigSig().attach(this); |
39 | m_unfocused_theme.reconfigSig().attach(this); | 42 | m_unfocused_theme.reconfigSig().attach(this); |
@@ -66,6 +69,7 @@ private: | |||
66 | Focusable &m_win; | 69 | Focusable &m_win; |
67 | FbTk::ThemeProxy<BaseTheme> &m_focused_theme, &m_unfocused_theme; | 70 | FbTk::ThemeProxy<BaseTheme> &m_focused_theme, &m_unfocused_theme; |
68 | FbTk::Subject m_reconfig_sig; | 71 | FbTk::Subject m_reconfig_sig; |
72 | FbTk::SignalTracker m_signals; | ||
69 | }; | 73 | }; |
70 | 74 | ||
71 | #endif // FOCUSABLETHEME_HH | 75 | #endif // FOCUSABLETHEME_HH |