Changeset 52579 in vbox
- Timestamp:
- Sep 3, 2014 11:56:06 AM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r52572 r52579 309 309 310 310 311 #ifdef RT_OS_DARWIN 312 class UIActionMenuApplication : public UIActionMenu 313 { 314 Q_OBJECT; 315 316 public: 317 318 UIActionMenuApplication(UIActionPool *pParent) 319 : UIActionMenu(pParent) 320 { 321 menu()->setConsumable(true); 322 retranslateUi(); 323 } 324 325 protected: 326 327 /** Returns action extra-data ID. */ 328 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuType_Application; } 329 /** Returns action extra-data key. */ 330 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuType_Application); } 331 332 void retranslateUi() 333 { 334 setName(QApplication::translate("UIActionPool", "&VirtualBox")); 335 } 336 }; 337 338 class UIActionSimplePerformClose : public UIActionSimple 339 { 340 Q_OBJECT; 341 342 public: 343 344 UIActionSimplePerformClose(UIActionPool *pParent) 345 : UIActionSimple(pParent, ":/exit_16px.png") 346 { 347 setMenuRole(QAction::QuitRole); 348 } 349 350 protected: 351 352 /** Returns action extra-data ID. */ 353 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuApplicationActionType_Close; } 354 /** Returns action extra-data key. */ 355 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuApplicationActionType_Close); } 356 357 QString shortcutExtraDataID() const 358 { 359 return QString("Close"); 360 } 361 362 QKeySequence defaultShortcut(UIActionPoolType) const 363 { 364 return QKeySequence("Q"); 365 } 366 367 void retranslateUi() 368 { 369 setName(QApplication::translate("UIActionPool", "&Close...")); 370 setStatusTip(QApplication::translate("UIActionPool", "Close the virtual machine")); 371 } 372 }; 373 #endif /* RT_OS_DARWIN */ 374 375 class UIActionMenuHelp : public UIActionMenu 376 { 377 Q_OBJECT; 378 379 public: 380 381 UIActionMenuHelp(UIActionPool *pParent) 382 : UIActionMenu(pParent) 383 { 384 retranslateUi(); 385 } 386 387 protected: 388 389 /** Returns action extra-data ID. */ 390 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuType_Help; } 391 /** Returns action extra-data key. */ 392 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuType_Help); } 393 394 void retranslateUi() 395 { 396 setName(QApplication::translate("UIActionPool", "&Help")); 397 } 398 }; 399 400 class UIActionSimpleContents : public UIActionSimple 401 { 402 Q_OBJECT; 403 404 public: 405 406 UIActionSimpleContents(UIActionPool *pParent) 407 : UIActionSimple(pParent, UIIconPool::defaultIcon(UIIconPool::UIDefaultIconType_DialogHelp)) 408 { 409 retranslateUi(); 410 } 411 412 protected: 413 414 /** Returns action extra-data ID. */ 415 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_Contents; } 416 /** Returns action extra-data key. */ 417 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_Contents); } 418 419 QString shortcutExtraDataID() const 420 { 421 return QString("Help"); 422 } 423 424 QKeySequence defaultShortcut(UIActionPoolType actionPoolType) const 425 { 426 switch (actionPoolType) 427 { 428 case UIActionPoolType_Selector: return QKeySequence(QKeySequence::HelpContents); 429 case UIActionPoolType_Runtime: break; 430 } 431 return QKeySequence(); 432 } 433 434 void retranslateUi() 435 { 436 setName(QApplication::translate("UIActionPool", "&Contents...")); 437 setStatusTip(QApplication::translate("UIActionPool", "Show help contents")); 438 } 439 }; 440 441 class UIActionSimpleWebSite : public UIActionSimple 442 { 443 Q_OBJECT; 444 445 public: 446 447 UIActionSimpleWebSite(UIActionPool *pParent) 448 : UIActionSimple(pParent, ":/site_16px.png") 449 { 450 retranslateUi(); 451 } 452 453 protected: 454 455 /** Returns action extra-data ID. */ 456 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_WebSite; } 457 /** Returns action extra-data key. */ 458 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_WebSite); } 459 460 QString shortcutExtraDataID() const 461 { 462 return QString("Web"); 463 } 464 465 void retranslateUi() 466 { 467 setName(QApplication::translate("UIActionPool", "&VirtualBox Web Site...")); 468 setStatusTip(QApplication::translate("UIActionPool", "Open the browser and go to the VirtualBox product web site")); 469 } 470 }; 471 472 class UIActionSimpleResetWarnings : public UIActionSimple 473 { 474 Q_OBJECT; 475 476 public: 477 478 UIActionSimpleResetWarnings(UIActionPool *pParent) 479 : UIActionSimple(pParent, ":/reset_warnings_16px.png") 480 { 481 retranslateUi(); 482 } 483 484 protected: 485 486 /** Returns action extra-data ID. */ 487 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_ResetWarnings; } 488 /** Returns action extra-data key. */ 489 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_ResetWarnings); } 490 491 QString shortcutExtraDataID() const 492 { 493 return QString("ResetWarnings"); 494 } 495 496 void retranslateUi() 497 { 498 setName(QApplication::translate("UIActionPool", "&Reset All Warnings")); 499 setStatusTip(QApplication::translate("UIActionPool", "Go back to showing all suppressed warnings and messages")); 500 } 501 }; 502 503 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 504 class UIActionSimpleNetworkAccessManager : public UIActionSimple 505 { 506 Q_OBJECT; 507 508 public: 509 510 UIActionSimpleNetworkAccessManager(UIActionPool *pParent) 511 : UIActionSimple(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png") 512 { 513 retranslateUi(); 514 } 515 516 protected: 517 518 /** Returns action extra-data ID. */ 519 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_NetworkAccessManager; } 520 /** Returns action extra-data key. */ 521 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_NetworkAccessManager); } 522 523 QString shortcutExtraDataID() const 524 { 525 return QString("NetworkAccessManager"); 526 } 527 528 void retranslateUi() 529 { 530 setName(QApplication::translate("UIActionPool", "&Network Operations Manager...")); 531 setStatusTip(QApplication::translate("UIActionPool", "Show Network Operations Manager")); 532 } 533 }; 534 535 class UIActionSimpleCheckForUpdates : public UIActionSimple 536 { 537 Q_OBJECT; 538 539 public: 540 541 UIActionSimpleCheckForUpdates(UIActionPool *pParent) 542 : UIActionSimple(pParent, ":/refresh_16px.png", ":/refresh_disabled_16px.png") 543 { 544 setMenuRole(QAction::ApplicationSpecificRole); 545 retranslateUi(); 546 } 547 548 protected: 549 550 /** Returns action extra-data ID. */ 551 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_CheckForUpdates; } 552 /** Returns action extra-data key. */ 553 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_CheckForUpdates); } 554 555 QString shortcutExtraDataID() const 556 { 557 return QString("Update"); 558 } 559 560 void retranslateUi() 561 { 562 setName(QApplication::translate("UIActionPool", "C&heck for Updates...")); 563 setStatusTip(QApplication::translate("UIActionPool", "Check for a new VirtualBox version")); 564 } 565 }; 566 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 567 568 class UIActionSimpleAbout : public UIActionSimple 569 { 570 Q_OBJECT; 571 572 public: 573 574 UIActionSimpleAbout(UIActionPool *pParent) 575 : UIActionSimple(pParent, ":/about_16px.png") 576 { 577 setMenuRole(QAction::AboutRole); 578 retranslateUi(); 579 } 580 581 protected: 582 583 /** Returns action extra-data ID. */ 584 virtual int extraDataID() const 585 { 586 #ifdef Q_WS_MAC 587 return UIExtraDataMetaDefs::MenuApplicationActionType_About; 588 #else /* !Q_WS_MAC */ 589 return UIExtraDataMetaDefs::MenuHelpActionType_About; 590 #endif /* !Q_WS_MAC */ 591 } 592 /** Returns action extra-data key. */ 593 virtual QString extraDataKey() const 594 { 595 #ifdef Q_WS_MAC 596 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuApplicationActionType_About); 597 #else /* !Q_WS_MAC */ 598 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_About); 599 #endif /* !Q_WS_MAC */ 600 } 601 602 QString shortcutExtraDataID() const 603 { 604 return QString("About"); 605 } 606 607 void retranslateUi() 608 { 609 setName(QApplication::translate("UIActionPool", "&About VirtualBox...")); 610 setStatusTip(QApplication::translate("UIActionPool", "Show a window with product information")); 611 } 612 }; 613 311 614 class UIActionSimplePreferences : public UIActionSimple 312 615 { … … 362 665 setName(QApplication::translate("UIActionPool", "&Preferences...", "global settings")); 363 666 setStatusTip(QApplication::translate("UIActionPool", "Display the global settings window")); 364 }365 };366 367 class UIActionSimpleLogDialog : public UIActionSimple368 {369 Q_OBJECT;370 371 public:372 373 UIActionSimpleLogDialog(UIActionPool *pParent)374 : UIActionSimple(pParent,375 ":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png",376 ":/vm_show_logs_disabled_32px.png", ":/vm_show_logs_disabled_16px.png")377 {378 retranslateUi();379 }380 381 protected:382 383 /** Returns action extra-data ID. */384 virtual int extraDataID() const385 {386 #ifdef VBOX_WITH_DEBUGGER_GUI387 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog;388 #else /* !VBOX_WITH_DEBUGGER_GUI */389 return 0;390 #endif /* !VBOX_WITH_DEBUGGER_GUI */391 }392 /** Returns action extra-data key. */393 virtual QString extraDataKey() const394 {395 #ifdef VBOX_WITH_DEBUGGER_GUI396 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog);397 #else /* !VBOX_WITH_DEBUGGER_GUI */398 return QString();399 #endif /* !VBOX_WITH_DEBUGGER_GUI */400 }401 402 QString shortcutExtraDataID() const403 {404 return QString("ShowVMLog");405 }406 407 QKeySequence defaultShortcut(UIActionPoolType actionPoolType) const408 {409 switch (actionPoolType)410 {411 case UIActionPoolType_Selector: return QKeySequence("Ctrl+L");412 case UIActionPoolType_Runtime: break;413 }414 return QKeySequence();415 }416 417 void retranslateUi()418 {419 setName(QApplication::translate("UIActionPool", "Show &Log..."));420 setStatusTip(QApplication::translate("UIActionPool", "Show the log files of the selected virtual machine"));421 }422 };423 424 #ifdef RT_OS_DARWIN425 class UIActionMenuApplication : public UIActionMenu426 {427 Q_OBJECT;428 429 public:430 431 UIActionMenuApplication(UIActionPool *pParent)432 : UIActionMenu(pParent)433 {434 menu()->setConsumable(true);435 retranslateUi();436 }437 438 protected:439 440 /** Returns action extra-data ID. */441 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuType_Application; }442 /** Returns action extra-data key. */443 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuType_Application); }444 445 void retranslateUi()446 {447 setName(QApplication::translate("UIActionPool", "&VirtualBox"));448 }449 };450 451 class UIActionSimplePerformClose : public UIActionSimple452 {453 Q_OBJECT;454 455 public:456 457 UIActionSimplePerformClose(UIActionPool *pParent)458 : UIActionSimple(pParent, ":/exit_16px.png")459 {460 setMenuRole(QAction::QuitRole);461 }462 463 protected:464 465 /** Returns action extra-data ID. */466 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuApplicationActionType_Close; }467 /** Returns action extra-data key. */468 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuApplicationActionType_Close); }469 470 QString shortcutExtraDataID() const471 {472 return QString("Close");473 }474 475 QKeySequence defaultShortcut(UIActionPoolType) const476 {477 return QKeySequence("Q");478 }479 480 void retranslateUi()481 {482 setName(QApplication::translate("UIActionPool", "&Close..."));483 setStatusTip(QApplication::translate("UIActionPool", "Close the virtual machine"));484 }485 };486 #endif /* RT_OS_DARWIN */487 488 class UIActionMenuHelp : public UIActionMenu489 {490 Q_OBJECT;491 492 public:493 494 UIActionMenuHelp(UIActionPool *pParent)495 : UIActionMenu(pParent)496 {497 retranslateUi();498 }499 500 protected:501 502 /** Returns action extra-data ID. */503 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuType_Help; }504 /** Returns action extra-data key. */505 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuType_Help); }506 507 void retranslateUi()508 {509 setName(QApplication::translate("UIActionPool", "&Help"));510 }511 };512 513 class UIActionSimpleContents : public UIActionSimple514 {515 Q_OBJECT;516 517 public:518 519 UIActionSimpleContents(UIActionPool *pParent)520 : UIActionSimple(pParent, UIIconPool::defaultIcon(UIIconPool::UIDefaultIconType_DialogHelp))521 {522 retranslateUi();523 }524 525 protected:526 527 /** Returns action extra-data ID. */528 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_Contents; }529 /** Returns action extra-data key. */530 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_Contents); }531 532 QString shortcutExtraDataID() const533 {534 return QString("Help");535 }536 537 QKeySequence defaultShortcut(UIActionPoolType actionPoolType) const538 {539 switch (actionPoolType)540 {541 case UIActionPoolType_Selector: return QKeySequence(QKeySequence::HelpContents);542 case UIActionPoolType_Runtime: break;543 }544 return QKeySequence();545 }546 547 void retranslateUi()548 {549 setName(QApplication::translate("UIActionPool", "&Contents..."));550 setStatusTip(QApplication::translate("UIActionPool", "Show help contents"));551 }552 };553 554 class UIActionSimpleWebSite : public UIActionSimple555 {556 Q_OBJECT;557 558 public:559 560 UIActionSimpleWebSite(UIActionPool *pParent)561 : UIActionSimple(pParent, ":/site_16px.png")562 {563 retranslateUi();564 }565 566 protected:567 568 /** Returns action extra-data ID. */569 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_WebSite; }570 /** Returns action extra-data key. */571 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_WebSite); }572 573 QString shortcutExtraDataID() const574 {575 return QString("Web");576 }577 578 void retranslateUi()579 {580 setName(QApplication::translate("UIActionPool", "&VirtualBox Web Site..."));581 setStatusTip(QApplication::translate("UIActionPool", "Open the browser and go to the VirtualBox product web site"));582 }583 };584 585 class UIActionSimpleResetWarnings : public UIActionSimple586 {587 Q_OBJECT;588 589 public:590 591 UIActionSimpleResetWarnings(UIActionPool *pParent)592 : UIActionSimple(pParent, ":/reset_warnings_16px.png")593 {594 retranslateUi();595 }596 597 protected:598 599 /** Returns action extra-data ID. */600 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_ResetWarnings; }601 /** Returns action extra-data key. */602 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_ResetWarnings); }603 604 QString shortcutExtraDataID() const605 {606 return QString("ResetWarnings");607 }608 609 void retranslateUi()610 {611 setName(QApplication::translate("UIActionPool", "&Reset All Warnings"));612 setStatusTip(QApplication::translate("UIActionPool", "Go back to showing all suppressed warnings and messages"));613 }614 };615 616 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER617 class UIActionSimpleNetworkAccessManager : public UIActionSimple618 {619 Q_OBJECT;620 621 public:622 623 UIActionSimpleNetworkAccessManager(UIActionPool *pParent)624 : UIActionSimple(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png")625 {626 retranslateUi();627 }628 629 protected:630 631 /** Returns action extra-data ID. */632 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_NetworkAccessManager; }633 /** Returns action extra-data key. */634 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_NetworkAccessManager); }635 636 QString shortcutExtraDataID() const637 {638 return QString("NetworkAccessManager");639 }640 641 void retranslateUi()642 {643 setName(QApplication::translate("UIActionPool", "&Network Operations Manager..."));644 setStatusTip(QApplication::translate("UIActionPool", "Show Network Operations Manager"));645 }646 };647 648 class UIActionSimpleCheckForUpdates : public UIActionSimple649 {650 Q_OBJECT;651 652 public:653 654 UIActionSimpleCheckForUpdates(UIActionPool *pParent)655 : UIActionSimple(pParent, ":/refresh_16px.png", ":/refresh_disabled_16px.png")656 {657 setMenuRole(QAction::ApplicationSpecificRole);658 retranslateUi();659 }660 661 protected:662 663 /** Returns action extra-data ID. */664 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_CheckForUpdates; }665 /** Returns action extra-data key. */666 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_CheckForUpdates); }667 668 QString shortcutExtraDataID() const669 {670 return QString("Update");671 }672 673 void retranslateUi()674 {675 setName(QApplication::translate("UIActionPool", "C&heck for Updates..."));676 setStatusTip(QApplication::translate("UIActionPool", "Check for a new VirtualBox version"));677 }678 };679 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */680 681 class UIActionSimpleAbout : public UIActionSimple682 {683 Q_OBJECT;684 685 public:686 687 UIActionSimpleAbout(UIActionPool *pParent)688 : UIActionSimple(pParent, ":/about_16px.png")689 {690 setMenuRole(QAction::AboutRole);691 retranslateUi();692 }693 694 protected:695 696 /** Returns action extra-data ID. */697 virtual int extraDataID() const698 {699 #ifdef Q_WS_MAC700 return UIExtraDataMetaDefs::MenuApplicationActionType_About;701 #else /* !Q_WS_MAC */702 return UIExtraDataMetaDefs::MenuHelpActionType_About;703 #endif /* !Q_WS_MAC */704 }705 /** Returns action extra-data key. */706 virtual QString extraDataKey() const707 {708 #ifdef Q_WS_MAC709 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuApplicationActionType_About);710 #else /* !Q_WS_MAC */711 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_About);712 #endif /* !Q_WS_MAC */713 }714 715 QString shortcutExtraDataID() const716 {717 return QString("About");718 }719 720 void retranslateUi()721 {722 setName(QApplication::translate("UIActionPool", "&About VirtualBox..."));723 setStatusTip(QApplication::translate("UIActionPool", "Show a window with product information"));724 667 } 725 668 }; … … 844 787 void UIActionPool::preparePool() 845 788 { 846 /* Create various actions: */847 m_pool[UIActionIndex_Simple_LogDialog] = new UIActionSimpleLogDialog(this);848 849 789 #ifdef RT_OS_DARWIN 850 790 /* Create 'Application' actions: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r52572 r52579 52 52 enum UIActionIndex 53 53 { 54 /* Various actions: */55 UIActionIndex_Simple_LogDialog,56 57 54 #ifdef RT_OS_DARWIN 58 55 /* 'Application' menu actions: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r52572 r52579 1496 1496 { 1497 1497 setName(QApplication::translate("UIActionPool", "&Logging...", "debug action")); 1498 } 1499 }; 1500 1501 class UIActionSimpleShowLogDialog : public UIActionSimple 1502 { 1503 Q_OBJECT; 1504 1505 public: 1506 1507 UIActionSimpleShowLogDialog(UIActionPool *pParent) 1508 : UIActionSimple(pParent) {} 1509 1510 protected: 1511 1512 /** Returns action extra-data ID. */ 1513 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog; } 1514 /** Returns action extra-data key. */ 1515 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog); } 1516 1517 QString shortcutExtraDataID() const 1518 { 1519 return QString("LogWindow"); 1520 } 1521 1522 void retranslateUi() 1523 { 1524 setName(QApplication::translate("UIActionPool", "Show &Log...", "debug action")); 1498 1525 } 1499 1526 }; … … 1822 1849 m_pool[UIActionIndexRT_M_Debug_S_ShowCommandLine] = new UIActionSimpleShowCommandLine(this); 1823 1850 m_pool[UIActionIndexRT_M_Debug_T_Logging] = new UIActionToggleLogging(this); 1851 m_pool[UIActionIndexRT_M_Debug_S_ShowLogDialog] = new UIActionSimpleShowLogDialog(this); 1824 1852 #endif /* VBOX_WITH_DEBUGGER_GUI */ 1825 1853 … … 2881 2909 /* 'Log Dialog' action: */ 2882 2910 const bool fAllowToShowActionLogDialog = isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog); 2883 action(UIActionIndex _Simple_LogDialog)->setEnabled(fAllowToShowActionLogDialog);2911 action(UIActionIndexRT_M_Debug_S_ShowLogDialog)->setEnabled(fAllowToShowActionLogDialog); 2884 2912 if (fAllowToShowActionLogDialog) 2885 pMenu->addAction(action(UIActionIndex _Simple_LogDialog));2913 pMenu->addAction(action(UIActionIndexRT_M_Debug_S_ShowLogDialog)); 2886 2914 2887 2915 /* Mark menu as valid: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r52558 r52579 103 103 UIActionIndexRT_M_Debug_S_ShowCommandLine, 104 104 UIActionIndexRT_M_Debug_T_Logging, 105 UIActionIndexRT_M_Debug_S_ShowLogDialog, 105 106 #endif /* VBOX_WITH_DEBUGGER_GUI */ 106 107 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r52558 r52579 966 966 connect(actionPool()->action(UIActionIndexRT_M_Debug_T_Logging), SIGNAL(toggled(bool)), 967 967 this, SLOT(sltLoggingToggled(bool))); 968 connect(actionPool()->action(UIActionIndex _Simple_LogDialog), SIGNAL(triggered()),968 connect(actionPool()->action(UIActionIndexRT_M_Debug_S_ShowLogDialog), SIGNAL(triggered()), 969 969 this, SLOT(sltShowLogDialog())); 970 970 #endif /* VBOX_WITH_DEBUGGER_GUI */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.cpp
r52558 r52579 561 561 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Debug_S_ShowCommandLine)); 562 562 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)); 563 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndex _Simple_LogDialog));563 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Debug_S_ShowLogDialog)); 564 564 } 565 565 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
r52572 r52579 677 677 }; 678 678 679 class UIActionSimpleCommonShowLogDialog : public UIActionSimple 680 { 681 Q_OBJECT; 682 683 public: 684 685 UIActionSimpleCommonShowLogDialog(UIActionPool *pParent) 686 : UIActionSimple(pParent, 687 ":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png", 688 ":/vm_show_logs_disabled_32px.png", ":/vm_show_logs_disabled_16px.png") 689 { 690 retranslateUi(); 691 } 692 693 protected: 694 695 QString shortcutExtraDataID() const 696 { 697 return QString("ShowVMLog"); 698 } 699 700 QKeySequence defaultShortcut(UIActionPoolType) const 701 { 702 return QKeySequence("Ctrl+L"); 703 } 704 705 void retranslateUi() 706 { 707 setName(QApplication::translate("UIActionPool", "Show &Log...")); 708 setStatusTip(QApplication::translate("UIActionPool", "Show the log files of the selected virtual machine")); 709 } 710 }; 711 679 712 class UIActionSimpleCommonRefresh : public UIActionSimple 680 713 { … … 918 951 m_pool[UIActionIndexST_M_Group_M_Close_S_PowerOff] = new UIActionSimplePowerOff(this); 919 952 m_pool[UIActionIndexST_M_Group_S_Discard] = new UIActionSimpleCommonDiscard(this); 953 m_pool[UIActionIndexST_M_Group_S_ShowLogDialog] = new UIActionSimpleCommonShowLogDialog(this); 920 954 m_pool[UIActionIndexST_M_Group_S_Refresh] = new UIActionSimpleCommonRefresh(this); 921 955 m_pool[UIActionIndexST_M_Group_S_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this); … … 939 973 m_pool[UIActionIndexST_M_Machine_M_Close_S_PowerOff] = new UIActionSimplePowerOff(this); 940 974 m_pool[UIActionIndexST_M_Machine_S_Discard] = new UIActionSimpleCommonDiscard(this); 975 m_pool[UIActionIndexST_M_Machine_S_ShowLogDialog] = new UIActionSimpleCommonShowLogDialog(this); 941 976 m_pool[UIActionIndexST_M_Machine_S_Refresh] = new UIActionSimpleCommonRefresh(this); 942 977 m_pool[UIActionIndexST_M_Machine_S_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
r52459 r52579 46 46 UIActionIndexST_M_Group_S_Rename, 47 47 UIActionIndexST_M_Group_S_Remove, 48 UIActionIndexST_M_Group_P_StartOrShow, //49 UIActionIndexST_M_Group_T_Pause, //50 UIActionIndexST_M_Group_S_Reset, //48 UIActionIndexST_M_Group_P_StartOrShow, 49 UIActionIndexST_M_Group_T_Pause, 50 UIActionIndexST_M_Group_S_Reset, 51 51 UIActionIndexST_M_Group_M_Close, 52 52 UIActionIndexST_M_Group_M_Close_S_SaveState, 53 53 UIActionIndexST_M_Group_M_Close_S_Shutdown, 54 54 UIActionIndexST_M_Group_M_Close_S_PowerOff, 55 UIActionIndexST_M_Group_S_Discard, // 56 UIActionIndexST_M_Group_S_Refresh, // 57 UIActionIndexST_M_Group_S_ShowInFileManager, // 58 UIActionIndexST_M_Group_S_CreateShortcut, // 55 UIActionIndexST_M_Group_S_Discard, 56 UIActionIndexST_M_Group_S_ShowLogDialog, 57 UIActionIndexST_M_Group_S_Refresh, 58 UIActionIndexST_M_Group_S_ShowInFileManager, 59 UIActionIndexST_M_Group_S_CreateShortcut, 59 60 UIActionIndexST_M_Group_S_Sort, 60 61 … … 67 68 UIActionIndexST_M_Machine_S_Remove, 68 69 UIActionIndexST_M_Machine_S_AddGroup, 69 UIActionIndexST_M_Machine_P_StartOrShow, //70 UIActionIndexST_M_Machine_T_Pause, //71 UIActionIndexST_M_Machine_S_Reset, //70 UIActionIndexST_M_Machine_P_StartOrShow, 71 UIActionIndexST_M_Machine_T_Pause, 72 UIActionIndexST_M_Machine_S_Reset, 72 73 UIActionIndexST_M_Machine_M_Close, 73 74 UIActionIndexST_M_Machine_M_Close_S_SaveState, 74 75 UIActionIndexST_M_Machine_M_Close_S_Shutdown, 75 76 UIActionIndexST_M_Machine_M_Close_S_PowerOff, 76 UIActionIndexST_M_Machine_S_Discard, // 77 UIActionIndexST_M_Machine_S_Refresh, // 78 UIActionIndexST_M_Machine_S_ShowInFileManager, // 79 UIActionIndexST_M_Machine_S_CreateShortcut, // 77 UIActionIndexST_M_Machine_S_Discard, 78 UIActionIndexST_M_Machine_S_ShowLogDialog, 79 UIActionIndexST_M_Machine_S_Refresh, 80 UIActionIndexST_M_Machine_S_ShowInFileManager, 81 UIActionIndexST_M_Machine_S_CreateShortcut, 80 82 UIActionIndexST_M_Machine_S_SortParent, 81 83 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r52558 r52579 760 760 { 761 761 /* Check if log could be show for the current item: */ 762 if (!isActionEnabled(UIActionIndex _Simple_LogDialog, QList<UIVMItem*>() << pItem))762 if (!isActionEnabled(UIActionIndexST_M_Group_S_ShowLogDialog, QList<UIVMItem*>() << pItem)) 763 763 continue; 764 764 … … 1189 1189 pMenu->addSeparator(); 1190 1190 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Discard)); 1191 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_ShowLogDialog)); 1191 1192 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Refresh)); 1192 1193 pMenu->addSeparator(); … … 1205 1206 << actionPool()->action(UIActionIndexST_M_Group_S_Reset) 1206 1207 << actionPool()->action(UIActionIndexST_M_Group_S_Discard) 1208 << actionPool()->action(UIActionIndexST_M_Group_S_ShowLogDialog) 1207 1209 << actionPool()->action(UIActionIndexST_M_Group_S_Refresh) 1208 1210 << actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager) … … 1231 1233 pMenu->addSeparator(); 1232 1234 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard)); 1233 pMenu->addAction(actionPool()->action(UIActionIndex _Simple_LogDialog));1235 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_ShowLogDialog)); 1234 1236 pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh)); 1235 1237 pMenu->addSeparator(); … … 1250 1252 << actionPool()->action(UIActionIndexST_M_Machine_S_Reset) 1251 1253 << actionPool()->action(UIActionIndexST_M_Machine_S_Discard) 1252 << actionPool()->action(UIActionIndex _Simple_LogDialog)1254 << actionPool()->action(UIActionIndexST_M_Machine_S_ShowLogDialog) 1253 1255 << actionPool()->action(UIActionIndexST_M_Machine_S_Refresh) 1254 1256 << actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager) … … 1397 1399 connect(actionPool()->action(UIActionIndexST_M_Group_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1398 1400 connect(actionPool()->action(UIActionIndexST_M_Group_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1401 connect(actionPool()->action(UIActionIndexST_M_Group_S_ShowLogDialog), SIGNAL(triggered()), this, SLOT(sltShowLogDialog())); 1399 1402 connect(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1400 1403 connect(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); … … 1407 1410 connect(actionPool()->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1408 1411 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1409 connect(actionPool()->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()), this, SLOT(sltShowLogDialog()));1410 1412 connect(actionPool()->action(UIActionIndexST_M_Machine_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1413 connect(actionPool()->action(UIActionIndexST_M_Machine_S_ShowLogDialog), SIGNAL(triggered()), this, SLOT(sltShowLogDialog())); 1411 1414 connect(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1412 1415 connect(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); … … 1569 1572 actionPool()->action(UIActionIndexST_M_Group_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Reset, items)); 1570 1573 actionPool()->action(UIActionIndexST_M_Group_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Discard, items)); 1574 actionPool()->action(UIActionIndexST_M_Group_S_ShowLogDialog)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_ShowLogDialog, items)); 1571 1575 actionPool()->action(UIActionIndexST_M_Group_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Refresh, items)); 1572 1576 actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_ShowInFileManager, items)); … … 1583 1587 actionPool()->action(UIActionIndexST_M_Machine_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Reset, items)); 1584 1588 actionPool()->action(UIActionIndexST_M_Machine_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Discard, items)); 1585 actionPool()->action(UIActionIndex _Simple_LogDialog)->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items));1589 actionPool()->action(UIActionIndexST_M_Machine_S_ShowLogDialog)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_ShowLogDialog, items)); 1586 1590 actionPool()->action(UIActionIndexST_M_Machine_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Refresh, items)); 1587 1591 actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_ShowInFileManager, items)); … … 1691 1695 isAtLeastOneItemDiscardable(items); 1692 1696 } 1697 case UIActionIndexST_M_Group_S_ShowLogDialog: 1698 case UIActionIndexST_M_Machine_S_ShowLogDialog: 1699 { 1700 return isAtLeastOneItemAccessible(items); 1701 } 1693 1702 case UIActionIndexST_M_Group_T_Pause: 1694 1703 case UIActionIndexST_M_Machine_T_Pause: … … 1705 1714 { 1706 1715 return isAtLeastOneItemInaccessible(items); 1707 }1708 case UIActionIndex_Simple_LogDialog:1709 {1710 return items.size() == 1 && pItem->accessible();1711 1716 } 1712 1717 case UIActionIndexST_M_Group_S_ShowInFileManager: -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r52202 r52579 1145 1145 m_pContextMenuGroup->addSeparator(); 1146 1146 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Discard)); 1147 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_ShowLogDialog)); 1147 1148 m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Refresh)); 1148 1149 m_pContextMenuGroup->addSeparator(); … … 1165 1166 m_pContextMenuMachine->addSeparator(); 1166 1167 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard)); 1167 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndex _Simple_LogDialog));1168 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_ShowLogDialog)); 1168 1169 m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh)); 1169 1170 m_pContextMenuMachine->addSeparator();
Note:
See TracChangeset
for help on using the changeset viewer.