aboutsummaryrefslogtreecommitdiff
path: root/src/ToolFactory.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-11 07:41:22 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-11 07:41:22 (GMT)
commit9f2f65a698c4cc71373a7fe9d73a0889e0d3487b (patch)
tree4ad67db771d73ea3c48f80a1244037fc9754edd2 /src/ToolFactory.cc
parent1f01d84c080d607a91eb417efcaf5e500b5f1d7e (diff)
downloadfluxbox_pavel-9f2f65a698c4cc71373a7fe9d73a0889e0d3487b.zip
fluxbox_pavel-9f2f65a698c4cc71373a7fe9d73a0889e0d3487b.tar.bz2
make FbTk::Command a template class, split parsing information out of ObjectRegistry
Diffstat (limited to 'src/ToolFactory.cc')
-rw-r--r--src/ToolFactory.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ToolFactory.cc b/src/ToolFactory.cc
index 87299cc..074ae71 100644
--- a/src/ToolFactory.cc
+++ b/src/ToolFactory.cc
@@ -34,7 +34,7 @@
34#include "WorkspaceNameTheme.hh" 34#include "WorkspaceNameTheme.hh"
35#include "ButtonTheme.hh" 35#include "ButtonTheme.hh"
36 36
37#include "FbTk/ObjectRegistry.hh" 37#include "FbTk/CommandParser.hh"
38#include "Screen.hh" 38#include "Screen.hh"
39#include "Toolbar.hh" 39#include "Toolbar.hh"
40#include "fluxbox.hh" 40#include "fluxbox.hh"
@@ -42,7 +42,7 @@
42#include <utility> 42#include <utility>
43 43
44namespace { 44namespace {
45class ShowMenuAboveToolbar: public FbTk::Command { 45class ShowMenuAboveToolbar: public FbTk::Command<void> {
46public: 46public:
47 explicit ShowMenuAboveToolbar(Toolbar &tbar):m_tbar(tbar) { } 47 explicit ShowMenuAboveToolbar(Toolbar &tbar):m_tbar(tbar) { }
48 void execute() { 48 void execute() {
@@ -92,7 +92,7 @@ ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &
92 WorkspaceNameTool *witem = new WorkspaceNameTool(parent, 92 WorkspaceNameTool *witem = new WorkspaceNameTool(parent,
93 *m_workspace_theme, screen()); 93 *m_workspace_theme, screen());
94 using namespace FbTk; 94 using namespace FbTk;
95 RefCount<Command> showmenu(new ShowMenuAboveToolbar(tbar)); 95 RefCount<Command<void> > showmenu(new ShowMenuAboveToolbar(tbar));
96 witem->button().setOnClick(showmenu); 96 witem->button().setOnClick(showmenu);
97 item = witem; 97 item = witem;
98 } else if (name == "iconbar") { 98 } else if (name == "iconbar") {
@@ -104,7 +104,7 @@ ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &
104 } else if (name == "nextworkspace" || 104 } else if (name == "nextworkspace" ||
105 name == "prevworkspace") { 105 name == "prevworkspace") {
106 106
107 FbTk::RefCount<FbTk::Command> cmd(FbTk::ObjectRegistry<FbTk::Command>::instance().parse(name)); 107 FbTk::RefCount<FbTk::Command<void> > cmd(FbTk::CommandParser<void>::instance().parse(name));
108 if (*cmd == 0) // we need a command 108 if (*cmd == 0) // we need a command
109 return 0; 109 return 0;
110 110
@@ -124,7 +124,7 @@ ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &
124 } else if (name == "nextwindow" || 124 } else if (name == "nextwindow" ||
125 name == "prevwindow") { 125 name == "prevwindow") {
126 126
127 FbTk::RefCount<FbTk::Command> cmd(FbTk::ObjectRegistry<FbTk::Command>::instance().parse(name)); 127 FbTk::RefCount<FbTk::Command<void> > cmd(FbTk::CommandParser<void>::instance().parse(name));
128 if (*cmd == 0) // we need a command 128 if (*cmd == 0) // we need a command
129 return 0; 129 return 0;
130 130