diff options
-rw-r--r-- | nls/C/Translation.m | 9 | ||||
-rw-r--r-- | nls/fluxbox-nls.hh | 10 | ||||
-rw-r--r-- | src/Keys.cc | 2 | ||||
-rw-r--r-- | src/MenuCreator.cc | 2 | ||||
-rw-r--r-- | src/Screen.cc | 4 |
5 files changed, 26 insertions, 1 deletions
diff --git a/nls/C/Translation.m b/nls/C/Translation.m index 4dcb17a..8d4c46f 100644 --- a/nls/C/Translation.m +++ b/nls/C/Translation.m | |||
@@ -132,6 +132,8 @@ $set 9 #Keys | |||
132 | 1 Keys: Error on line | 132 | 1 Keys: Error on line |
133 | 2 Keys: Failed to merge keytree!_OBSOLETE | 133 | 2 Keys: Failed to merge keytree!_OBSOLETE |
134 | 3 Keys: Invalid key/modifier on line | 134 | 3 Keys: Invalid key/modifier on line |
135 | 4 3rd argument is not a command. | ||
136 | 5 Error loading keys file: | ||
135 | 137 | ||
136 | $set 10 #Menu | 138 | $set 10 #Menu |
137 | 139 | ||
@@ -145,6 +147,11 @@ $set 10 #Menu | |||
145 | 8 Reload Config | 147 | 8 Reload Config |
146 | 9 Restart | 148 | 9 Restart |
147 | 10 Warning: unbalanced [encoding] tags | 149 | 10 Warning: unbalanced [encoding] tags |
150 | 11 Warning: Menu field %s is not a string | ||
151 | 12 Warning: Menu is not a lua table | ||
152 | 13 Loading root menu failed: | ||
153 | 14 Loading window menu failed: | ||
154 | 15 Unknown menu type: | ||
148 | 155 | ||
149 | $set 11 #Remember | 156 | $set 11 #Remember |
150 | 157 | ||
@@ -281,4 +288,6 @@ $set 20 #layers | |||
281 | 5 Normal | 288 | 5 Normal |
282 | 6 Top | 289 | 6 Top |
283 | 290 | ||
291 | $set 21 #FbCommands | ||
284 | 292 | ||
293 | 1 Failed to load menu file '%s': %s | ||
diff --git a/nls/fluxbox-nls.hh b/nls/fluxbox-nls.hh index 7ddc978..a0aefc8 100644 --- a/nls/fluxbox-nls.hh +++ b/nls/fluxbox-nls.hh | |||
@@ -130,6 +130,8 @@ enum { | |||
130 | KeysBadLine = 1, | 130 | KeysBadLine = 1, |
131 | KeysBadMerge = 2, | 131 | KeysBadMerge = 2, |
132 | KeysInvalidKeyMod = 3, | 132 | KeysInvalidKeyMod = 3, |
133 | KeysBad3rdArg = 4, | ||
134 | KeysLoadError = 5, | ||
133 | 135 | ||
134 | MenuSet = 10, | 136 | MenuSet = 10, |
135 | MenuConfiguration = 1, | 137 | MenuConfiguration = 1, |
@@ -142,6 +144,11 @@ enum { | |||
142 | MenuReconfigure = 8, | 144 | MenuReconfigure = 8, |
143 | MenuRestart = 9, | 145 | MenuRestart = 9, |
144 | MenuErrorEndEncoding = 10, | 146 | MenuErrorEndEncoding = 10, |
147 | MenuFieldNotString = 11, | ||
148 | MenuMenuNotTable = 12, | ||
149 | MenuRootLoad = 13, | ||
150 | MenuWindowLoad = 14, | ||
151 | MenuUnknownType = 15, | ||
145 | 152 | ||
146 | RememberSet = 11, | 153 | RememberSet = 11, |
147 | RememberDecorations = 1, | 154 | RememberDecorations = 1, |
@@ -250,6 +257,9 @@ enum { | |||
250 | LayerNormal = 5, | 257 | LayerNormal = 5, |
251 | LayerTop = 6, | 258 | LayerTop = 6, |
252 | 259 | ||
260 | FbCommandsSet = 21, | ||
261 | FbCommandsCantLoadMenu = 1, | ||
262 | |||
253 | dummy_not_used = 0 // just for the end | 263 | dummy_not_used = 0 // just for the end |
254 | 264 | ||
255 | }; // end enum | 265 | }; // end enum |
diff --git a/src/Keys.cc b/src/Keys.cc index 0a40a87..2fb11f9 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -223,6 +223,7 @@ int Keys::t_key::newindex(lua::state *l) | |||
223 | } else if(l->isnil(3)) | 223 | } else if(l->isnil(3)) |
224 | k2.reset(); | 224 | k2.reset(); |
225 | else { | 225 | else { |
226 | _FB_USES_NLS; | ||
226 | throw KeyError(_FB_CONSOLETEXT(Keys, Bad3rdArg, "3rd argument is not a command.", | 227 | throw KeyError(_FB_CONSOLETEXT(Keys, Bad3rdArg, "3rd argument is not a command.", |
227 | "3rd argument is not a command.")); | 228 | "3rd argument is not a command.")); |
228 | } | 229 | } |
@@ -578,6 +579,7 @@ void Keys::reload() { | |||
578 | l.call(0, 0); | 579 | l.call(0, 0); |
579 | } | 580 | } |
580 | catch(std::runtime_error &e) { | 581 | catch(std::runtime_error &e) { |
582 | _FB_USES_NLS; | ||
581 | cerr << _FB_CONSOLETEXT(Keys, LoadError, "Error loading keys file: ", | 583 | cerr << _FB_CONSOLETEXT(Keys, LoadError, "Error loading keys file: ", |
582 | "Actual error message follows") << e.what() << endl; | 584 | "Actual error message follows") << e.what() << endl; |
583 | loadDefaults(l); | 585 | loadDefaults(l); |
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index 9898b61..56b90c0 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc | |||
@@ -194,6 +194,7 @@ createMenu_(FbTk::Menu &inject_into, lua::state &l, FbTk::StringConvertor &conv, | |||
194 | void | 194 | void |
195 | insertMenuItem(lua::state &l, FbTk::Menu &menu, FbTk::StringConvertor &parent_conv, | 195 | insertMenuItem(lua::state &l, FbTk::Menu &menu, FbTk::StringConvertor &parent_conv, |
196 | FbTk::AutoReloadHelper *reloader) { | 196 | FbTk::AutoReloadHelper *reloader) { |
197 | _FB_USES_NLS; | ||
197 | lua::stack_sentry s(l, -1); | 198 | lua::stack_sentry s(l, -1); |
198 | l.checkstack(1); | 199 | l.checkstack(1); |
199 | 200 | ||
@@ -318,6 +319,7 @@ MenuCreator::createMenu(FbTk::Menu &inject_into, lua::state &l, FbTk::AutoReload | |||
318 | lua::stack_sentry s(l, -1); | 319 | lua::stack_sentry s(l, -1); |
319 | 320 | ||
320 | if(l.type(-1) != lua::TTABLE) { | 321 | if(l.type(-1) != lua::TTABLE) { |
322 | _FB_USES_NLS; | ||
321 | cerr << _FB_CONSOLETEXT(Menu, MenuNotTable, "Warning: Menu is not a lua table", | 323 | cerr << _FB_CONSOLETEXT(Menu, MenuNotTable, "Warning: Menu is not a lua table", |
322 | "Menu is not a lua table") << endl; | 324 | "Menu is not a lua table") << endl; |
323 | return; | 325 | return; |
diff --git a/src/Screen.cc b/src/Screen.cc index 250857b..36c2c6b 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1370,6 +1370,7 @@ void BScreen::rereadMenu() { | |||
1370 | MenuCreator::createMenu(*m_rootmenu, l, m_rootmenu->reloadHelper()); | 1370 | MenuCreator::createMenu(*m_rootmenu, l, m_rootmenu->reloadHelper()); |
1371 | } | 1371 | } |
1372 | catch(std::runtime_error &e) { | 1372 | catch(std::runtime_error &e) { |
1373 | _FB_USES_NLS; | ||
1373 | cerr << _FB_CONSOLETEXT(Menu, RootLoad, "Loading root menu failed: ", | 1374 | cerr << _FB_CONSOLETEXT(Menu, RootLoad, "Loading root menu failed: ", |
1374 | "Actual error message follows this string") << e.what() << endl; | 1375 | "Actual error message follows this string") << e.what() << endl; |
1375 | } | 1376 | } |
@@ -1407,7 +1408,8 @@ void BScreen::rereadWindowMenu() { | |||
1407 | MenuCreator::createMenu(*m_windowmenu, l, m_windowmenu->reloadHelper()); | 1408 | MenuCreator::createMenu(*m_windowmenu, l, m_windowmenu->reloadHelper()); |
1408 | } | 1409 | } |
1409 | catch(std::runtime_error &e) { | 1410 | catch(std::runtime_error &e) { |
1410 | cerr << _FB_CONSOLETEXT(Menu, RootLoad, "Loading window menu failed: ", | 1411 | _FB_USES_NLS; |
1412 | cerr << _FB_CONSOLETEXT(Menu, WindowLoad, "Loading window menu failed: ", | ||
1411 | "Actual error message follows this string") << e.what() << endl; | 1413 | "Actual error message follows this string") << e.what() << endl; |
1412 | } | 1414 | } |
1413 | } | 1415 | } |