aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 24bc66d..de19d1d 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -40,7 +40,7 @@
40#endif // XINERAMA 40#endif // XINERAMA
41 41
42#include "Strut.hh" 42#include "Strut.hh"
43#include "FbTk/ObjectRegistry.hh" 43#include "FbTk/CommandParser.hh"
44#include "Layer.hh" 44#include "Layer.hh"
45 45
46#include "FbTk/I18n.hh" 46#include "FbTk/I18n.hh"
@@ -159,7 +159,7 @@ getString() const {
159} // end namespace FbTk 159} // end namespace FbTk
160 160
161namespace { 161namespace {
162class SetToolbarPlacementCmd: public FbTk::Command { 162class SetToolbarPlacementCmd: public FbTk::Command<void> {
163public: 163public:
164 SetToolbarPlacementCmd(Toolbar &tbar, Toolbar::Placement place):m_tbar(tbar), m_place(place) { } 164 SetToolbarPlacementCmd(Toolbar &tbar, Toolbar::Placement place):m_tbar(tbar), m_place(place) { }
165 void execute() { 165 void execute() {
@@ -266,7 +266,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
266 266
267 // setup hide timer 267 // setup hide timer
268 m_hide_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay()); 268 m_hide_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay());
269 FbTk::RefCount<FbTk::Command> toggle_hidden(new FbTk::SimpleCommand<Toolbar>(*this, &Toolbar::toggleHidden)); 269 FbTk::RefCount<FbTk::Command<void> > toggle_hidden(new FbTk::SimpleCommand<Toolbar>(*this, &Toolbar::toggleHidden));
270 m_hide_timer.setCommand(toggle_hidden); 270 m_hide_timer.setCommand(toggle_hidden);
271 m_hide_timer.fireOnce(true); 271 m_hide_timer.fireOnce(true);
272 272
@@ -813,14 +813,14 @@ void Toolbar::setupMenus(bool skip_new_placement) {
813 _FB_USES_NLS; 813 _FB_USES_NLS;
814 using namespace FbTk; 814 using namespace FbTk;
815 815
816 typedef RefCount<Command> RefCommand; 816 typedef RefCount<Command<void> > RefCommand;
817 typedef SimpleCommand<Toolbar> ToolbarCommand; 817 typedef SimpleCommand<Toolbar> ToolbarCommand;
818 818
819 menu().setLabel(_FB_XTEXT(Toolbar, Toolbar, 819 menu().setLabel(_FB_XTEXT(Toolbar, Toolbar,
820 "Toolbar", "Title of Toolbar menu")); 820 "Toolbar", "Title of Toolbar menu"));
821 821
822 RefCommand reconfig_toolbar(new ToolbarCommand(*this, &Toolbar::reconfigure)); 822 RefCommand reconfig_toolbar(new ToolbarCommand(*this, &Toolbar::reconfigure));
823 RefCommand save_resources(FbTk::ObjectRegistry<Command>::instance().parse("saverc")); 823 RefCommand save_resources(FbTk::CommandParser<void>::instance().parse("saverc"));
824 MacroCommand *toolbar_menuitem_macro = new MacroCommand(); 824 MacroCommand *toolbar_menuitem_macro = new MacroCommand();
825 toolbar_menuitem_macro->add(reconfig_toolbar); 825 toolbar_menuitem_macro->add(reconfig_toolbar);
826 toolbar_menuitem_macro->add(save_resources); 826 toolbar_menuitem_macro->add(save_resources);
@@ -924,10 +924,10 @@ void Toolbar::setupMenus(bool skip_new_placement) {
924 0, 255, menu()); 924 0, 255, menu());
925 // setup command for alpha value 925 // setup command for alpha value
926 MacroCommand *alpha_macrocmd = new MacroCommand(); 926 MacroCommand *alpha_macrocmd = new MacroCommand();
927 RefCount<Command> alpha_cmd(new SimpleCommand<Toolbar>(*this, &Toolbar::updateAlpha)); 927 RefCount<Command<void> > alpha_cmd(new SimpleCommand<Toolbar>(*this, &Toolbar::updateAlpha));
928 alpha_macrocmd->add(save_resources); 928 alpha_macrocmd->add(save_resources);
929 alpha_macrocmd->add(alpha_cmd); 929 alpha_macrocmd->add(alpha_cmd);
930 RefCount<Command> set_alpha_cmd(alpha_macrocmd); 930 RefCount<Command<void> > set_alpha_cmd(alpha_macrocmd);
931 alpha_menuitem->setCommand(set_alpha_cmd); 931 alpha_menuitem->setCommand(set_alpha_cmd);
932 932
933 menu().insert(alpha_menuitem); 933 menu().insert(alpha_menuitem);