aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-06-07 11:46:05 (GMT)
committerrathnor <rathnor>2004-06-07 11:46:05 (GMT)
commitfff4456dee29e675d7f2ed3490db39bcb7e10e53 (patch)
tree2d2dbf386551773cbdc8231b2a93b493187bd733 /src/IconbarTool.cc
parent073065ac56b388db1169108d44f37d32f1d19c67 (diff)
downloadfluxbox-fff4456dee29e675d7f2ed3490db39bcb7e10e53.zip
fluxbox-fff4456dee29e675d7f2ed3490db39bcb7e10e53.tar.bz2
update NLS string handling...
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc66
1 files changed, 45 insertions, 21 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index ae14fc3..502117a 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: IconbarTool.cc,v 1.36 2004/04/26 15:04:37 rathnor Exp $ 23// $Id: IconbarTool.cc,v 1.37 2004/06/07 11:46:04 rathnor Exp $
24 24
25#include "IconbarTool.hh" 25#include "IconbarTool.hh"
26 26
@@ -35,6 +35,7 @@
35#include "CommandParser.hh" 35#include "CommandParser.hh"
36#include "WinClient.hh" 36#include "WinClient.hh"
37 37
38#include "FbTk/I18n.hh"
38#include "FbTk/Menu.hh" 39#include "FbTk/Menu.hh"
39#include "FbTk/MenuItem.hh" 40#include "FbTk/MenuItem.hh"
40#include "FbTk/RefCount.hh" 41#include "FbTk/RefCount.hh"
@@ -87,7 +88,7 @@ void FbTk::Resource<Container::Alignment>::setFromString(const char *str) {
87 m_value = Container::LEFT; 88 m_value = Container::LEFT;
88 else if (strcasecmp(str, "Right") == 0) 89 else if (strcasecmp(str, "Right") == 0)
89 m_value = Container::RIGHT; 90 m_value = Container::RIGHT;
90 else if (strcasecmp(str, "RELATIVE") == 0) 91 else if (strcasecmp(str, "Relative") == 0)
91 m_value = Container::RELATIVE; 92 m_value = Container::RELATIVE;
92 else 93 else
93 setDefaultValue(); 94 setDefaultValue();
@@ -157,32 +158,55 @@ private:
157 158
158void setupModeMenu(FbTk::Menu &menu, IconbarTool &handler) { 159void setupModeMenu(FbTk::Menu &menu, IconbarTool &handler) {
159 using namespace FbTk; 160 using namespace FbTk;
161 _FB_USES_NLS;
160 162
161 // TODO: nls 163 menu.setLabel(_FBTEXT(Toolbar, IconbarMode, "Iconbar Mode", "Menu title - chooses which set of icons are shown in the iconbar"));
162 menu.setLabel("Iconbar Mode");
163 164
164 RefCount<Command> saverc_cmd(new SimpleCommand<Fluxbox>( 165 RefCount<Command> saverc_cmd(new SimpleCommand<Fluxbox>(
165 *Fluxbox::instance(), 166 *Fluxbox::instance(),
166 &Fluxbox::save_rc)); 167 &Fluxbox::save_rc));
167 168
168 //TODO: nls 169 menu.insert(new ToolbarModeMenuItem(_FBTEXT(Toolbar, IconbarModeNone, "None", "No icons are shown in the iconbar"),
169 menu.insert(new ToolbarModeMenuItem("None", handler, 170 handler,
170 IconbarTool::NONE, saverc_cmd)); 171 IconbarTool::NONE, saverc_cmd));
171 menu.insert(new ToolbarModeMenuItem("Icons", handler, 172
172 IconbarTool::ICONS, saverc_cmd)); 173 menu.insert(new ToolbarModeMenuItem(
173 menu.insert(new ToolbarModeMenuItem("Workspace Icons", handler, 174 _FBTEXT(Toolbar, IconbarModeIcons, "Icons", "Iconified windows from all workspaces are shown"),
174 IconbarTool::WORKSPACEICONS, saverc_cmd)); 175 handler,
175 menu.insert(new ToolbarModeMenuItem("Workspace", handler, 176 IconbarTool::ICONS, saverc_cmd));
176 IconbarTool::WORKSPACE, saverc_cmd)); 177
177 menu.insert(new ToolbarModeMenuItem("All Windows", handler, 178 menu.insert(new ToolbarModeMenuItem(
178 IconbarTool::ALLWINDOWS, saverc_cmd)); 179 _FBTEXT(Toolbar, IconbarModeWorkspaceIcons, "WorkspaceIcons", "Iconified windows from this workspace are shown"),
180 handler,
181 IconbarTool::WORKSPACEICONS, saverc_cmd));
182
183 menu.insert(new ToolbarModeMenuItem(
184 _FBTEXT(Toolbar, IconbarModeWorkspace, "Workspace", "Normal and iconified windows from this workspace are shown"),
185 handler,
186 IconbarTool::WORKSPACE, saverc_cmd));
187
188 menu.insert(new ToolbarModeMenuItem(
189 _FBTEXT(Toolbar, IconbarModeAllWindows, "All Windows", "All windows are shown"),
190 handler,
191 IconbarTool::ALLWINDOWS, saverc_cmd));
192
179 menu.insert("---"); // separator line 193 menu.insert("---"); // separator line
180 menu.insert(new ToolbarAlignMenuItem("Left", handler, 194
181 Container::LEFT, saverc_cmd)); 195 menu.insert(new ToolbarAlignMenuItem(
182 menu.insert(new ToolbarAlignMenuItem("Relative", handler, 196 _FBTEXT(Align, Left, "Left", "Align to the left"),
183 Container::RELATIVE, saverc_cmd)); 197 handler,
184 menu.insert(new ToolbarAlignMenuItem("Right", handler, 198 Container::LEFT, saverc_cmd));
185 Container::RIGHT, saverc_cmd)); 199
200 menu.insert(new ToolbarAlignMenuItem(
201 _FBTEXT(Align, Relative, "Relative", "Align relative to the width"),
202 handler,
203 Container::RELATIVE, saverc_cmd));
204
205 menu.insert(new ToolbarAlignMenuItem(
206 _FBTEXT(Align, Right, "Right", "Align to the right"),
207 handler,
208 Container::RIGHT, saverc_cmd));
209
186 menu.insert("---"); // separator line 210 menu.insert("---"); // separator line
187 menu.update(); 211 menu.update();
188} 212}