Changeset 56059 in vbox
- Timestamp:
- May 25, 2015 2:16:35 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 100581
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r55187 r56059 569 569 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale: strResult = "Scale"; break; 570 570 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize: strResult = "GuestAutoresize"; break; 571 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow: strResult = "MinimizeWindow"; break; 571 572 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow: strResult = "AdjustWindow"; break; 572 573 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot: strResult = "TakeScreenshot"; break; … … 606 607 keys << "Scale"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale; 607 608 keys << "GuestAutoresize"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize; 609 keys << "MinimizeWindow"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow; 608 610 keys << "AdjustWindow"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow; 609 611 keys << "TakeScreenshot"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r55939 r56059 378 378 RuntimeMenuViewActionType_Scale = RT_BIT(2), 379 379 RuntimeMenuViewActionType_GuestAutoresize = RT_BIT(3), 380 RuntimeMenuViewActionType_AdjustWindow = RT_BIT(4), 381 RuntimeMenuViewActionType_TakeScreenshot = RT_BIT(5), 382 RuntimeMenuViewActionType_VideoCapture = RT_BIT(6), 383 RuntimeMenuViewActionType_VideoCaptureSettings = RT_BIT(7), 384 RuntimeMenuViewActionType_StartVideoCapture = RT_BIT(8), 385 RuntimeMenuViewActionType_VRDEServer = RT_BIT(9), 386 RuntimeMenuViewActionType_MenuBar = RT_BIT(10), 387 RuntimeMenuViewActionType_MenuBarSettings = RT_BIT(11), 380 RuntimeMenuViewActionType_MinimizeWindow = RT_BIT(4), 381 RuntimeMenuViewActionType_AdjustWindow = RT_BIT(5), 382 RuntimeMenuViewActionType_TakeScreenshot = RT_BIT(6), 383 RuntimeMenuViewActionType_VideoCapture = RT_BIT(7), 384 RuntimeMenuViewActionType_VideoCaptureSettings = RT_BIT(8), 385 RuntimeMenuViewActionType_StartVideoCapture = RT_BIT(9), 386 RuntimeMenuViewActionType_VRDEServer = RT_BIT(10), 387 RuntimeMenuViewActionType_MenuBar = RT_BIT(11), 388 RuntimeMenuViewActionType_MenuBarSettings = RT_BIT(12), 388 389 #ifndef RT_OS_DARWIN 389 RuntimeMenuViewActionType_ToggleMenuBar = RT_BIT(1 2),390 RuntimeMenuViewActionType_ToggleMenuBar = RT_BIT(13), 390 391 #endif /* !RT_OS_DARWIN */ 391 RuntimeMenuViewActionType_StatusBar = RT_BIT(1 3),392 RuntimeMenuViewActionType_StatusBarSettings = RT_BIT(1 4),393 RuntimeMenuViewActionType_ToggleStatusBar = RT_BIT(1 5),394 RuntimeMenuViewActionType_ScaleFactor = RT_BIT(1 6),395 RuntimeMenuViewActionType_Resize = RT_BIT(1 7),396 RuntimeMenuViewActionType_Multiscreen = RT_BIT(1 8),392 RuntimeMenuViewActionType_StatusBar = RT_BIT(14), 393 RuntimeMenuViewActionType_StatusBarSettings = RT_BIT(15), 394 RuntimeMenuViewActionType_ToggleStatusBar = RT_BIT(16), 395 RuntimeMenuViewActionType_ScaleFactor = RT_BIT(17), 396 RuntimeMenuViewActionType_Resize = RT_BIT(18), 397 RuntimeMenuViewActionType_Multiscreen = RT_BIT(19), 397 398 RuntimeMenuViewActionType_All = 0xFFFF 398 399 }; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r56058 r56059 498 498 }; 499 499 500 class UIActionSimplePerformMinimizeWindow : public UIActionSimple 501 { 502 Q_OBJECT; 503 504 public: 505 506 UIActionSimplePerformMinimizeWindow(UIActionPool *pParent) 507 : UIActionSimple(pParent, ":/minimize_16px.png") {} 508 509 protected: 510 511 /** Returns action extra-data ID. */ 512 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow; } 513 /** Returns action extra-data key. */ 514 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow); } 515 /** Returns whether action is allowed. */ 516 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow); } 517 518 QString shortcutExtraDataID() const 519 { 520 return QString("WindowMinimize"); 521 } 522 523 QKeySequence defaultShortcut(UIActionPoolType) const 524 { 525 return QKeySequence("M"); 526 } 527 528 void retranslateUi() 529 { 530 setName(QApplication::translate("UIActionPool", "&Minimize Window")); 531 setStatusTip(QApplication::translate("UIActionPool", "Minimize currently active window")); 532 } 533 }; 534 500 535 class UIActionSimplePerformWindowAdjust : public UIActionSimple 501 536 { … … 2031 2066 m_pool[UIActionIndexRT_M_View_T_Seamless] = new UIActionToggleSeamlessMode(this); 2032 2067 m_pool[UIActionIndexRT_M_View_T_Scale] = new UIActionToggleScaleMode(this); 2068 m_pool[UIActionIndexRT_M_View_S_MinimizeWindow] = new UIActionSimplePerformMinimizeWindow(this); 2033 2069 m_pool[UIActionIndexRT_M_View_S_AdjustWindow] = new UIActionSimplePerformWindowAdjust(this); 2034 2070 m_pool[UIActionIndexRT_M_View_T_GuestAutoresize] = new UIActionToggleGuestAutoresize(this); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r55401 r56059 57 57 UIActionIndexRT_M_View_T_Seamless, 58 58 UIActionIndexRT_M_View_T_Scale, 59 UIActionIndexRT_M_View_S_MinimizeWindow, 59 60 UIActionIndexRT_M_View_S_AdjustWindow, 60 61 UIActionIndexRT_M_View_T_GuestAutoresize, -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r56058 r56059 957 957 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_Seamless)); 958 958 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_Scale)); 959 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow));960 959 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)); 961 960 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCAD)); … … 972 971 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowInformation)); 973 972 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_T_Pause)); 973 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_MinimizeWindow)); 974 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow)); 974 975 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_TakeScreenshot)); 975 976 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_VideoCapture)); … … 1040 1041 1041 1042 /* 'View' actions connections: */ 1043 connect(actionPool()->action(UIActionIndexRT_M_View_S_MinimizeWindow), SIGNAL(triggered()), 1044 this, SLOT(sltMinimizeWindow())); 1042 1045 connect(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow), SIGNAL(triggered()), 1043 1046 this, SLOT(sltAdjustWindow())); … … 1546 1549 } 1547 1550 1551 void UIMachineLogic::sltMinimizeWindow() 1552 { 1553 /* Do not process if window(s) missed! */ 1554 if (!isMachineWindowsCreated()) 1555 return; 1556 1557 /* Minimize currently active machine-window: */ 1558 activeMachineWindow()->showMinimized(); 1559 } 1560 1548 1561 void UIMachineLogic::sltAdjustWindow() 1549 1562 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r55697 r56059 267 267 /* "View" menu functionality: */ 268 268 void sltToggleGuestAutoresize(bool fEnabled); 269 void sltMinimizeWindow(); 269 270 void sltAdjustWindow(); 270 271 void sltTakeScreenshot(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r55697 r56059 466 466 (UIExtraDataMetaDefs::RuntimeMenuViewActionType) 467 467 (UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow | 468 #ifdef Q_WS_MAC 469 UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow | 470 #endif /* Q_WS_MAC */ 468 471 UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar | 469 472 UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar |
Note:
See TracChangeset
for help on using the changeset viewer.