diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2008-08-14 05:52:39 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2008-08-14 05:52:39 (GMT) |
commit | e169d33552c8e7070aa6e13da0187f2013b4cfc3 (patch) | |
tree | ae9e92c7e885791c7f47645184070cbcd441ab94 /src/Xinerama.hh | |
parent | c82e7c0080f8a5c14dcf95ec92dc42f59ea9dd8b (diff) | |
parent | 91ca3bc5c8e2b892a9a81b18246f72aba7deebfd (diff) | |
download | fluxbox-e169d33552c8e7070aa6e13da0187f2013b4cfc3.zip fluxbox-e169d33552c8e7070aa6e13da0187f2013b4cfc3.tar.bz2 |
Merge branch 'master' into to_push
Diffstat (limited to 'src/Xinerama.hh')
-rw-r--r-- | src/Xinerama.hh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Xinerama.hh b/src/Xinerama.hh index eab2e37..876005f 100644 --- a/src/Xinerama.hh +++ b/src/Xinerama.hh | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #include "FbTk/RefCount.hh" | 30 | #include "FbTk/RefCount.hh" |
31 | #include "FbTk/SimpleCommand.hh" | 31 | #include "FbTk/SimpleCommand.hh" |
32 | #include "FbTk/MenuItem.hh" | 32 | #include "FbTk/RadioMenuItem.hh" |
33 | 33 | ||
34 | // provides a generic way for giving an object a xinerama head menu | 34 | // provides a generic way for giving an object a xinerama head menu |
35 | // The object must have two functions: | 35 | // The object must have two functions: |
@@ -38,18 +38,18 @@ | |||
38 | 38 | ||
39 | /// this class holds the xinerama items | 39 | /// this class holds the xinerama items |
40 | template <typename ItemType> | 40 | template <typename ItemType> |
41 | class XineramaHeadMenuItem : public FbTk::MenuItem { | 41 | class XineramaHeadMenuItem : public FbTk::RadioMenuItem { |
42 | public: | 42 | public: |
43 | XineramaHeadMenuItem(const FbTk::FbString &label, ItemType &object, int headnum, | 43 | XineramaHeadMenuItem(const FbTk::FbString &label, ItemType &object, int headnum, |
44 | FbTk::RefCount<FbTk::Command<void> > &cmd): | 44 | FbTk::RefCount<FbTk::Command<void> > &cmd): |
45 | FbTk::MenuItem(label,cmd), m_object(object), m_headnum(headnum) {} | 45 | FbTk::RadioMenuItem(label,cmd), m_object(object), m_headnum(headnum) {} |
46 | XineramaHeadMenuItem(const FbTk::FbString &label, ItemType &object, int headnum): | 46 | XineramaHeadMenuItem(const FbTk::FbString &label, ItemType &object, int headnum): |
47 | FbTk::MenuItem(label), m_object(object), m_headnum(headnum) {} | 47 | FbTk::RadioMenuItem(label), m_object(object), m_headnum(headnum) {} |
48 | 48 | ||
49 | bool isEnabled() const { return m_object.getOnHead() != m_headnum; } | 49 | bool isSelected() const { return m_object.getOnHead() == m_headnum; } |
50 | void click(int button, int time, unsigned int mods) { | 50 | void click(int button, int time, unsigned int mods) { |
51 | m_object.saveOnHead(m_headnum); | 51 | m_object.saveOnHead(m_headnum); |
52 | FbTk::MenuItem::click(button, time, mods); | 52 | FbTk::RadioMenuItem::click(button, time, mods); |
53 | } | 53 | } |
54 | 54 | ||
55 | private: | 55 | private: |