diff options
Diffstat (limited to 'src/Slit.cc')
-rw-r--r-- | src/Slit.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Slit.cc b/src/Slit.cc index ecd8280..20b86d6 100644 --- a/src/Slit.cc +++ b/src/Slit.cc | |||
@@ -57,6 +57,7 @@ | |||
57 | #include "FbTk/I18n.hh" | 57 | #include "FbTk/I18n.hh" |
58 | #include "FbTk/BoolMenuItem.hh" | 58 | #include "FbTk/BoolMenuItem.hh" |
59 | #include "FbTk/IntMenuItem.hh" | 59 | #include "FbTk/IntMenuItem.hh" |
60 | #include "FbTk/RadioMenuItem.hh" | ||
60 | 61 | ||
61 | #ifdef HAVE_SYS_STAT_H | 62 | #ifdef HAVE_SYS_STAT_H |
62 | #include <sys/types.h> | 63 | #include <sys/types.h> |
@@ -236,16 +237,16 @@ private: | |||
236 | string m_label; | 237 | string m_label; |
237 | }; | 238 | }; |
238 | 239 | ||
239 | class PlaceSlitMenuItem: public FbTk::MenuItem { | 240 | class PlaceSlitMenuItem: public FbTk::RadioMenuItem { |
240 | public: | 241 | public: |
241 | PlaceSlitMenuItem(const FbTk::FbString &label, Slit &slit, Slit::Placement place, FbTk::RefCount<FbTk::Command<void> > &cmd): | 242 | PlaceSlitMenuItem(const FbTk::FbString &label, Slit &slit, Slit::Placement place, FbTk::RefCount<FbTk::Command<void> > &cmd): |
242 | FbTk::MenuItem(label, cmd), m_slit(slit), m_place(place) { | 243 | FbTk::RadioMenuItem(label, cmd), m_slit(slit), m_place(place) { |
243 | setCloseOnClick(false); | 244 | setCloseOnClick(false); |
244 | } | 245 | } |
245 | bool isEnabled() const { return m_slit.placement() != m_place; } | 246 | bool isSelected() const { return m_slit.placement() == m_place; } |
246 | void click(int button, int time, unsigned int mods) { | 247 | void click(int button, int time, unsigned int mods) { |
247 | m_slit.setPlacement(m_place); | 248 | m_slit.setPlacement(m_place); |
248 | FbTk::MenuItem::click(button, time, mods); | 249 | FbTk::RadioMenuItem::click(button, time, mods); |
249 | } | 250 | } |
250 | private: | 251 | private: |
251 | Slit &m_slit; | 252 | Slit &m_slit; |
@@ -1291,7 +1292,7 @@ void Slit::setupMenu() { | |||
1291 | 1292 | ||
1292 | m_slitmenu.insert(alpha_menuitem); | 1293 | m_slitmenu.insert(alpha_menuitem); |
1293 | 1294 | ||
1294 | m_slitmenu.insert(new SlitDirMenuItem(_FB_XTEXT(Slit, Direction, "Slit Direction", "Orientation of slit"), | 1295 | m_slitmenu.insert(new SlitDirMenuItem(_FB_XTEXT(Slit, Direction, "Slit Direction:", "Orientation of slit"), |
1295 | *this, | 1296 | *this, |
1296 | save_and_reconfigure)); | 1297 | save_and_reconfigure)); |
1297 | m_slitmenu.insert(_FB_XTEXT(Slit, ClientsMenu, "Clients", "Slit client menu"), &m_clientlist_menu); | 1298 | m_slitmenu.insert(_FB_XTEXT(Slit, ClientsMenu, "Clients", "Slit client menu"), &m_clientlist_menu); |