- Timestamp:
- Jan 15, 2019 12:42:06 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128175
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r76626 r76825 4699 4699 { 4700 4700 /* Current VM only: */ 4701 if ( vboxGlobal(). isVMConsoleProcess()4701 if ( vboxGlobal().uiType() == VBoxGlobal::UIType_RuntimeUI 4702 4702 && uMachineID == vboxGlobal().managedVMUuid()) 4703 4703 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r76606 r76825 2901 2901 if (!strAutoConfirmId.isEmpty()) 2902 2902 { 2903 const QUuid uID = vboxGlobal().isVMConsoleProcess() ? vboxGlobal().managedVMUuid() : UIExtraDataManager::GlobalID; 2903 const QUuid uID = vboxGlobal().uiType() == VBoxGlobal::UIType_RuntimeUI 2904 ? vboxGlobal().managedVMUuid() 2905 : UIExtraDataManager::GlobalID; 2904 2906 confirmedMessageList = gEDataManager->suppressedMessages(uID); 2905 2907 if ( confirmedMessageList.contains(strAutoConfirmId) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.cpp
r76818 r76825 112 112 #ifndef VBOX_RUNTIME_UI 113 113 114 /* Show Selector UI: */115 if ( !vboxGlobal().isVMConsoleProcess())114 /* Make sure Selector UI is permitted, quit if not: */ 115 if (gEDataManager->guiFeatureEnabled(GUIFeatureType_NoSelector)) 116 116 { 117 /* Make sure Selector UI is permitted, quit if not: */ 118 if (gEDataManager->guiFeatureEnabled(GUIFeatureType_NoSelector)) 119 { 120 msgCenter().cannotStartSelector(); 121 return QApplication::quit(); 122 } 117 msgCenter().cannotStartSelector(); 118 return QApplication::quit(); 119 } 123 120 124 125 121 /* Create/show manager-window: */ 122 UIVirtualBoxManager::create(); 126 123 127 124 # ifdef VBOX_BLEEDING_EDGE 128 129 125 /* Show EXPERIMENTAL BUILD warning: */ 126 msgCenter().showExperimentalBuildWarning(); 130 127 # else /* !VBOX_BLEEDING_EDGE */ 131 128 # ifndef DEBUG 132 133 134 135 136 129 /* Show BETA warning if necessary: */ 130 const QString vboxVersion(vboxGlobal().virtualBox().GetVersion()); 131 if ( vboxVersion.contains("BETA") 132 && gEDataManager->preventBetaBuildWarningForVersion() != vboxVersion) 133 msgCenter().showBetaBuildWarning(); 137 134 # endif /* !DEBUG */ 138 135 # endif /* !VBOX_BLEEDING_EDGE */ 139 }140 136 141 137 #else /* VBOX_RUNTIME_UI */ 142 138 143 /* Show Runtime UI: */ 144 if (vboxGlobal().isVMConsoleProcess()) 145 { 146 /* Make sure machine is started, quit if not: */ 147 if (!UIMachine::startMachine(vboxGlobal().managedVMUuid())) 148 return QApplication::quit(); 149 } 150 /* Show the error message otherwise and quit: */ 151 else 139 /* Make sure Runtime UI is even possible, quit if not: */ 140 if (vboxGlobal().managedVMUuid().isNull()) 152 141 { 153 142 msgCenter().cannotStartRuntime(); 154 143 return QApplication::quit(); 155 144 } 145 146 /* Make sure machine is started, quit if not: */ 147 if (!UIMachine::startMachine(vboxGlobal().managedVMUuid())) 148 return QApplication::quit(); 156 149 157 150 #endif /* VBOX_RUNTIME_UI */ … … 198 191 199 192 #ifdef VBOX_RUNTIME_UI 200 /* For VM process: */ 201 if (vboxGlobal().isVMConsoleProcess()) 202 { 203 /* Temporary override the default close action to 'SaveState' if necessary: */ 204 if (gpMachine->uisession()->defaultCloseAction() == MachineCloseAction_Invalid) 205 gpMachine->uisession()->setDefaultCloseAction(MachineCloseAction_SaveState); 206 } 193 /* Temporary override the default close action to 'SaveState' if necessary: */ 194 if (gpMachine->uisession()->defaultCloseAction() == MachineCloseAction_Invalid) 195 gpMachine->uisession()->setDefaultCloseAction(MachineCloseAction_SaveState); 207 196 #endif 208 197 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r76818 r76825 2239 2239 && comMachine.CanShowConsoleWindow()) 2240 2240 { 2241 /* For the Selector UI: */ 2242 if (!isVMConsoleProcess()) 2243 { 2244 /* Just switch to existing VM window: */ 2245 return switchToMachine(comMachine); 2246 } 2247 /* For the Runtime UI: */ 2248 else 2249 { 2250 /* Only separate UI process can reach that place, 2251 * switch to existing VM window and exit. */ 2252 switchToMachine(comMachine); 2253 return false; 2241 switch (uiType()) 2242 { 2243 /* For Selector UI: */ 2244 case UIType_SelectorUI: 2245 { 2246 /* Just switch to existing VM window: */ 2247 return switchToMachine(comMachine); 2248 } 2249 /* For Runtime UI: */ 2250 case UIType_RuntimeUI: 2251 { 2252 /* Only separate UI process can reach that place. 2253 * Switch to existing VM window and exit. */ 2254 switchToMachine(comMachine); 2255 return false; 2256 } 2254 2257 } 2255 2258 } … … 3017 3020 comMachine = comSession.GetMachine(); 3018 3021 } 3019 /* Is itSelector UI call? */3020 else if ( !isVMConsoleProcess())3022 /* Is this a Selector UI call? */ 3023 else if (uiType() == UIType_SelectorUI) 3021 3024 { 3022 3025 /* Open existing 'shared' session: */ … … 4123 4126 } 4124 4127 4125 /* After initializing *m_strManagedVMId* we already know if that is VM process or not: */4126 if ( !isVMConsoleProcess())4128 /* For Selector UI: */ 4129 if (uiType() == UIType_SelectorUI) 4127 4130 { 4128 4131 /* We should create separate logging file for VM selector: */ … … 4155 4158 4156 4159 #ifdef VBOX_WITH_DEBUGGER_GUI 4157 /* Setup the debugger gui if VM console process: */ 4158 if (isVMConsoleProcess()) 4159 { 4160 /* For Runtime UI: */ 4161 if (uiType() == UIType_RuntimeUI) 4162 { 4163 /* Setup the debugger GUI: */ 4160 4164 if (RTEnvExist("VBOX_GUI_NO_DEBUGGER")) 4161 4165 m_fDbgEnabled = m_fDbgAutoShow = m_fDbgAutoShowCommandLine = m_fDbgAutoShowStatistics = false; … … 4355 4359 comWrappersReinit(); 4356 4360 4357 /* If that isSelector UI: */4358 if ( !isVMConsoleProcess())4361 /* For Selector UI: */ 4362 if (uiType() == UIType_SelectorUI) 4359 4363 { 4360 4364 /* Recreate Main event listeners: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r76818 r76825 206 206 /** Returns the --startvm option value (managed VM id). */ 207 207 QUuid managedVMUuid() const { return m_strManagedVMId; } 208 /** Returns whether this is VM console process. */209 bool isVMConsoleProcess() const { return !m_strManagedVMId.isNull(); }210 208 /** Returns the --separate option value (whether GUI process is separate from VM process). */ 211 209 bool isSeparateProcess() const { return m_fSeparateProcess; } -
trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.cpp
r76606 r76825 65 65 { 66 66 /* For Selector UI only: */ 67 AssertReturn( !vboxGlobal().isVMConsoleProcess(), 0);67 AssertReturn(vboxGlobal().uiType() == VBoxGlobal::UIType_SelectorUI, 0); 68 68 69 69 /* Create network-manager state-indicator: */ -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
r76606 r76825 528 528 529 529 #ifdef VBOX_WITH_UPDATE_REQUEST 530 /* Ask updater to check for the first time : */531 if (gEDataManager->applicationUpdateEnabled() && !vboxGlobal().isVMConsoleProcess())530 /* Ask updater to check for the first time, for Selector UI only: */ 531 if (gEDataManager->applicationUpdateEnabled() && vboxGlobal().uiType() == VBoxGlobal::UIType_SelectorUI) 532 532 QTimer::singleShot(0, this, SLOT(sltCheckIfUpdateIsNecessary())); 533 533 #endif /* VBOX_WITH_UPDATE_REQUEST */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
r76606 r76825 1141 1141 1142 1142 /* In the VM process we start by displaying the Runtime UI tab: */ 1143 if ( VBoxGlobal::instance()->isVMConsoleProcess())1143 if (vboxGlobal().uiType() == VBoxGlobal::UIType_RuntimeUI) 1144 1144 m_pTabWidget->setCurrentWidget(pMachineTab); 1145 1145 }
Note:
See TracChangeset
for help on using the changeset viewer.