aboutsummaryrefslogtreecommitdiff
path: root/src/ToolFactory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ToolFactory.cc')
-rw-r--r--src/ToolFactory.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ToolFactory.cc b/src/ToolFactory.cc
index 60b283c..a033656 100644
--- a/src/ToolFactory.cc
+++ b/src/ToolFactory.cc
@@ -29,6 +29,7 @@
29#endif 29#endif
30#include "IconbarTool.hh" 30#include "IconbarTool.hh"
31#include "WorkspaceNameTool.hh" 31#include "WorkspaceNameTool.hh"
32#include "SpacerTool.hh"
32#include "ArrowButton.hh" 33#include "ArrowButton.hh"
33 34
34// Themes 35// Themes
@@ -98,6 +99,16 @@ ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &
98#endif 99#endif
99 } else if (name == "clock") { 100 } else if (name == "clock") {
100 item = new ClockTool(parent, m_clock_theme, screen(), tbar.menu()); 101 item = new ClockTool(parent, m_clock_theme, screen(), tbar.menu());
102 } else if (name.find("spacer") == 0) {
103 int size = -1;
104 if (name.size() > 6) { // spacer_20 creates a 20px spacer
105 if (name.at(6) != '_')
106 return 0;
107 size = atoi(name.substr(7, std::string::npos).c_str());
108 if (size < 1)
109 return 0;
110 }
111 item = new SpacerTool(size);
101 } else { 112 } else {
102 113
103 std::string cmd_str = name; 114 std::string cmd_str = name;