Changeset 26820 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 26, 2010 9:42:08 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp
r26790 r26820 171 171 void retranslateUi() 172 172 { 173 menu()->setTitle( tr("&Machine"));173 menu()->setTitle(UIActionsPool::tr("&Machine")); 174 174 } 175 175 }; … … 193 193 void retranslateUi() 194 194 { 195 setText(VBoxGlobal::insertKeyToActionText( tr("&Fullscreen Mode"), "F"));196 setStatusTip( tr("Switch to fullscreen mode"));195 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Fullscreen Mode"), "F")); 196 setStatusTip(UIActionsPool::tr("Switch to fullscreen mode")); 197 197 } 198 198 }; … … 216 216 void retranslateUi() 217 217 { 218 setText(VBoxGlobal::insertKeyToActionText( tr("Seam&less Mode"), "L"));219 setStatusTip( tr("Switch to seamless desktop integration mode"));218 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Seam&less Mode"), "L")); 219 setStatusTip(UIActionsPool::tr("Switch to seamless desktop integration mode")); 220 220 } 221 221 }; … … 239 239 void retranslateUi() 240 240 { 241 setText(VBoxGlobal::insertKeyToActionText( tr("Auto-resize &Guest Display"), "G"));242 setStatusTip( tr("Automatically resize the guest display when the window is resized (requires Guest Additions)"));241 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Auto-resize &Guest Display"), "G")); 242 setStatusTip(UIActionsPool::tr("Automatically resize the guest display when the window is resized (requires Guest Additions)")); 243 243 } 244 244 }; … … 261 261 void retranslateUi() 262 262 { 263 setText(VBoxGlobal::insertKeyToActionText( tr("&Adjust Window Size"), "A"));264 setStatusTip( tr("Adjust window size and position to best fit the guest display"));263 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Adjust Window Size"), "A")); 264 setStatusTip(UIActionsPool::tr("Adjust window size and position to best fit the guest display")); 265 265 } 266 266 }; … … 305 305 if (!isChecked()) 306 306 { 307 setText(VBoxGlobal::insertKeyToActionText( tr("Disable &Mouse Integration"), "I"));308 setStatusTip( tr("Temporarily disable host mouse pointer integration"));307 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Disable &Mouse Integration"), "I")); 308 setStatusTip(UIActionsPool::tr("Temporarily disable host mouse pointer integration")); 309 309 } 310 310 else 311 311 { 312 setText(VBoxGlobal::insertKeyToActionText( tr("Enable &Mouse Integration"), "I"));313 setStatusTip( tr("Enable temporarily disabled host mouse pointer integration"));312 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Enable &Mouse Integration"), "I")); 313 setStatusTip(UIActionsPool::tr("Enable temporarily disabled host mouse pointer integration")); 314 314 } 315 315 } … … 333 333 void retranslateUi() 334 334 { 335 setText(VBoxGlobal::insertKeyToActionText( tr("&Insert Ctrl-Alt-Del"), "Del"));336 setStatusTip( tr("Send the Ctrl-Alt-Del sequence to the virtual machine"));335 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Insert Ctrl-Alt-Del"), "Del")); 336 setStatusTip(UIActionsPool::tr("Send the Ctrl-Alt-Del sequence to the virtual machine")); 337 337 } 338 338 }; … … 356 356 void retranslateUi() 357 357 { 358 setText(VBoxGlobal::insertKeyToActionText( tr("&Insert Ctrl-Alt-Backspace"), "Backspace"));359 setStatusTip( tr("Send the Ctrl-Alt-Backspace sequence to the virtual machine"));358 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Insert Ctrl-Alt-Backspace"), "Backspace")); 359 setStatusTip(UIActionsPool::tr("Send the Ctrl-Alt-Backspace sequence to the virtual machine")); 360 360 } 361 361 }; … … 379 379 void retranslateUi() 380 380 { 381 setText(VBoxGlobal::insertKeyToActionText( tr("Take &Snapshot..."), "S"));382 setStatusTip( tr("Take a snapshot of the virtual machine"));381 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Take &Snapshot..."), "S")); 382 setStatusTip(UIActionsPool::tr("Take a snapshot of the virtual machine")); 383 383 } 384 384 }; … … 401 401 void retranslateUi() 402 402 { 403 setText(VBoxGlobal::insertKeyToActionText( tr("Session I&nformation Dialog"), "N"));404 setStatusTip( tr("Show Session Information Dialog"));403 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("Session I&nformation Dialog"), "N")); 404 setStatusTip(UIActionsPool::tr("Show Session Information Dialog")); 405 405 } 406 406 }; … … 425 425 if (!isChecked()) 426 426 { 427 setText(VBoxGlobal::insertKeyToActionText( tr("&Pause"), "P"));428 setStatusTip( tr("Suspend the execution of the virtual machine"));427 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Pause"), "P")); 428 setStatusTip(UIActionsPool::tr("Suspend the execution of the virtual machine")); 429 429 } 430 430 else 431 431 { 432 setText(VBoxGlobal::insertKeyToActionText( tr("R&esume"), "P"));433 setStatusTip( tr("Resume the execution of the virtual machine"));432 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("R&esume"), "P")); 433 setStatusTip(UIActionsPool::tr("Resume the execution of the virtual machine")); 434 434 } 435 435 } … … 453 453 void retranslateUi() 454 454 { 455 setText(VBoxGlobal::insertKeyToActionText( tr("&Reset"), "R"));456 setStatusTip( tr("Reset the virtual machine"));455 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Reset"), "R")); 456 setStatusTip(UIActionsPool::tr("Reset the virtual machine")); 457 457 } 458 458 }; … … 477 477 #ifdef Q_WS_MAC 478 478 /* Host+H is Hide on the mac */ 479 setText(VBoxGlobal::insertKeyToActionText( tr("ACPI Sh&utdown"), "U"));479 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("ACPI Sh&utdown"), "U")); 480 480 #else /* Q_WS_MAC */ 481 setText(VBoxGlobal::insertKeyToActionText( tr("ACPI S&hutdown"), "H"));481 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("ACPI S&hutdown"), "H")); 482 482 #endif /* !Q_WS_MAC */ 483 setStatusTip( tr("Send the ACPI Power Button press event to the virtual machine"));483 setStatusTip(UIActionsPool::tr("Send the ACPI Power Button press event to the virtual machine")); 484 484 } 485 485 }; … … 503 503 void retranslateUi() 504 504 { 505 setText(VBoxGlobal::insertKeyToActionText( tr("&Close..." ), "Q"));506 setStatusTip( tr("Close the virtual machine"));505 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Close..." ), "Q")); 506 setStatusTip(UIActionsPool::tr("Close the virtual machine")); 507 507 } 508 508 }; … … 524 524 void retranslateUi() 525 525 { 526 menu()->setTitle( tr("&Devices"));526 menu()->setTitle(UIActionsPool::tr("&Devices")); 527 527 } 528 528 }; … … 545 545 void retranslateUi() 546 546 { 547 menu()->setTitle( tr("&CD/DVD Devices"));547 menu()->setTitle(UIActionsPool::tr("&CD/DVD Devices")); 548 548 } 549 549 }; … … 566 566 void retranslateUi() 567 567 { 568 menu()->setTitle( tr("&Floppy Devices"));568 menu()->setTitle(UIActionsPool::tr("&Floppy Devices")); 569 569 } 570 570 }; … … 587 587 void retranslateUi() 588 588 { 589 menu()->setTitle( tr("&USB Devices"));589 menu()->setTitle(UIActionsPool::tr("&USB Devices")); 590 590 } 591 591 }; … … 627 627 void retranslateUi() 628 628 { 629 setText( tr("&Network Adapters..."));630 setStatusTip( tr("Change the settings of network adapters"));629 setText(UIActionsPool::tr("&Network Adapters...")); 630 setStatusTip(UIActionsPool::tr("Change the settings of network adapters")); 631 631 } 632 632 }; … … 668 668 void retranslateUi() 669 669 { 670 setText( tr("&Shared Folders..."));671 setStatusTip( tr("Create or modify shared folders"));670 setText(UIActionsPool::tr("&Shared Folders...")); 671 setStatusTip(UIActionsPool::tr("Create or modify shared folders")); 672 672 } 673 673 }; … … 691 691 void retranslateUi() 692 692 { 693 setText( tr("&Remote Display"));694 setStatusTip( tr("Enable or disable remote desktop (RDP) connections to this machine"));693 setText(UIActionsPool::tr("&Remote Display")); 694 setStatusTip(UIActionsPool::tr("Enable or disable remote desktop (RDP) connections to this machine")); 695 695 } 696 696 }; … … 713 713 void retranslateUi() 714 714 { 715 setText(VBoxGlobal::insertKeyToActionText( tr("&Install Guest Additions..."), "D"));716 setStatusTip( tr("Mount the Guest Additions installation image"));715 setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Install Guest Additions..."), "D")); 716 setStatusTip(UIActionsPool::tr("Mount the Guest Additions installation image")); 717 717 } 718 718 }; … … 735 735 void retranslateUi() 736 736 { 737 menu()->setTitle( tr("De&bug"));737 menu()->setTitle(UIActionsPool::tr("De&bug")); 738 738 } 739 739 }; … … 755 755 void retranslateUi() 756 756 { 757 setText( tr("&Statistics...", "debug action"));757 setText(UIActionsPool::tr("&Statistics...", "debug action")); 758 758 } 759 759 }; … … 775 775 void retranslateUi() 776 776 { 777 setText( tr("&Command Line...", "debug action"));777 setText(UIActionsPool::tr("&Command Line...", "debug action")); 778 778 } 779 779 }; … … 795 795 void retranslateUi() 796 796 { 797 setText( tr("&Logging...", "debug action"));797 setText(UIActionsPool::tr("&Logging...", "debug action")); 798 798 } 799 799 }; 800 800 #endif 801 802 class MenuHelpAction : public UIMenuAction 803 { 804 Q_OBJECT; 805 806 public: 807 808 MenuHelpAction(QObject *pParent) 809 : UIMenuAction(pParent) 810 { 811 retranslateUi(); 812 } 813 814 protected: 815 816 void retranslateUi() 817 { 818 setText(UIActionsPool::tr("&Help")); 819 } 820 }; 821 822 class ShowHelpAction : public UISimpleAction 823 { 824 Q_OBJECT; 825 826 public: 827 828 ShowHelpAction(QObject *pParent) 829 : UISimpleAction(pParent, 830 ":/help_16px.png") 831 { 832 retranslateUi(); 833 } 834 835 protected: 836 837 void retranslateUi() 838 { 839 setShortcut(QKeySequence::HelpContents); 840 setText(UIActionsPool::tr("&Contents...")); 841 setStatusTip(UIActionsPool::tr("Show the online help contents")); 842 } 843 }; 844 845 class ShowWebAction : public UISimpleAction 846 { 847 Q_OBJECT; 848 849 public: 850 851 ShowWebAction(QObject *pParent) 852 : UISimpleAction(pParent, 853 ":/site_16px.png") 854 { 855 retranslateUi(); 856 } 857 858 protected: 859 860 void retranslateUi() 861 { 862 setText(UIActionsPool::tr("&VirtualBox Web Site...")); 863 setStatusTip(UIActionsPool::tr("Open the browser and go to the VirtualBox product web site")); 864 } 865 }; 866 867 class PerformResetWarningsAction : public UISimpleAction 868 { 869 Q_OBJECT; 870 871 public: 872 873 PerformResetWarningsAction(QObject *pParent) 874 : UISimpleAction(pParent, 875 ":/reset_16px.png") 876 { 877 retranslateUi(); 878 } 879 880 protected: 881 882 void retranslateUi() 883 { 884 setText(UIActionsPool::tr("&Reset All Warnings")); 885 setStatusTip(UIActionsPool::tr("Go back to showing all suppressed warnings and messages")); 886 } 887 }; 888 889 class PerformRegisterAction : public UISimpleAction 890 { 891 Q_OBJECT; 892 893 public: 894 895 PerformRegisterAction(QObject *pParent) 896 : UISimpleAction(pParent, 897 ":/register_16px.png", ":/register_disabled_16px.png") 898 { 899 setEnabled(vboxGlobal().virtualBox(). 900 GetExtraData(VBoxDefs::GUI_RegistrationDlgWinID).isEmpty()); 901 retranslateUi(); 902 } 903 904 protected: 905 906 void retranslateUi() 907 { 908 setText(UIActionsPool::tr("R&egister VirtualBox...")); 909 setStatusTip(UIActionsPool::tr("Open VirtualBox registration form")); 910 } 911 }; 912 913 class PerformUpdateAction : public UISimpleAction 914 { 915 Q_OBJECT; 916 917 public: 918 919 PerformUpdateAction(QObject *pParent) 920 : UISimpleAction(pParent, 921 ":/refresh_16px.png", ":/refresh_disabled_16px.png") 922 { 923 setMenuRole(QAction::ApplicationSpecificRole); 924 retranslateUi(); 925 } 926 927 protected: 928 929 void retranslateUi() 930 { 931 setText(UIActionsPool::tr("C&heck for Updates...")); 932 setStatusTip(UIActionsPool::tr("Check for a new VirtualBox version")); 933 } 934 }; 935 936 class ShowAboutAction : public UISimpleAction 937 { 938 Q_OBJECT; 939 940 public: 941 942 ShowAboutAction(QObject *pParent) 943 : UISimpleAction(pParent, 944 ":/about_16px.png") 945 { 946 setMenuRole(QAction::AboutRole); 947 retranslateUi(); 948 } 949 950 protected: 951 952 void retranslateUi() 953 { 954 setText(UIActionsPool::tr("&About VirtualBox...")); 955 setStatusTip(UIActionsPool::tr("Show a dialog with product information")); 956 } 957 }; 958 801 959 802 960 UIActionsPool::UIActionsPool(QObject *pParent) … … 845 1003 m_actionsPool[UIActionIndex_Toggle_Logging] = new ToggleLoggingAction(this); 846 1004 #endif 1005 1006 /* "Help" menu actions: */ 1007 m_actionsPool[UIActionIndex_Menu_Help] = new MenuHelpAction(this); 1008 m_actionsPool[UIActionIndex_Simple_Help] = new ShowHelpAction(this); 1009 m_actionsPool[UIActionIndex_Simple_Web] = new ShowWebAction(this); 1010 m_actionsPool[UIActionIndex_Simple_ResetWarnings] = new PerformResetWarningsAction(this); 1011 m_actionsPool[UIActionIndex_Simple_Register] = new PerformRegisterAction(this); 1012 m_actionsPool[UIActionIndex_Simple_Update] = new PerformUpdateAction(this); 1013 m_actionsPool[UIActionIndex_Simple_About] = new ShowAboutAction(this); 847 1014 848 1015 /* Test all actions were initialized */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.h
r26790 r26820 97 97 #endif 98 98 99 /* "Help" menu actions: */ 100 UIActionIndex_Menu_Help, 101 UIActionIndex_Simple_Help, 102 UIActionIndex_Simple_Web, 103 UIActionIndex_Simple_ResetWarnings, 104 UIActionIndex_Simple_Register, 105 UIActionIndex_Simple_Update, 106 UIActionIndex_Simple_About, 107 99 108 UIActionIndex_End 100 109 }; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r26815 r26820 515 515 this, SLOT(sltLoggingToggled(bool))); 516 516 #endif 517 518 /* "Help" actions connections: */ 519 connect(actionsPool()->action(UIActionIndex_Simple_Help), SIGNAL(triggered()), 520 &vboxProblem(), SLOT(showHelpHelpDialog())); 521 connect(actionsPool()->action(UIActionIndex_Simple_Web), SIGNAL(triggered()), 522 &vboxProblem(), SLOT(showHelpWebDialog())); 523 connect(actionsPool()->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()), 524 &vboxProblem(), SLOT(resetSuppressedMessages())); 525 connect(actionsPool()->action(UIActionIndex_Simple_Register), SIGNAL(triggered()), 526 &vboxGlobal(), SLOT(showRegistrationDialog())); 527 connect(actionsPool()->action(UIActionIndex_Simple_Update), SIGNAL(triggered()), 528 &vboxGlobal(), SLOT(showUpdateDialog())); 529 connect(actionsPool()->action(UIActionIndex_Simple_About), SIGNAL(triggered()), 530 &vboxProblem(), SLOT(showHelpAboutDialog())); 531 532 connect(&vboxGlobal(), SIGNAL (canShowRegDlg (bool)), 533 actionsPool()->action(UIActionIndex_Simple_Register), SLOT(setEnabled(bool))); 534 connect(&vboxGlobal(), SIGNAL (canShowUpdDlg (bool)), 535 actionsPool()->action(UIActionIndex_Simple_Update), SLOT(setEnabled(bool))); 517 536 } 518 537 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r26815 r26820 466 466 #endif /* VBOX_WITH_DEBUGGER_GUI */ 467 467 468 void UIMachineWindow::prepareMenuHelp() 469 { 470 QMenu *menu = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Help)->menu(); 471 472 menu->clear(); 473 474 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Help)); 475 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Web)); 476 menu->addSeparator(); 477 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_ResetWarnings)); 478 menu->addSeparator(); 479 480 #ifdef VBOX_WITH_REGISTRATION 481 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Register)); 482 #endif 483 484 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_Update)); 485 486 #ifndef Q_WS_MAC 487 menu->addSeparator(); 488 #endif /* Q_WS_MAC */ 489 menu->addAction(machineLogic()->actionsPool()->action(UIActionIndex_Simple_About)); 490 } 491 468 492 void UIMachineWindow::updateAppearanceOf(int iElement) 469 493 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r26815 r26820 80 80 virtual void prepareMenuDebug(); 81 81 #endif 82 virtual void prepareMenuHelp(); 82 83 //virtual void loadWindowSettings() {} 83 84 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r26815 r26820 357 357 } 358 358 #endif 359 360 /* Help submenu: */ 361 QMenu *pMenuHelp = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Help)->menu(); 362 prepareMenuHelp(); 363 menuBar()->addMenu(pMenuHelp); 359 364 } 360 365
Note:
See TracChangeset
for help on using the changeset viewer.