Changeset 58674 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 12, 2015 3:15:45 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r58544 r58674 136 136 const char* UIExtraDataDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled"; 137 137 const char* UIExtraDataDefs::GUI_RealtimeDockIconUpdateMonitor = "GUI/RealtimeDockIconUpdateMonitor"; 138 const char* UIExtraDataDefs::GUI_DockIcon OverlayDisabled = "GUI/DockIconOverlayDisabled";138 const char* UIExtraDataDefs::GUI_DockIconDisableOverlay = "GUI/DockIconDisableOverlay"; 139 139 #endif /* Q_WS_MAC */ 140 140 const char* UIExtraDataDefs::GUI_PassCAD = "GUI/PassCAD"; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r58621 r58674 235 235 /** Mac OS X: Holds guest-screen which Dock icon should reflect at runtime. */ 236 236 extern const char* GUI_RealtimeDockIconUpdateMonitor; 237 /** Mac OS X: Holds whether Dock icon should disable guest-os overlay. */238 extern const char* GUI_DockIcon OverlayDisabled;237 /** Mac OS X: Holds whether Dock icon should have overlay disabled. */ 238 extern const char* GUI_DockIconDisableOverlay; 239 239 #endif /* Q_WS_MAC */ 240 240 /** Holds whether machine should pass CAD to guest. */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r58544 r58674 1874 1874 << GUI_StatusBar_Enabled << GUI_RestrictedStatusBarIndicators << GUI_StatusBar_IndicatorOrder 1875 1875 #ifdef Q_WS_MAC 1876 << GUI_RealtimeDockIconUpdateEnabled << GUI_RealtimeDockIconUpdateMonitor << GUI_DockIcon OverlayDisabled1876 << GUI_RealtimeDockIconUpdateEnabled << GUI_RealtimeDockIconUpdateMonitor << GUI_DockIconDisableOverlay 1877 1877 #endif /* Q_WS_MAC */ 1878 1878 << GUI_PassCAD … … 3431 3431 } 3432 3432 3433 bool UIExtraDataManager::dockIcon OverlayDisabled(const QString &strID)3434 { 3433 bool UIExtraDataManager::dockIconDisableOverlay(const QString &strID) 3434 { 3435 3435 /* 'False' unless feature allowed: */ 3436 return isFeatureAllowed(GUI_DockIcon OverlayDisabled, strID);3437 } 3438 3439 void UIExtraDataManager::set dockIconOverlayDisabled(bool fDisabled, const QString &strID)3436 return isFeatureAllowed(GUI_DockIconDisableOverlay, strID); 3437 } 3438 3439 void UIExtraDataManager::setDockIconDisableOverlay(bool fDisabled, const QString &strID) 3440 3440 { 3441 3441 /* 'True' if feature allowed, null-string otherwise: */ 3442 setExtraDataString(GUI_DockIcon OverlayDisabled, toFeatureAllowed(fDisabled), strID);3442 setExtraDataString(GUI_DockIconDisableOverlay, toFeatureAllowed(fDisabled), strID); 3443 3443 } 3444 3444 #endif /* Q_WS_MAC */ … … 3825 3825 strKey == GUI_RealtimeDockIconUpdateMonitor) 3826 3826 emit sigDockIconAppearanceChange(!isFeatureRestricted(strKey, strMachineID)); 3827 /* 'Dock icon overlay' appearance changed ( allowed if not restricted)? */3828 else if (strKey == GUI_DockIcon OverlayDisabled)3827 /* 'Dock icon overlay' appearance changed (restricted if not allowed)? */ 3828 else if (strKey == GUI_DockIconDisableOverlay) 3829 3829 emit sigDockIconOverlayAppearanceChange(isFeatureAllowed(strKey, strMachineID)); 3830 3830 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r58544 r58674 464 464 465 465 /** Mac OS X: Returns whether Dock icon overlay is disabled. */ 466 bool dockIcon OverlayDisabled(const QString &strID);467 /** Mac OS X: Defines whether Dock icon overlay @a fDisabled. */468 void set dockIconOverlayDisabled(bool fDisabled, const QString &strID);466 bool dockIconDisableOverlay(const QString &strID); 467 /** Mac OS X: Defines whether Dock icon overlay is @a fDisabled. */ 468 void setDockIconDisableOverlay(bool fDisabled, const QString &strID); 469 469 #endif /* Q_WS_MAC */ 470 470 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.cpp
r58544 r58674 122 122 { 123 123 /* Determine whether dock icon overlay is not disabled: */ 124 if (!gEDataManager->dockIcon OverlayDisabled(vboxGlobal().managedVMUuid()))124 if (!gEDataManager->dockIconDisableOverlay(vboxGlobal().managedVMUuid())) 125 125 { 126 /* Initialize overlay rect: */126 /* Initialize overlay rectangle: */ 127 127 CGRect overlayRect = CGRectMake(0, 0, 0, 0); 128 128 /* Make sure overlay image is valid: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r58550 r58674 1840 1840 }; 1841 1841 1842 class UIActionToggleDockIcon OverlayDisabled: public UIActionToggle1843 { 1844 Q_OBJECT; 1845 1846 public: 1847 1848 UIActionToggleDockIcon OverlayDisabled(UIActionPool *pParent)1842 class UIActionToggleDockIconDisableOverlay : public UIActionToggle 1843 { 1844 Q_OBJECT; 1845 1846 public: 1847 1848 UIActionToggleDockIconDisableOverlay(UIActionPool *pParent) 1849 1849 : UIActionToggle(pParent) {} 1850 1850 … … 2149 2149 m_pool[UIActionIndexRT_M_Dock_M_DockSettings_T_PreviewMonitor] = new UIActionToggleDockPreviewMonitor(this); 2150 2150 m_pool[UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor] = new UIActionToggleDockDisableMonitor(this); 2151 m_pool[UIActionIndexRT_M_Dock_M_DockSettings_T_ OverlayDisabled] = new UIActionToggleDockIconOverlayDisabled(this);2151 m_pool[UIActionIndexRT_M_Dock_M_DockSettings_T_DisableOverlay] = new UIActionToggleDockIconDisableOverlay(this); 2152 2152 #endif /* Q_WS_MAC */ 2153 2153 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r58550 r58674 122 122 UIActionIndexRT_M_Dock_M_DockSettings_T_PreviewMonitor, 123 123 UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor, 124 UIActionIndexRT_M_Dock_M_DockSettings_T_ OverlayDisabled,124 UIActionIndexRT_M_Dock_M_DockSettings_T_DisableOverlay, 125 125 #endif /* Q_WS_MAC */ 126 126 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r58550 r58674 1194 1194 this, SLOT(sltChangeDockIconUpdate(bool))); 1195 1195 1196 /* Get dock icon overlay disabledaction: */1197 QAction *pDockIcon OverlayDisabled = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_OverlayDisabled);1198 /* Prepare dock icon overlay disabledaction with initial data: */1199 pDockIcon OverlayDisabled->setChecked(gEDataManager->dockIconOverlayDisabled(vboxGlobal().managedVMUuid()));1200 /* Connect dock icon overlay disabled signals: */1201 connect(pDockIcon OverlayDisabled, SIGNAL(triggered(bool)),1202 this, SLOT(sltDockIcon OverlayDisabledChanged(bool)));1196 /* Get dock icon disable overlay action: */ 1197 QAction *pDockIconDisableOverlay = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableOverlay); 1198 /* Prepare dock icon disable overlay action with initial data: */ 1199 pDockIconDisableOverlay->setChecked(gEDataManager->dockIconDisableOverlay(vboxGlobal().managedVMUuid())); 1200 /* Connect dock icon disable overlay related signals: */ 1201 connect(pDockIconDisableOverlay, SIGNAL(triggered(bool)), 1202 this, SLOT(sltDockIconDisableOverlayChanged(bool))); 1203 1203 connect(gEDataManager, SIGNAL(sigDockIconOverlayAppearanceChange(bool)), 1204 1204 this, SLOT(sltChangeDockIconOverlayAppearance(bool))); 1205 /* Add dock icon overlay disabledaction to the dock settings menu: */1206 pDockSettingsMenu->addAction(pDockIcon OverlayDisabled);1205 /* Add dock icon disable overlay action to the dock settings menu: */ 1206 pDockSettingsMenu->addAction(pDockIconDisableOverlay); 1207 1207 1208 1208 /* Monitor selection if there are more than one monitor */ … … 2143 2143 void UIMachineLogic::sltChangeDockIconOverlayAppearance(bool fDisabled) 2144 2144 { 2145 /* Value of flag is directly referenced from extra-data manager later: */2146 Q_UNUSED(fDisabled);2147 2145 /* Update dock icon overlay: */ 2148 2146 if (isMachineWindowsCreated()) 2149 2147 updateDockOverlay(); 2150 /* Make sure to update dock icon action when dock icon overlay disabled changed from extra-data manager: */ 2151 QAction *pDockIconOverlayDisabled = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_OverlayDisabled); 2152 if (fDisabled != pDockIconOverlayDisabled->isChecked()) 2153 pDockIconOverlayDisabled->setChecked(fDisabled); 2154 } 2155 2156 void UIMachineLogic::sltDockIconOverlayDisabledChanged(bool fDisabled) 2157 { 2158 /* Write dock icon overlay flag to extra-data: */ 2159 gEDataManager->setdockIconOverlayDisabled(fDisabled, vboxGlobal().managedVMUuid()); 2148 /* Make sure to update dock icon disable overlay action state when 'GUI_DockIconDisableOverlay' changed from extra-data manager: */ 2149 QAction *pDockIconDisableOverlay = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableOverlay); 2150 if (fDisabled != pDockIconDisableOverlay->isChecked()) 2151 { 2152 /* Block signals initially to avoid recursive loop: */ 2153 pDockIconDisableOverlay->blockSignals(true); 2154 /* Update state: */ 2155 pDockIconDisableOverlay->setChecked(fDisabled); 2156 /* Make sure to unblock signals again: */ 2157 pDockIconDisableOverlay->blockSignals(false); 2158 } 2159 } 2160 2161 void UIMachineLogic::sltDockIconDisableOverlayChanged(bool fDisabled) 2162 { 2163 /* Write dock icon disable overlay flag to extra-data: */ 2164 gEDataManager->setDockIconDisableOverlay(fDisabled, vboxGlobal().managedVMUuid()); 2160 2165 } 2161 2166 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r58550 r58674 314 314 void sltChangeDockIconOverlayAppearance(bool fDisabled); 315 315 /** Handles dock icon overlay disable action triggering. */ 316 void sltDockIcon OverlayDisabledChanged(bool fDisabled);316 void sltDockIconDisableOverlayChanged(bool fDisabled); 317 317 #endif /* RT_OS_DARWIN */ 318 318 … … 400 400 QActionGroup *m_pDockPreviewSelectMonitorGroup; 401 401 int m_DockIconPreviewMonitor; 402 /** Holds whether dock icon overlay disabled. */403 bool m_fIsDockIconOverlayDisabled;404 402 #endif /* Q_WS_MAC */ 405 403
Note:
See TracChangeset
for help on using the changeset viewer.