diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 05:47:55 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 05:47:55 (GMT) |
commit | e8a2f155e8d5a082a8c04f291e65c137c20a05cb (patch) | |
tree | 4107154a6c73d518b604aab43371c994ae172624 /src/IconbarTool.cc | |
parent | 00ceefd8846bda6f4dc43a5a990086545ea28727 (diff) | |
download | fluxbox_pavel-e8a2f155e8d5a082a8c04f291e65c137c20a05cb.zip fluxbox_pavel-e8a2f155e8d5a082a8c04f291e65c137c20a05cb.tar.bz2 |
moved Container to FbTk
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r-- | src/IconbarTool.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index 294754c..de56569 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc | |||
@@ -69,31 +69,31 @@ using std::endl; | |||
69 | namespace FbTk { | 69 | namespace FbTk { |
70 | 70 | ||
71 | template<> | 71 | template<> |
72 | void FbTk::Resource<Container::Alignment>::setDefaultValue() { | 72 | void FbTk::Resource<FbTk::Container::Alignment>::setDefaultValue() { |
73 | m_value = Container::RELATIVE; | 73 | m_value = FbTk::Container::RELATIVE; |
74 | } | 74 | } |
75 | 75 | ||
76 | template<> | 76 | template<> |
77 | string FbTk::Resource<Container::Alignment>::getString() const { | 77 | string FbTk::Resource<FbTk::Container::Alignment>::getString() const { |
78 | switch (m_value) { | 78 | switch (m_value) { |
79 | case Container::LEFT: | 79 | case FbTk::Container::LEFT: |
80 | return string("Left"); | 80 | return string("Left"); |
81 | case Container::RIGHT: | 81 | case FbTk::Container::RIGHT: |
82 | return string("Right"); | 82 | return string("Right"); |
83 | case Container::RELATIVE: | 83 | case FbTk::Container::RELATIVE: |
84 | return string("Relative"); | 84 | return string("Relative"); |
85 | } | 85 | } |
86 | return string("Left"); | 86 | return string("Left"); |
87 | } | 87 | } |
88 | 88 | ||
89 | template<> | 89 | template<> |
90 | void FbTk::Resource<Container::Alignment>::setFromString(const char *str) { | 90 | void FbTk::Resource<FbTk::Container::Alignment>::setFromString(const char *str) { |
91 | if (strcasecmp(str, "Left") == 0) | 91 | if (strcasecmp(str, "Left") == 0) |
92 | m_value = Container::LEFT; | 92 | m_value = FbTk::Container::LEFT; |
93 | else if (strcasecmp(str, "Right") == 0) | 93 | else if (strcasecmp(str, "Right") == 0) |
94 | m_value = Container::RIGHT; | 94 | m_value = FbTk::Container::RIGHT; |
95 | else if (strcasecmp(str, "Relative") == 0) | 95 | else if (strcasecmp(str, "Relative") == 0) |
96 | m_value = Container::RELATIVE; | 96 | m_value = FbTk::Container::RELATIVE; |
97 | else | 97 | else |
98 | setDefaultValue(); | 98 | setDefaultValue(); |
99 | } | 99 | } |
@@ -124,7 +124,7 @@ private: | |||
124 | class ToolbarAlignMenuItem: public FbTk::MenuItem { | 124 | class ToolbarAlignMenuItem: public FbTk::MenuItem { |
125 | public: | 125 | public: |
126 | ToolbarAlignMenuItem(const FbTk::FbString &label, IconbarTool &handler, | 126 | ToolbarAlignMenuItem(const FbTk::FbString &label, IconbarTool &handler, |
127 | Container::Alignment mode, | 127 | FbTk::Container::Alignment mode, |
128 | FbTk::RefCount<FbTk::Command> &cmd): | 128 | FbTk::RefCount<FbTk::Command> &cmd): |
129 | FbTk::MenuItem(label, cmd), m_handler(handler), m_mode(mode) { | 129 | FbTk::MenuItem(label, cmd), m_handler(handler), m_mode(mode) { |
130 | setCloseOnClick(false); | 130 | setCloseOnClick(false); |
@@ -137,7 +137,7 @@ public: | |||
137 | 137 | ||
138 | private: | 138 | private: |
139 | IconbarTool &m_handler; | 139 | IconbarTool &m_handler; |
140 | Container::Alignment m_mode; | 140 | FbTk::Container::Alignment m_mode; |
141 | }; | 141 | }; |
142 | 142 | ||
143 | void setupModeMenu(FbTk::Menu &menu, IconbarTool &handler) { | 143 | void setupModeMenu(FbTk::Menu &menu, IconbarTool &handler) { |
@@ -194,17 +194,17 @@ void setupModeMenu(FbTk::Menu &menu, IconbarTool &handler) { | |||
194 | menu.insert(new ToolbarAlignMenuItem( | 194 | menu.insert(new ToolbarAlignMenuItem( |
195 | _FB_XTEXT(Align, Left, "Left", "Align to the left"), | 195 | _FB_XTEXT(Align, Left, "Left", "Align to the left"), |
196 | handler, | 196 | handler, |
197 | Container::LEFT, saverc_cmd)); | 197 | FbTk::Container::LEFT, saverc_cmd)); |
198 | 198 | ||
199 | menu.insert(new ToolbarAlignMenuItem( | 199 | menu.insert(new ToolbarAlignMenuItem( |
200 | _FB_XTEXT(Align, Relative, "Relative", "Align relative to the width"), | 200 | _FB_XTEXT(Align, Relative, "Relative", "Align relative to the width"), |
201 | handler, | 201 | handler, |
202 | Container::RELATIVE, saverc_cmd)); | 202 | FbTk::Container::RELATIVE, saverc_cmd)); |
203 | 203 | ||
204 | menu.insert(new ToolbarAlignMenuItem( | 204 | menu.insert(new ToolbarAlignMenuItem( |
205 | _FB_XTEXT(Align, Right, "Right", "Align to the right"), | 205 | _FB_XTEXT(Align, Right, "Right", "Align to the right"), |
206 | handler, | 206 | handler, |
207 | Container::RIGHT, saverc_cmd)); | 207 | FbTk::Container::RIGHT, saverc_cmd)); |
208 | 208 | ||
209 | menu.insert(new FbTk::MenuSeparator()); | 209 | menu.insert(new FbTk::MenuSeparator()); |
210 | 210 | ||
@@ -266,7 +266,7 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, | |||
266 | m_mode("none"), | 266 | m_mode("none"), |
267 | m_rc_mode(screen.resourceManager(), "{static groups} (workspace)", | 267 | m_rc_mode(screen.resourceManager(), "{static groups} (workspace)", |
268 | screen.name() + ".iconbar.mode", screen.altName() + ".Iconbar.Mode"), | 268 | screen.name() + ".iconbar.mode", screen.altName() + ".Iconbar.Mode"), |
269 | m_rc_alignment(screen.resourceManager(), Container::LEFT, | 269 | m_rc_alignment(screen.resourceManager(), FbTk::Container::LEFT, |
270 | screen.name() + ".iconbar.alignment", screen.altName() + ".Iconbar.Alignment"), | 270 | screen.name() + ".iconbar.alignment", screen.altName() + ".Iconbar.Alignment"), |
271 | m_rc_client_width(screen.resourceManager(), 70, | 271 | m_rc_client_width(screen.resourceManager(), 70, |
272 | screen.name() + ".iconbar.iconWidth", screen.altName() + ".Iconbar.IconWidth"), | 272 | screen.name() + ".iconbar.iconWidth", screen.altName() + ".Iconbar.IconWidth"), |
@@ -331,7 +331,7 @@ void IconbarTool::hide() { | |||
331 | m_icon_container.hide(); | 331 | m_icon_container.hide(); |
332 | } | 332 | } |
333 | 333 | ||
334 | void IconbarTool::setAlignment(Container::Alignment align) { | 334 | void IconbarTool::setAlignment(FbTk::Container::Alignment align) { |
335 | *m_rc_alignment = align; | 335 | *m_rc_alignment = align; |
336 | update(0); | 336 | update(0); |
337 | m_menu.reconfigure(); | 337 | m_menu.reconfigure(); |