diff options
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 658252b..838a313 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "FbTk/BoolMenuItem.hh" | 38 | #include "FbTk/BoolMenuItem.hh" |
39 | #include "FbTk/IntMenuItem.hh" | 39 | #include "FbTk/IntMenuItem.hh" |
40 | #include "FocusModelMenuItem.hh" | 40 | #include "FocusModelMenuItem.hh" |
41 | #include "RadioMenuItem.hh" | ||
41 | 42 | ||
42 | // menus | 43 | // menus |
43 | #include "FbMenu.hh" | 44 | #include "FbMenu.hh" |
@@ -174,21 +175,21 @@ int anotherWMRunning(Display *display, XErrorEvent *) { | |||
174 | } | 175 | } |
175 | 176 | ||
176 | 177 | ||
177 | class TabPlacementMenuItem: public FbTk::MenuItem { | 178 | class TabPlacementMenuItem: public FbTk::RadioMenuItem { |
178 | public: | 179 | public: |
179 | TabPlacementMenuItem(FbTk::FbString & label, BScreen &screen, | 180 | TabPlacementMenuItem(FbTk::FbString & label, BScreen &screen, |
180 | FbWinFrame::TabPlacement place, | 181 | FbWinFrame::TabPlacement place, |
181 | FbTk::RefCount<FbTk::Command<void> > &cmd): | 182 | FbTk::RefCount<FbTk::Command<void> > &cmd): |
182 | FbTk::MenuItem(label, cmd), | 183 | FbTk::RadioMenuItem(label, cmd), |
183 | m_screen(screen), | 184 | m_screen(screen), |
184 | m_place(place) { | 185 | m_place(place) { |
185 | setCloseOnClick(false); | 186 | setCloseOnClick(false); |
186 | } | 187 | } |
187 | 188 | ||
188 | bool isEnabled() const { return m_screen.getTabPlacement() != m_place; } | 189 | bool isSelected() const { return m_screen.getTabPlacement() == m_place; } |
189 | void click(int button, int time, unsigned int mods) { | 190 | void click(int button, int time, unsigned int mods) { |
190 | m_screen.saveTabPlacement(m_place); | 191 | m_screen.saveTabPlacement(m_place); |
191 | FbTk::MenuItem::click(button, time, mods); | 192 | FbTk::RadioMenuItem::click(button, time, mods); |
192 | } | 193 | } |
193 | 194 | ||
194 | 195 | ||