diff options
author | rathnor <rathnor> | 2004-10-10 12:00:37 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2004-10-10 12:00:37 (GMT) |
commit | af9e76fce54ae0b2735273e41440e6d68f009bbd (patch) | |
tree | 95b0bcba50bbb51886757972ff35da50de3736e6 /src | |
parent | d8b796d3c6529a70d65d40872d2e5eca1269fdcb (diff) | |
download | fluxbox-af9e76fce54ae0b2735273e41440e6d68f009bbd.zip fluxbox-af9e76fce54ae0b2735273e41440e6d68f009bbd.tar.bz2 |
* Update de_DE Translation and add some missing NLS values
(Thanks Christian Storm)
- also a tiny cleanup of weird nls set
Diffstat (limited to 'src')
-rw-r--r-- | src/ClockTool.cc | 19 | ||||
-rw-r--r-- | src/IconbarTool.cc | 7 |
2 files changed, 17 insertions, 9 deletions
diff --git a/src/ClockTool.cc b/src/ClockTool.cc index f428fae..621351c 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.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: ClockTool.cc,v 1.15 2004/09/12 14:56:18 rathnor Exp $ | 23 | // $Id: ClockTool.cc,v 1.16 2004/10/10 12:00:37 rathnor Exp $ |
24 | 24 | ||
25 | #include "ClockTool.hh" | 25 | #include "ClockTool.hh" |
26 | 26 | ||
@@ -34,6 +34,7 @@ | |||
34 | #include "FbTk/ImageControl.hh" | 34 | #include "FbTk/ImageControl.hh" |
35 | #include "FbTk/Menu.hh" | 35 | #include "FbTk/Menu.hh" |
36 | #include "FbTk/MenuItem.hh" | 36 | #include "FbTk/MenuItem.hh" |
37 | #include "FbTk/I18n.hh" | ||
37 | 38 | ||
38 | #ifdef HAVE_CONFIG_H | 39 | #ifdef HAVE_CONFIG_H |
39 | #include "config.h" | 40 | #include "config.h" |
@@ -53,12 +54,13 @@ public: | |||
53 | explicit ClockMenuItem::ClockMenuItem(ClockTool &tool): | 54 | explicit ClockMenuItem::ClockMenuItem(ClockTool &tool): |
54 | FbTk::MenuItem(""), m_tool(tool) { | 55 | FbTk::MenuItem(""), m_tool(tool) { |
55 | // determine 12/24 hour format | 56 | // determine 12/24 hour format |
57 | _FB_USES_NLS; | ||
56 | if (m_tool.timeFormat().find("%k") != std::string::npos || | 58 | if (m_tool.timeFormat().find("%k") != std::string::npos || |
57 | m_tool.timeFormat().find("%H") != std::string::npos || | 59 | m_tool.timeFormat().find("%H") != std::string::npos || |
58 | m_tool.timeFormat().find("%T") != std::string::npos) | 60 | m_tool.timeFormat().find("%T") != std::string::npos) |
59 | setLabel("Clock: 24h"); | 61 | setLabel( _FBTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") ); |
60 | else | 62 | else |
61 | setLabel("Clock: 12h"); | 63 | setLabel( _FBTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") ); |
62 | } | 64 | } |
63 | 65 | ||
64 | void click(int button, int time) { | 66 | void click(int button, int time) { |
@@ -66,6 +68,9 @@ public: | |||
66 | size_t pos = newformat.find("%k"); | 68 | size_t pos = newformat.find("%k"); |
67 | std::string newstr; | 69 | std::string newstr; |
68 | bool clock24hour = true; | 70 | bool clock24hour = true; |
71 | |||
72 | _FB_USES_NLS; | ||
73 | |||
69 | if (pos != std::string::npos) | 74 | if (pos != std::string::npos) |
70 | newstr = "%l"; | 75 | newstr = "%l"; |
71 | else if ((pos = newformat.find("%H")) != std::string::npos) | 76 | else if ((pos = newformat.find("%H")) != std::string::npos) |
@@ -102,9 +107,9 @@ public: | |||
102 | if (m_tool.timeFormat().find("%k") != std::string::npos || | 107 | if (m_tool.timeFormat().find("%k") != std::string::npos || |
103 | m_tool.timeFormat().find("%H") != std::string::npos || | 108 | m_tool.timeFormat().find("%H") != std::string::npos || |
104 | m_tool.timeFormat().find("%T") != std::string::npos) | 109 | m_tool.timeFormat().find("%T") != std::string::npos) |
105 | setLabel("Clock: 24h"); | 110 | setLabel( _FBTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") ); |
106 | else | 111 | else |
107 | setLabel("Clock: 12h"); | 112 | setLabel( _FBTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") ); |
108 | 113 | ||
109 | } // else some other strange format...so we don't do anything | 114 | } // else some other strange format...so we don't do anything |
110 | FbTk::MenuItem::click(button, time); | 115 | FbTk::MenuItem::click(button, time); |
@@ -142,6 +147,8 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent, | |||
142 | // attach signals | 147 | // attach signals |
143 | theme.reconfigSig().attach(this); | 148 | theme.reconfigSig().attach(this); |
144 | 149 | ||
150 | _FB_USES_NLS; | ||
151 | |||
145 | // setup timer to update the graphics each second | 152 | // setup timer to update the graphics each second |
146 | timeval delay; | 153 | timeval delay; |
147 | delay.tv_sec = 1; | 154 | delay.tv_sec = 1; |
@@ -160,7 +167,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent, | |||
160 | item->setCommand(saverc); | 167 | item->setCommand(saverc); |
161 | menu.insert(item); | 168 | menu.insert(item); |
162 | FbTk::RefCount<FbTk::Command> editformat_cmd(new EditClockFormatCmd()); | 169 | FbTk::RefCount<FbTk::Command> editformat_cmd(new EditClockFormatCmd()); |
163 | menu.insert("Edit Clock Format", editformat_cmd); | 170 | menu.insert(_FBTEXT(Toolbar, ClockEditFormat, "Edit Clock Format", "edit Clock Format") , editformat_cmd); |
164 | 171 | ||
165 | 172 | ||
166 | update(0); | 173 | update(0); |
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index b36690f..ac974c5 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.46 2004/09/12 14:56:18 rathnor Exp $ | 23 | // $Id: IconbarTool.cc,v 1.47 2004/10/10 12:00:37 rathnor Exp $ |
24 | 24 | ||
25 | #include "IconbarTool.hh" | 25 | #include "IconbarTool.hh" |
26 | 26 | ||
@@ -286,7 +286,7 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, BScr | |||
286 | 286 | ||
287 | // setup mode menu | 287 | // setup mode menu |
288 | setupModeMenu(m_menu, *this); | 288 | setupModeMenu(m_menu, *this); |
289 | 289 | _FB_USES_NLS; | |
290 | using namespace FbTk; | 290 | using namespace FbTk; |
291 | // setup use pixmap item to reconfig iconbar and save resource on click | 291 | // setup use pixmap item to reconfig iconbar and save resource on click |
292 | MacroCommand *save_and_reconfig = new MacroCommand(); | 292 | MacroCommand *save_and_reconfig = new MacroCommand(); |
@@ -295,7 +295,8 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, BScr | |||
295 | save_and_reconfig->add(reconfig); | 295 | save_and_reconfig->add(reconfig); |
296 | save_and_reconfig->add(save); | 296 | save_and_reconfig->add(save); |
297 | RefCount<Command> s_and_reconfig(save_and_reconfig); | 297 | RefCount<Command> s_and_reconfig(save_and_reconfig); |
298 | m_menu.insert(new BoolMenuItem("Show Pictures", *m_rc_use_pixmap, s_and_reconfig)); | 298 | m_menu.insert(new BoolMenuItem(_FBTEXT(Toolbar, ShowIcons, "Show Pictures", "chooses if little icons are shown next to title in the iconbar") , |
299 | *m_rc_use_pixmap, s_and_reconfig)); | ||
299 | m_menu.update(); | 300 | m_menu.update(); |
300 | // must be internal menu, otherwise toolbar main menu tries to delete it. | 301 | // must be internal menu, otherwise toolbar main menu tries to delete it. |
301 | m_menu.setInternalMenu(); | 302 | m_menu.setInternalMenu(); |