aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-04-30 09:32:10 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-05-10 11:00:45 (GMT)
commitfa15400cc24ddcfd6e361bd068ae1986b9f9e561 (patch)
treece137e8ce4486e42451b3f4921ba519a13270469 /src/FbTk
parentf7d7dfd2a8047207dbe90bc77592c25acf4ca15c (diff)
downloadfluxbox-fa15400cc24ddcfd6e361bd068ae1986b9f9e561.zip
fluxbox-fa15400cc24ddcfd6e361bd068ae1986b9f9e561.tar.bz2
Remove the Observer dependency from FbTk::Menu
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Menu.cc2
-rw-r--r--src/FbTk/Menu.hh8
2 files changed, 3 insertions, 7 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index da5760d..40f81c8 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -1233,7 +1233,7 @@ void Menu::stopHide() {
1233 m_hide_timer.stop(); 1233 m_hide_timer.stop();
1234} 1234}
1235 1235
1236void Menu::update(FbTk::Subject *subj) { 1236void Menu::themeReconfigured() {
1237 1237
1238 m_need_update = true; 1238 m_need_update = true;
1239 1239
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh
index 7b59cf7..bd830b4 100644
--- a/src/FbTk/Menu.hh
+++ b/src/FbTk/Menu.hh
@@ -31,7 +31,6 @@
31#include "FbString.hh" 31#include "FbString.hh"
32#include "FbWindow.hh" 32#include "FbWindow.hh"
33#include "EventHandler.hh" 33#include "EventHandler.hh"
34#include "Observer.hh"
35#include "MenuTheme.hh" 34#include "MenuTheme.hh"
36#include "Timer.hh" 35#include "Timer.hh"
37#include "TypeAhead.hh" 36#include "TypeAhead.hh"
@@ -44,8 +43,7 @@ class ImageControl;
44template <typename T> class RefCount; 43template <typename T> class RefCount;
45 44
46/// Base class for menus 45/// Base class for menus
47class Menu: public FbTk::EventHandler, FbTk::FbWindowRenderer, 46class Menu: public FbTk::EventHandler, FbTk::FbWindowRenderer {
48 public FbTk::Observer {
49public: 47public:
50 enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM }; 48 enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM };
51 enum { RIGHT = 1, LEFT }; 49 enum { RIGHT = 1, LEFT };
@@ -168,6 +166,7 @@ public:
168 166
169protected: 167protected:
170 168
169 void themeReconfigured();
171 void setTitleVisibility(bool b) { 170 void setTitleVisibility(bool b) {
172 m_title_vis = b; m_need_update = true; 171 m_title_vis = b; m_need_update = true;
173 if (!b) 172 if (!b)
@@ -187,15 +186,12 @@ protected:
187 186
188 virtual void internal_hide(bool first = true); 187 virtual void internal_hide(bool first = true);
189 188
190 virtual void update(FbTk::Subject *);
191
192private: 189private:
193 190
194 void openSubmenu(); 191 void openSubmenu();
195 void closeMenu(); 192 void closeMenu();
196 void startHide(); 193 void startHide();
197 void stopHide(); 194 void stopHide();
198 void themeReconfigured() { update(NULL); }
199 195
200 FbTk::ThemeProxy<MenuTheme> &m_theme; 196 FbTk::ThemeProxy<MenuTheme> &m_theme;
201 Menu *m_parent; 197 Menu *m_parent;