diff options
-rw-r--r-- | src/FbMenu.cc | 10 | ||||
-rw-r--r-- | src/FbMenu.hh | 9 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/FbMenu.cc b/src/FbMenu.cc index 2871042..4cc2b06 100644 --- a/src/FbMenu.cc +++ b/src/FbMenu.cc | |||
@@ -26,7 +26,15 @@ | |||
26 | #include "WindowCmd.hh" | 26 | #include "WindowCmd.hh" |
27 | #include "FbTk/AutoReloadHelper.hh" | 27 | #include "FbTk/AutoReloadHelper.hh" |
28 | 28 | ||
29 | FluxboxWindow *FbMenu::s_window = 0; | 29 | namespace { |
30 | |||
31 | FluxboxWindow* s_window = 0; | ||
32 | |||
33 | } | ||
34 | |||
35 | void FbMenu::setWindow(FluxboxWindow* win) { s_window = win; } | ||
36 | FluxboxWindow* FbMenu::window() { return s_window; } | ||
37 | |||
30 | 38 | ||
31 | FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, | 39 | FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, |
32 | FbTk::ImageControl &imgctrl, FbTk::Layer &layer): | 40 | FbTk::ImageControl &imgctrl, FbTk::Layer &layer): |
diff --git a/src/FbMenu.hh b/src/FbMenu.hh index 23c2ad5..193149f 100644 --- a/src/FbMenu.hh +++ b/src/FbMenu.hh | |||
@@ -37,6 +37,11 @@ class MenuTheme; | |||
37 | /// a layered and shaped menu | 37 | /// a layered and shaped menu |
38 | class FbMenu:public FbTk::Menu { | 38 | class FbMenu:public FbTk::Menu { |
39 | public: | 39 | public: |
40 | |||
41 | static void setWindow(FluxboxWindow *win); | ||
42 | static FluxboxWindow *window(); | ||
43 | |||
44 | |||
40 | FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, FbTk::ImageControl &imgctrl, | 45 | FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, FbTk::ImageControl &imgctrl, |
41 | FbTk::Layer &layer); | 46 | FbTk::Layer &layer); |
42 | virtual ~FbMenu() { } | 47 | virtual ~FbMenu() { } |
@@ -49,13 +54,9 @@ public: | |||
49 | void setReloadHelper(FbTk::AutoReloadHelper *helper) { m_reloader.reset(helper); } | 54 | void setReloadHelper(FbTk::AutoReloadHelper *helper) { m_reloader.reset(helper); } |
50 | FbTk::AutoReloadHelper *reloadHelper() { return m_reloader.get(); } | 55 | FbTk::AutoReloadHelper *reloadHelper() { return m_reloader.get(); } |
51 | 56 | ||
52 | static void setWindow(FluxboxWindow *win) { s_window = win; } | ||
53 | static FluxboxWindow *window() { return s_window; } | ||
54 | |||
55 | private: | 57 | private: |
56 | FbTk::LayerItem m_layeritem; | 58 | FbTk::LayerItem m_layeritem; |
57 | std::auto_ptr<FbTk::AutoReloadHelper> m_reloader; | 59 | std::auto_ptr<FbTk::AutoReloadHelper> m_reloader; |
58 | static FluxboxWindow *s_window; | ||
59 | }; | 60 | }; |
60 | 61 | ||
61 | #endif // FBMENU_HH | 62 | #endif // FBMENU_HH |