Ticket #7529: Chart.patch
File Chart.patch, 19.2 KB (added by , 13 years ago) |
---|
-
src/tests/kits/game/chart/Chart.cpp
1 1 /* 2 2 3 3 Chart.cpp 4 4 5 5 by Pierre Raynaud-Richard. 6 6 7 7 */ 8 8 9 9 /* … … 14 14 #include "ChartWindow.h" 15 15 #include "Chart.h" 16 16 17 #include <Catalog.h> 17 18 #include <Debug.h> 18 19 20 #undef B_TRANSLATE_CONTEXT 21 #define B_TRANSLATE_CONTEXT "Chart" 22 19 23 int 20 24 main() 21 { 25 { 22 26 ChartApp *app = new ChartApp(); 23 27 app->Run(); 24 28 25 29 delete app; 26 30 return 0; 27 31 } … … 29 33 30 34 ChartApp::ChartApp() : BApplication("application/x-vnd.Be.ChartDemo") 31 35 { 32 fWindow = new ChartWindow(BRect(120, 150, 629, 591), "Chart"); 33 36 fWindow = new ChartWindow(BRect(120, 150, 629, 591), 37 B_TRANSLATE_SYSTEM_NAME("Chart")); 38 34 39 // showing the window will also start the direct connection. If you 35 40 // Sync() after the show, the direct connection will be established 36 41 // when the Sync() return (as far as any part of the content area of -
src/tests/kits/game/chart/Jamfile
8 8 ChartRender.cpp 9 9 ChartView.cpp 10 10 ChartWindow.cpp 11 : be game $( TARGET_LIBSUPC++)11 : be game $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) 12 12 : Chart.rdef 13 13 ; 14 14 15 DoCatalogs Chart : 16 x-vnd.Be.ChartDemo 17 : 18 Chart.cpp 19 ChartWindow.cpp 20 ; 21 15 22 if $(TARGET_PLATFORM) = libbe_test { 16 23 HaikuInstall install-test-apps : $(HAIKU_APP_TEST_DIR) : Chart 17 24 : tests!apps ; -
src/tests/kits/game/chart/ChartWindow.cpp
16 16 #include <Box.h> 17 17 #include <Button.h> 18 18 #include <ByteOrder.h> 19 #include <Catalog.h> 19 20 #include <CheckBox.h> 20 21 #include <Directory.h> 21 22 #include <Entry.h> … … 38 39 #include <string.h> 39 40 #include <stdlib.h> 40 41 42 #undef B_TRANSLATE_CONTEXT 43 #define B_TRANSLATE_CONTEXT "ChartWindow" 44 41 45 /* pseudo-random generator parameters (not very good ones, 42 46 but good enough for what we do here). */ 43 47 enum { … … 487 491 h += INSTANT_LOAD+H_BORDER; 488 492 489 493 /* camera animation popup */ 490 menu = new BPopUpMenu( "Off");491 item = new BMenuItem( "Off", new BMessage(ANIM_OFF_MSG));494 menu = new BPopUpMenu(B_TRANSLATE("Off")); 495 item = new BMenuItem(B_TRANSLATE("Off"), new BMessage(ANIM_OFF_MSG)); 492 496 item->SetTarget(this); 493 497 menu->AddItem(item); 494 item = new BMenuItem("Slow rotation", new BMessage(ANIM_SLOW_ROT_MSG)); 498 item = new BMenuItem(B_TRANSLATE("Slow rotation"), 499 new BMessage(ANIM_SLOW_ROT_MSG)); 495 500 item->SetTarget(this); 496 501 menu->AddItem(item); 497 item = new BMenuItem("Slow motion", new BMessage(ANIM_SLOW_MOVE_MSG)); 502 item = new BMenuItem(B_TRANSLATE("Slow motion"), 503 new BMessage(ANIM_SLOW_MOVE_MSG)); 498 504 item->SetTarget(this); 499 505 menu->AddItem(item); 500 item = new BMenuItem("Fast motion", new BMessage(ANIM_FAST_MOVE_MSG)); 506 item = new BMenuItem(B_TRANSLATE("Fast motion"), 507 new BMessage(ANIM_FAST_MOVE_MSG)); 501 508 item->SetTarget(this); 502 509 menu->AddItem(item); 503 item = new BMenuItem("Free motion", new BMessage(ANIM_FREE_MOVE_MSG)); 510 item = new BMenuItem(B_TRANSLATE("Free motion"), 511 new BMessage(ANIM_FREE_MOVE_MSG)); 504 512 item->SetTarget(this); 505 513 menu->AddItem(item); 506 514 507 r.Set(h, v, h+ANIM_LABEL+ANIM_POPUP-1, v + (TOP_LEFT_LIMIT - 1 - 2*V_BORDER)); 508 popup = new BMenuField(r, "", "Animation:", menu); 515 r.Set(h, v, h+ANIM_LABEL+ANIM_POPUP-1, v + 516 (TOP_LEFT_LIMIT - 1 - 2*V_BORDER)); 517 popup = new BMenuField(r, "", B_TRANSLATE("Animation:"), menu); 509 518 popup->SetFont(&font); 510 519 popup->MenuBar()->SetFont(&font); 511 520 popup->Menu()->SetFont(&font); … … 513 522 popup->SetDivider(popup->StringWidth(popup->Label()) + 4.0f); 514 523 fTopView->AddChild(popup); 515 524 516 h += ANIM_LABEL + ANIM_POPUP + popup->StringWidth("Slow rotation"); 525 h += ANIM_LABEL + ANIM_POPUP + 526 popup->StringWidth(B_TRANSLATE("Slow rotation")); 517 527 518 528 /* display mode popup */ 519 menu = new BPopUpMenu( "Off");520 item = new BMenuItem( "Off", new BMessage(DISP_OFF_MSG));529 menu = new BPopUpMenu(B_TRANSLATE("Off")); 530 item = new BMenuItem(B_TRANSLATE("Off"), new BMessage(DISP_OFF_MSG)); 521 531 item->SetTarget(this); 522 532 menu->AddItem(item); 523 item = new BMenuItem("LineArray", new BMessage(DISP_LINE_MSG)); 533 item = new BMenuItem(B_TRANSLATE("LineArray"), 534 new BMessage(DISP_LINE_MSG)); 524 535 item->SetTarget(this); 525 536 item->SetEnabled(false); 526 537 menu->AddItem(item); 527 item = new BMenuItem("DrawBitmap", new BMessage(DISP_BITMAP_MSG)); 538 item = new BMenuItem(B_TRANSLATE("DrawBitmap"), 539 new BMessage(DISP_BITMAP_MSG)); 528 540 item->SetTarget(this); 529 541 menu->AddItem(item); 530 item = new BMenuItem("DirectWindow", new BMessage(DISP_DIRECT_MSG)); 542 item = new BMenuItem(B_TRANSLATE("DirectWindow"), 543 new BMessage(DISP_DIRECT_MSG)); 531 544 item->SetTarget(this); 532 545 item->SetEnabled(BDirectWindow::SupportsWindowMode()); 533 546 menu->AddItem(item); 534 547 535 r.Set(h, v, h+DISP_LABEL+DISP_POPUP-1, v + (TOP_LEFT_LIMIT - 1 - 2*V_BORDER)); 536 popup = new BMenuField(r, "", "Display:", menu); 548 r.Set(h, v, h+DISP_LABEL+DISP_POPUP-1, v + 549 (TOP_LEFT_LIMIT - 1 - 2*V_BORDER)); 550 popup = new BMenuField(r, "", B_TRANSLATE("Display:"), menu); 537 551 popup->SetFont(&font); 538 552 popup->MenuBar()->SetFont(&font); 539 553 popup->Menu()->SetFont(&font); … … 541 555 popup->SetDivider(popup->StringWidth(popup->Label()) + 4.0f); 542 556 fTopView->AddChild(popup); 543 557 544 h += DISP_LABEL + DISP_POPUP + popup->StringWidth("DirectWindow") + H_BORDER; 558 h += DISP_LABEL + DISP_POPUP + 559 popup->StringWidth(B_TRANSLATE("DirectWindow")) + H_BORDER; 545 560 546 561 /* create the offwindow (invisible) button on the left side. 547 562 this will be used to record the content of the Picture … … 589 604 h += BUTTON_WIDTH+H_BORDER; 590 605 591 606 /* starfield type popup */ 592 menu = new BPopUpMenu("Chaos"); 593 item = new BMenuItem("Chaos", new BMessage(SPACE_CHAOS_MSG)); 607 menu = new BPopUpMenu(B_TRANSLATE("Chaos")); 608 item = new BMenuItem(B_TRANSLATE("Chaos"), 609 new BMessage(SPACE_CHAOS_MSG)); 594 610 item->SetTarget(this); 595 611 menu->AddItem(item); 596 item = new BMenuItem( "Amas", new BMessage(SPACE_AMAS_MSG));612 item = new BMenuItem(B_TRANSLATE("Amas"), new BMessage(SPACE_AMAS_MSG)); 597 613 item->SetTarget(this); 598 614 menu->AddItem(item); 599 item = new BMenuItem("Spiral", new BMessage(SPACE_SPIRAL_MSG)); 615 item = new BMenuItem(B_TRANSLATE("Spiral"), 616 new BMessage(SPACE_SPIRAL_MSG)); 600 617 item->SetTarget(this); 601 618 menu->AddItem(item); 602 619 603 r.Set(h, v, h+SPACE_LABEL+SPACE_POPUP-1, v + (TOP_LEFT_LIMIT - 1 - 2*V_BORDER)); 604 popup = new BMenuField(r, "", "Space:", menu); 620 r.Set(h, v, h+SPACE_LABEL+SPACE_POPUP-1, v + 621 (TOP_LEFT_LIMIT - 1 - 2*V_BORDER)); 622 popup = new BMenuField(r, "", B_TRANSLATE("Space:"), menu); 605 623 popup->SetFont(&font); 606 624 popup->MenuBar()->SetFont(&font); 607 625 popup->Menu()->SetFont(&font); … … 626 644 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2, v+STATUS_BOX-1); 627 645 fStatusBox = new BBox(r); 628 646 fStatusBox->SetFont(&boldFont); 629 fStatusBox->SetLabel( "Status");647 fStatusBox->SetLabel(B_TRANSLATE("Status")); 630 648 fLeftView->AddChild(fStatusBox); 631 649 float boxWidth, boxHeight; 632 650 fStatusBox->GetPreferredSize(&boxWidth, &boxHeight); … … 636 654 v = BOX_V_OFFSET; 637 655 638 656 /* frames per second title string */ 639 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+STATUS_LABEL-1); 640 string = new BStringView(r, "", "Frames/s"); 657 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 658 v+STATUS_LABEL-1); 659 string = new BStringView(r, "", B_TRANSLATE("Frames/s")); 641 660 string->SetFont(&font); 642 661 string->SetAlignment(B_ALIGN_CENTER); 643 662 fStatusBox->AddChild(string); … … 645 664 v += STATUS_LABEL+STATUS_OFFSET; 646 665 647 666 /* frames per second display string */ 648 r.Set(h-1, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET, v+STATUS_EDIT-1); 667 r.Set(h-1, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET, 668 v+STATUS_EDIT-1); 649 669 fFramesView = new BStringView(r, "", "0.0"); 650 670 fFramesView->SetAlignment(B_ALIGN_RIGHT); 651 671 fFramesView->SetFont(be_bold_font); … … 656 676 v += STATUS_EDIT+STATUS_OFFSET; 657 677 658 678 /* CPU load pourcentage title string */ 659 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+STATUS_LABEL-1); 660 string = new BStringView(r, "", "CPU load"); 679 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 680 v+STATUS_LABEL-1); 681 string = new BStringView(r, "", B_TRANSLATE("CPU load")); 661 682 string->SetAlignment(B_ALIGN_CENTER); 662 683 string->SetFont(&font); 663 684 fStatusBox->AddChild(string); … … 665 686 v += STATUS_LABEL+STATUS_OFFSET; 666 687 667 688 /* CPU load pourcentage display string */ 668 r.Set(h-1, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET, v+STATUS_EDIT-1); 689 r.Set(h-1, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET, 690 v+STATUS_EDIT-1); 669 691 fCpuLoadView = new BStringView(r, "", "0.0"); 670 692 fCpuLoadView->SetAlignment(B_ALIGN_RIGHT); 671 693 fCpuLoadView->SetFont(be_bold_font); … … 679 701 680 702 /* Fullscreen mode check box */ 681 703 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-1, v+FULL_SCREEN-1); 682 full_screen = new BCheckBox(r, "", "Full screen", new BMessage(FULL_SCREEN_MSG)); 704 full_screen = new BCheckBox(r, "", B_TRANSLATE("Full screen"), 705 new BMessage(FULL_SCREEN_MSG)); 683 706 full_screen->SetTarget(this); 684 707 full_screen->SetFont(&font); 685 708 full_screen->ResizeToPreferred(); … … 695 718 696 719 /* Automatic demonstration activation button */ 697 720 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-1, v+AUTO_DEMO-1); 698 button = new BButton(r, "", "Auto demo", new BMessage(AUTO_DEMO_MSG)); 721 button = new BButton(r, "", B_TRANSLATE("Auto demo"), 722 new BMessage(AUTO_DEMO_MSG)); 699 723 button->SetTarget(this); 700 724 button->ResizeToPreferred(); 701 725 button->GetPreferredSize(&width, &height); … … 708 732 709 733 /* Enabling second thread check box */ 710 734 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-1, v+SECOND_THREAD-1); 711 check_box = new BCheckBox(r, "", "2 threads", new BMessage(SECOND_THREAD_MSG)); 735 check_box = new BCheckBox(r, "", B_TRANSLATE("2 threads"), 736 new BMessage(SECOND_THREAD_MSG)); 712 737 check_box->SetTarget(this); 713 738 check_box->SetFont(&font); 714 739 check_box->ResizeToPreferred(); … … 721 746 /* Star color selection box */ 722 747 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2, v+COLORS_BOX-1); 723 748 fColorsBox = new BBox(r); 724 fColorsBox->SetLabel( "Colors");749 fColorsBox->SetLabel(B_TRANSLATE("Colors")); 725 750 fColorsBox->SetFont(&boldFont); 726 751 fLeftView->AddChild(fColorsBox); 727 752 … … 729 754 v = BOX_V_OFFSET; 730 755 731 756 /* star color red check box */ 732 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 733 check_box = new BCheckBox(r, "", "Red", new BMessage(COLORS_RED_MSG)); 757 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 758 v+COLORS_LABEL-1); 759 check_box = new BCheckBox(r, "", B_TRANSLATE("Red"), 760 new BMessage(COLORS_RED_MSG)); 734 761 check_box->SetFont(&font); 735 762 check_box->ResizeToPreferred(); 736 763 fColorsBox->AddChild(check_box); … … 738 765 v += COLORS_LABEL+COLORS_OFFSET; 739 766 740 767 /* star color green check box */ 741 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 742 check_box = new BCheckBox(r, "", "Green", new BMessage(COLORS_GREEN_MSG)); 768 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 769 v+COLORS_LABEL-1); 770 check_box = new BCheckBox(r, "", B_TRANSLATE("Green"), 771 new BMessage(COLORS_GREEN_MSG)); 743 772 check_box->SetValue(1); 744 773 check_box->SetFont(&font); 745 774 check_box->ResizeToPreferred(); … … 748 777 v += COLORS_LABEL+COLORS_OFFSET; 749 778 750 779 /* star color blue check box */ 751 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 752 check_box = new BCheckBox(r, "", "Blue", new BMessage(COLORS_BLUE_MSG)); 780 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 781 v+COLORS_LABEL-1); 782 check_box = new BCheckBox(r, "", B_TRANSLATE("Blue"), 783 new BMessage(COLORS_BLUE_MSG)); 753 784 check_box->SetValue(1); 754 785 check_box->SetFont(&font); 755 786 check_box->ResizeToPreferred(); … … 758 789 v += COLORS_LABEL+COLORS_OFFSET; 759 790 760 791 /* star color yellow check box */ 761 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 762 check_box = new BCheckBox(r, "", "Yellow", new BMessage(COLORS_YELLOW_MSG)); 792 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 793 v+COLORS_LABEL-1); 794 check_box = new BCheckBox(r, "", B_TRANSLATE("Yellow"), 795 new BMessage(COLORS_YELLOW_MSG)); 763 796 check_box->SetValue(1); 764 797 check_box->SetFont(&font); 765 798 check_box->ResizeToPreferred(); … … 768 801 v += COLORS_LABEL+COLORS_OFFSET; 769 802 770 803 /* star color orange check box */ 771 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 772 check_box = new BCheckBox(r, "", "Orange", new BMessage(COLORS_ORANGE_MSG)); 804 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 805 v+COLORS_LABEL-1); 806 check_box = new BCheckBox(r, "", B_TRANSLATE("Orange"), 807 new BMessage(COLORS_ORANGE_MSG)); 773 808 check_box->SetFont(&font); 774 809 check_box->ResizeToPreferred(); 775 810 fColorsBox->AddChild(check_box); … … 777 812 v += COLORS_LABEL+COLORS_OFFSET; 778 813 779 814 /* star color pink check box */ 780 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 781 check_box = new BCheckBox(r, "", "Pink", new BMessage(COLORS_PINK_MSG)); 815 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 816 v+COLORS_LABEL-1); 817 check_box = new BCheckBox(r, "", B_TRANSLATE("Pink"), 818 new BMessage(COLORS_PINK_MSG)); 782 819 check_box->SetFont(&font); 783 820 check_box->ResizeToPreferred(); 784 821 fColorsBox->AddChild(check_box); … … 786 823 v += COLORS_LABEL+COLORS_OFFSET; 787 824 788 825 /* star color white check box */ 789 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 790 check_box = new BCheckBox(r, "", "White", new BMessage(COLORS_WHITE_MSG)); 826 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 827 v+COLORS_LABEL-1); 828 check_box = new BCheckBox(r, "", B_TRANSLATE("White"), 829 new BMessage(COLORS_WHITE_MSG)); 791 830 check_box->SetFont(&font); 792 831 check_box->ResizeToPreferred(); 793 832 fColorsBox->AddChild(check_box); … … 800 839 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2, v+SPECIAL_BOX-1); 801 840 fSpecialBox = new BBox(r); 802 841 fSpecialBox->SetFont(&boldFont); 803 fSpecialBox->SetLabel( "Special");842 fSpecialBox->SetLabel(B_TRANSLATE("Special"); 804 843 fLeftView->AddChild(fSpecialBox); 805 844 806 845 h = BOX_H_OFFSET; 807 846 v = BOX_V_OFFSET; 808 847 809 848 /* no special radio button */ 810 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 811 radio = new BRadioButton(r, "", "None", new BMessage(SPECIAL_NONE_MSG)); 849 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 850 v+COLORS_LABEL-1); 851 radio = new BRadioButton(r, "", B_TRANSLATE("None"), 852 new BMessage(SPECIAL_NONE_MSG)); 812 853 radio->SetValue(1); 813 854 radio->SetFont(&font); 814 855 radio->ResizeToPreferred(); … … 817 858 v += COLORS_LABEL+COLORS_OFFSET; 818 859 819 860 /* comet special animation radio button */ 820 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 821 radio = new BRadioButton(r, "", "Comet", new BMessage(SPECIAL_COMET_MSG)); 861 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 862 v+COLORS_LABEL-1); 863 radio = new BRadioButton(r, "", B_TRANSLATE("Comet"), 864 new BMessage(SPECIAL_COMET_MSG)); 822 865 radio->SetFont(&font); 823 866 radio->ResizeToPreferred(); 824 867 fSpecialBox->AddChild(radio); … … 826 869 v += COLORS_LABEL+COLORS_OFFSET; 827 870 828 871 /* novas special animation radio button */ 829 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 830 radio = new BRadioButton(r, "", "Novas", new BMessage(SPECIAL_NOVAS_MSG)); 872 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 873 v+COLORS_LABEL-1); 874 radio = new BRadioButton(r, "", B_TRANSLATE("Novas"), 875 new BMessage(SPECIAL_NOVAS_MSG)); 831 876 radio->SetFont(&font); 832 877 radio->ResizeToPreferred(); 833 878 fSpecialBox->AddChild(radio); … … 835 880 v += COLORS_LABEL+COLORS_OFFSET; 836 881 837 882 /* space batle special animation radio button (not implemented) */ 838 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, v+COLORS_LABEL-1); 839 radio = new BRadioButton(r, "", "Battle", new BMessage(SPECIAL_BATTLE_MSG)); 883 r.Set(h, v, h+LEFT_WIDTH-2*LEFT_OFFSET-2*BOX_H_OFFSET-1, 884 v+COLORS_LABEL-1); 885 radio = new BRadioButton(r, "", B_TRANSLATE("Battle"), 886 new BMessage(SPECIAL_BATTLE_MSG)); 840 887 radio->SetEnabled(false); 841 888 radio->SetFont(&font); 842 889 radio->ResizeToPreferred(); … … 1152 1199 BRect frame; 1153 1200 BPoint point; 1154 1201 1155 BWindow *window = GetAppWindow( "Space color");1202 BWindow *window = GetAppWindow(B_TRANSLATE("Space color")); 1156 1203 if (window == NULL) { 1157 1204 frame.Set(here.x, here.y, here.x + 199.0, here.y + 99.0); 1158 window = new BWindow(frame, "Space color",1205 window = new BWindow(frame, B_TRANSLATE("Space color"), 1159 1206 B_FLOATING_WINDOW_LOOK, 1160 1207 B_FLOATING_APP_WINDOW_FEEL, 1161 1208 B_NOT_ZOOMABLE | B_WILL_ACCEPT_FIRST_CLICK | B_NOT_RESIZABLE); … … 1179 1226 void 1180 1227 ChartWindow::OpenStarDensity(BPoint here) 1181 1228 { 1182 BWindow *window = GetAppWindow( "Star density");1229 BWindow *window = GetAppWindow(B_TRANSLATE("Star density")); 1183 1230 if (window == NULL) { 1184 BRect frame(here.x, here.y, here.x + STAR_DENSITY_H-1, here.y + STAR_DENSITY_V-1); 1185 window = new BWindow(frame, "Star density", 1231 BRect frame(here.x, here.y, here.x + STAR_DENSITY_H-1, 1232 here.y + STAR_DENSITY_V-1); 1233 window = new BWindow(frame, B_TRANSLATE("Star density"), 1186 1234 B_FLOATING_WINDOW_LOOK, 1187 1235 B_FLOATING_APP_WINDOW_FEEL, 1188 1236 B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_WILL_ACCEPT_FIRST_CLICK); … … 1193 1241 slider->SetTarget(NULL, this); 1194 1242 slider->SetValue(fCurrentSettings.star_density); 1195 1243 slider->SetModificationMessage(new BMessage(STAR_DENSITY_MSG)); 1196 slider->SetLimitLabels(" 5% (low)", "(high) 100% "); 1244 slider->SetLimitLabels(B_TRANSLATE(" 5% (low)"), 1245 B_TRANSLATE("(high) 100% ")); 1197 1246 slider->ResizeToPreferred(); 1198 1247 window->ResizeTo(slider->Bounds().Width(), slider->Bounds().Height()); 1199 1248 window->AddChild(slider); … … 1208 1257 void 1209 1258 ChartWindow::OpenRefresh(BPoint here) 1210 1259 { 1211 BWindow *window = GetAppWindow( "Refresh rate");1260 BWindow *window = GetAppWindow(B_TRANSLATE("Refresh rate")); 1212 1261 if (window == NULL) { 1213 BRect frame(here.x, here.y, here.x + REFRESH_RATE_H-1, here.y + REFRESH_RATE_V-1); 1214 window = new BWindow(frame, "Refresh rate", 1262 BRect frame(here.x, here.y, here.x + REFRESH_RATE_H-1, 1263 here.y + REFRESH_RATE_V-1); 1264 window = new BWindow(frame, B_TRANSLATE("Refresh rate"), 1215 1265 B_FLOATING_WINDOW_LOOK, 1216 1266 B_FLOATING_APP_WINDOW_FEEL, 1217 1267 B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_WILL_ACCEPT_FIRST_CLICK); … … 1222 1272 slider->SetValue((int32)(1000 * log(fCurrentSettings.refresh_rate / REFRESH_RATE_MIN) / 1223 1273 log(REFRESH_RATE_MAX/REFRESH_RATE_MIN))); 1224 1274 slider->SetModificationMessage(new BMessage(REFRESH_RATE_MSG)); 1225 slider->SetLimitLabels(" 0.6 f/s (logarythmic scale)", "600.0 f/s"); 1275 slider->SetLimitLabels(B_TRANSLATE(" 0.6 f/s (logarythmic scale)"), 1276 B_TRANSLATE("600.0 f/s")); 1226 1277 slider->ResizeToPreferred(); 1227 1278 window->ResizeTo(slider->Bounds().Width(), slider->Bounds().Height()); 1228 1279 window->AddChild(slider);