aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-04 04:59:14 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-04 04:59:14 (GMT)
commit797038823815f446c25d191837e63a022209641d (patch)
treebc8f39dc91c182c538fa541cb29d29964b15ac8f /src/Screen.cc
parent0688816d11e1fbd5576197f39f949ead687101d9 (diff)
downloadfluxbox-797038823815f446c25d191837e63a022209641d.zip
fluxbox-797038823815f446c25d191837e63a022209641d.tar.bz2
add selection box to various "choose one of these" menu items
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc9
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
177class TabPlacementMenuItem: public FbTk::MenuItem { 178class TabPlacementMenuItem: public FbTk::RadioMenuItem {
178public: 179public:
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