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/ClockTool.cc | |
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/ClockTool.cc')
-rw-r--r-- | src/ClockTool.cc | 19 |
1 files changed, 13 insertions, 6 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); |