aboutsummaryrefslogtreecommitdiff
path: root/src/MenuCreator.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-06-21 14:41:16 (GMT)
committersimonb <simonb>2006-06-21 14:41:16 (GMT)
commit3ada3b1f0d6d2debaaab48eecf828a406e964c8e (patch)
tree3c2f02462317408ee8604d0c7bb41092ecfd1c3a /src/MenuCreator.cc
parent62a298b0b30aa5b4990f462aece224e09e4fafe6 (diff)
downloadfluxbox-3ada3b1f0d6d2debaaab48eecf828a406e964c8e.zip
fluxbox-3ada3b1f0d6d2debaaab48eecf828a406e964c8e.tar.bz2
fix nls... notably classify text on conversion whether its for X or
console, plus handle catalogs better.
Diffstat (limited to 'src/MenuCreator.cc')
-rw-r--r--src/MenuCreator.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc
index 850c816..2aa73ba 100644
--- a/src/MenuCreator.cc
+++ b/src/MenuCreator.cc
@@ -193,13 +193,13 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) {
193 if (submenu == 0) 193 if (submenu == 0)
194 return; 194 return;
195 if (str_label.empty()) 195 if (str_label.empty())
196 menu.insert(_FBTEXT(Menu, Icons, "Icons", "Iconic windows menu title")); 196 menu.insert(_FB_XTEXT(Menu, Icons, "Icons", "Iconic windows menu title"));
197 else 197 else
198 menu.insert(str_label, submenu); 198 menu.insert(str_label, submenu);
199 } else if (str_key == "exit") { // exit 199 } else if (str_key == "exit") { // exit
200 FbTk::RefCount<FbTk::Command> exit_cmd(CommandParser::instance().parseLine("exit")); 200 FbTk::RefCount<FbTk::Command> exit_cmd(CommandParser::instance().parseLine("exit"));
201 if (str_label.empty()) 201 if (str_label.empty())
202 menu.insert(_FBTEXT(Menu, Exit, "Exit", "Exit Command"), exit_cmd); 202 menu.insert(_FB_XTEXT(Menu, Exit, "Exit", "Exit Command"), exit_cmd);
203 else 203 else
204 menu.insert(str_label, exit_cmd); 204 menu.insert(str_label, exit_cmd);
205 } else if (str_key == "exec") { 205 } else if (str_key == "exec") {
@@ -319,10 +319,10 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) {
319 // special NLS default labels 319 // special NLS default labels
320 if (str_label.empty()) { 320 if (str_label.empty()) {
321 if (str_key == "reconfig" || str_key == "reconfigure") { 321 if (str_key == "reconfig" || str_key == "reconfigure") {
322 menu.insert(_FBTEXT(Menu, Reconfigure, "Reload Config", "Reload all the configs"), command); 322 menu.insert(_FB_XTEXT(Menu, Reconfigure, "Reload Config", "Reload all the configs"), command);
323 return; 323 return;
324 } else if (str_key == "restart") { 324 } else if (str_key == "restart") {
325 menu.insert(_FBTEXT(Menu, Restart, "Restart", "Restart Command"), command); 325 menu.insert(_FB_XTEXT(Menu, Restart, "Restart", "Restart Command"), command);
326 return; 326 return;
327 } 327 }
328 } 328 }
@@ -490,7 +490,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
490 490
491 if (type == "shade") { 491 if (type == "shade") {
492 RefCmd shade_cmd(new WindowCmd<void>(&FluxboxWindow::shade)); 492 RefCmd shade_cmd(new WindowCmd<void>(&FluxboxWindow::shade));
493 menu.insert(label.empty()?_FBTEXT(Windowmenu, Shade, "Shade", "Shade the window"):label, shade_cmd); 493 menu.insert(label.empty()?_FB_XTEXT(Windowmenu, Shade, "Shade", "Shade the window"):label, shade_cmd);
494 } else if (type == "maximize") { 494 } else if (type == "maximize") {
495 RefCmd maximize_cmd(new WindowCmd<void>(&FluxboxWindow::maximizeFull)); 495 RefCmd maximize_cmd(new WindowCmd<void>(&FluxboxWindow::maximizeFull));
496 RefCmd maximize_vert_cmd(new WindowCmd<void>(&FluxboxWindow::maximizeVertical)); 496 RefCmd maximize_vert_cmd(new WindowCmd<void>(&FluxboxWindow::maximizeVertical));
@@ -498,7 +498,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
498 FbTk::MultiButtonMenuItem *maximize_item = 498 FbTk::MultiButtonMenuItem *maximize_item =
499 new FbTk::MultiButtonMenuItem(3, 499 new FbTk::MultiButtonMenuItem(3,
500 label.empty()? 500 label.empty()?
501 _FBTEXT(Windowmenu, Maximize, 501 _FB_XTEXT(Windowmenu, Maximize,
502 "Maximize", "Maximize the window"): 502 "Maximize", "Maximize the window"):
503 label); 503 label);
504 // create maximize item with: 504 // create maximize item with:
@@ -512,37 +512,37 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
512 } else if (type == "iconify") { 512 } else if (type == "iconify") {
513 RefCmd iconify_cmd(new WindowCmd<void>(&FluxboxWindow::iconify)); 513 RefCmd iconify_cmd(new WindowCmd<void>(&FluxboxWindow::iconify));
514 menu.insert(label.empty() ? 514 menu.insert(label.empty() ?
515 _FBTEXT(Windowmenu, Iconify, 515 _FB_XTEXT(Windowmenu, Iconify,
516 "Iconify", "Iconify the window") : 516 "Iconify", "Iconify the window") :
517 label, iconify_cmd); 517 label, iconify_cmd);
518 } else if (type == "close") { 518 } else if (type == "close") {
519 RefCmd close_cmd(new WindowCmd<void>(&FluxboxWindow::close)); 519 RefCmd close_cmd(new WindowCmd<void>(&FluxboxWindow::close));
520 menu.insert(label.empty() ? 520 menu.insert(label.empty() ?
521 _FBTEXT(Windowmenu, Close, 521 _FB_XTEXT(Windowmenu, Close,
522 "Close", "Close the window") : 522 "Close", "Close the window") :
523 label, close_cmd); 523 label, close_cmd);
524 } else if (type == "kill" || type == "killwindow") { 524 } else if (type == "kill" || type == "killwindow") {
525 RefCmd kill_cmd(new WindowCmd<void>(&FluxboxWindow::kill)); 525 RefCmd kill_cmd(new WindowCmd<void>(&FluxboxWindow::kill));
526 menu.insert(label.empty() ? 526 menu.insert(label.empty() ?
527 _FBTEXT(Windowmenu, Kill, 527 _FB_XTEXT(Windowmenu, Kill,
528 "Kill", "Kill the window"): 528 "Kill", "Kill the window"):
529 label, kill_cmd); 529 label, kill_cmd);
530 } else if (type == "lower") { 530 } else if (type == "lower") {
531 RefCmd lower_cmd(new WindowCmd<void>(&FluxboxWindow::lower)); 531 RefCmd lower_cmd(new WindowCmd<void>(&FluxboxWindow::lower));
532 menu.insert( label.empty() ? 532 menu.insert( label.empty() ?
533 _FBTEXT(Windowmenu, Lower, 533 _FB_XTEXT(Windowmenu, Lower,
534 "Lower", "Lower the window"): 534 "Lower", "Lower the window"):
535 label, lower_cmd); 535 label, lower_cmd);
536 } else if (type == "raise") { 536 } else if (type == "raise") {
537 RefCmd raise_cmd(new WindowCmd<void>(&FluxboxWindow::raise)); 537 RefCmd raise_cmd(new WindowCmd<void>(&FluxboxWindow::raise));
538 menu.insert(label.empty() ? 538 menu.insert(label.empty() ?
539 _FBTEXT(Windowmenu, Raise, 539 _FB_XTEXT(Windowmenu, Raise,
540 "Raise", "Raise the window"): 540 "Raise", "Raise the window"):
541 label, raise_cmd); 541 label, raise_cmd);
542 } else if (type == "stick") { 542 } else if (type == "stick") {
543 RefCmd stick_cmd(new WindowCmd<void>(&FluxboxWindow::stick)); 543 RefCmd stick_cmd(new WindowCmd<void>(&FluxboxWindow::stick));
544 menu.insert(label.empty() ? 544 menu.insert(label.empty() ?
545 _FBTEXT(Windowmenu, Stick, 545 _FB_XTEXT(Windowmenu, Stick,
546 "Stick", "Stick the window"): 546 "Stick", "Stick the window"):
547 label, stick_cmd); 547 label, stick_cmd);
548 } else if (type == "extramenus") { 548 } else if (type == "extramenus") {
@@ -555,7 +555,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
555 } 555 }
556 556
557 } else if (type == "sendto") { 557 } else if (type == "sendto") {
558 menu.insert(label.empty() ? _FBTEXT(Windowmenu, SendTo, "Send To...", "Send to menu item name"): 558 menu.insert(label.empty() ? _FB_XTEXT(Windowmenu, SendTo, "Send To...", "Send to menu item name"):
559 label, new SendToMenu(*Fluxbox::instance()->findScreen(menu.screenNumber()))); 559 label, new SendToMenu(*Fluxbox::instance()->findScreen(menu.screenNumber())));
560 } else if (type == "layer") { 560 } else if (type == "layer") {
561 BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber()); 561 BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber());
@@ -570,7 +570,7 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
570 &context, 570 &context,
571 false); 571 false);
572 submenu->disableTitle(); 572 submenu->disableTitle();
573 menu.insert(label.empty()?_FBTEXT(Windowmenu, Layer, "Layer ...", "Layer menu"):label, submenu); 573 menu.insert(label.empty()?_FB_XTEXT(Windowmenu, Layer, "Layer ...", "Layer menu"):label, submenu);
574 574
575 575
576 } else if (type == "separator") { 576 } else if (type == "separator") {