- Timestamp:
- Apr 22, 2008 1:41:43 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30046
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h
r8219 r8292 109 109 void mouseStateChanged (int state); 110 110 void machineStateChanged (KMachineState state); 111 void additionsStateChanged (const QString &, bool, bool );111 void additionsStateChanged (const QString &, bool, bool, bool); 112 112 void mediaChanged (VBoxDefs::DiskType aType); 113 113 void networkStateChange(); -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r8155 r8292 175 175 void updateMachineState (KMachineState state); 176 176 void updateMouseState (int state); 177 void updateAdditionsState (const QString&, bool, bool );177 void updateAdditionsState (const QString&, bool, bool, bool); 178 178 void updateNetworkAdarptersState(); 179 179 void updateUsbState(); … … 325 325 bool mIsSeamless : 1; 326 326 bool mIsSeamlessSupported : 1; 327 bool mIsGraphicsSupported : 1; 327 328 int normal_wflags; 328 329 bool was_max : 1; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r8219 r8292 235 235 const QString &aAddVersion, 236 236 bool aAddActive, 237 bool aSupportsSeamless) : 237 bool aSupportsSeamless, 238 bool aSupportsGraphics) : 238 239 QEvent ((QEvent::Type) VBoxDefs::AdditionsStateChangeEventType), 239 240 mOsTypeId (aOsTypeId), mAddVersion (aAddVersion), 240 mAddActive (aAddActive), mSupportsSeamless (aSupportsSeamless) {} 241 mAddActive (aAddActive), mSupportsSeamless (aSupportsSeamless), 242 mSupportsGraphics (aSupportsGraphics) {} 241 243 const QString &osTypeId() const { return mOsTypeId; } 242 244 const QString &additionVersion() const { return mAddVersion; } 243 245 bool additionActive() const { return mAddActive; } 244 246 bool supportsSeamless() const { return mSupportsSeamless; } 247 bool supportsGraphics() const { return mSupportsGraphics; } 245 248 private: 246 249 QString mOsTypeId; … … 248 251 bool mAddActive; 249 252 bool mSupportsSeamless; 253 bool mSupportsGraphics; 250 254 }; 251 255 … … 438 442 guest.GetAdditionsVersion(), 439 443 guest.GetAdditionsActive(), 440 guest.GetSupportsSeamless())); 444 guest.GetSupportsSeamless(), 445 guest.GetSupportsGraphics())); 441 446 return S_OK; 442 447 } … … 1180 1185 emit additionsStateChanged (ge->additionVersion(), 1181 1186 ge->additionActive(), 1182 ge->supportsSeamless()); 1187 ge->supportsSeamless(), 1188 ge->supportsGraphics()); 1183 1189 return true; 1184 1190 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r8213 r8292 120 120 , mIsSeamless (false) 121 121 , mIsSeamlessSupported (false) 122 , mIsGraphicsSupported (false) 122 123 , normal_wflags (getWFlags()) 123 124 , was_max (false) … … 798 799 connect (console, SIGNAL (machineStateChanged (KMachineState)), 799 800 this, SLOT (updateMachineState (KMachineState))); 800 connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool )),801 this, SLOT (updateAdditionsState (const QString &, bool, bool )));801 connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool, bool)), 802 this, SLOT (updateAdditionsState (const QString &, bool, bool, bool))); 802 803 connect (console, SIGNAL (mediaChanged (VBoxDefs::DiskType)), 803 804 this, SLOT (updateMediaState (VBoxDefs::DiskType))); … … 943 944 /* If seamless mode should be enabled then check if it is enabled 944 945 * currently and re-enable it if seamless is supported */ 945 if (vmSeamlessAction->isOn() && mIsSeamlessSupported )946 if (vmSeamlessAction->isOn() && mIsSeamlessSupported && mIsGraphicsSupported) 946 947 toggleFullscreenMode (true, true); 947 948 mIsOpenViewFinished = true; … … 1063 1064 #endif 1064 1065 1065 vmSeamlessAction->setEnabled (mIsSeamlessSupported );1066 vmSeamlessAction->setEnabled (mIsSeamlessSupported && mIsGraphicsSupported); 1066 1067 vmFullscreenAction->setEnabled (true); 1067 1068 … … 2032 2033 mIsFullscreen = aOn; 2033 2034 vmAdjustWindowAction->setEnabled (!aOn); 2034 vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported );2035 vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported && mIsGraphicsSupported); 2035 2036 } 2036 2037 … … 2283 2284 { 2284 2285 /* check if it is possible to enter/leave seamless mode */ 2285 if (mIsSeamlessSupported || !aOn)2286 if (mIsSeamlessSupported && mIsGraphicsSupported || !aOn) 2286 2287 { 2287 2288 bool ok = toggleFullscreenMode (aOn, true /* aSeamless */); … … 3228 3229 void VBoxConsoleWnd::updateAdditionsState (const QString &aVersion, 3229 3230 bool aActive, 3230 bool aSeamlessSupported) 3231 bool aSeamlessSupported, 3232 bool aGraphicsSupported) 3231 3233 { 3232 3234 vmAutoresizeGuestAction->setEnabled (aActive); 3233 if (mIsSeamlessSupported != aSeamlessSupported) 3234 { 3235 vmSeamlessAction->setEnabled (aSeamlessSupported); 3235 if ( (mIsSeamlessSupported != aSeamlessSupported) 3236 || (mIsGraphicsSupported != aGraphicsSupported)) 3237 { 3238 vmSeamlessAction->setEnabled (aSeamlessSupported && aGraphicsSupported); 3236 3239 mIsSeamlessSupported = aSeamlessSupported; 3240 mIsGraphicsSupported = aGraphicsSupported; 3237 3241 /* If seamless mode should be enabled then check if it is enabled 3238 3242 * currently and re-enable it if open-view procedure is finished */ 3239 if (vmSeamlessAction->isOn() && mIsOpenViewFinished && aSeamlessSupported) 3243 if ( vmSeamlessAction->isOn() 3244 && mIsOpenViewFinished 3245 && aSeamlessSupported 3246 && aGraphicsSupported) 3240 3247 toggleFullscreenMode (true, true); 3241 3248 } -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h
r8219 r8292 126 126 void mouseStateChanged (int state); 127 127 void machineStateChanged (KMachineState state); 128 void additionsStateChanged (const QString &, bool, bool );128 void additionsStateChanged (const QString &, bool, bool, bool); 129 129 void mediaChanged (VBoxDefs::DiskType aType); 130 130 void networkStateChange(); -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h
r8155 r8292 175 175 void updateMachineState (KMachineState state); 176 176 void updateMouseState (int state); 177 void updateAdditionsState (const QString&, bool, bool );177 void updateAdditionsState (const QString&, bool, bool, bool); 178 178 void updateNetworkAdarptersState(); 179 179 void updateUsbState(); … … 328 328 bool mIsSeamless : 1; 329 329 bool mIsSeamlessSupported : 1; 330 bool mIsGraphicsSupported : 1; 330 331 bool was_max : 1; 331 332 QObjectList hidden_children; -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp
r8220 r8292 228 228 const QString &aAddVersion, 229 229 bool aAddActive, 230 bool aSupportsSeamless) : 230 bool aSupportsSeamless, 231 bool aSupportsGraphics) : 231 232 QEvent ((QEvent::Type) VBoxDefs::AdditionsStateChangeEventType), 232 233 mOsTypeId (aOsTypeId), mAddVersion (aAddVersion), 233 mAddActive (aAddActive), mSupportsSeamless (aSupportsSeamless) {} 234 mAddActive (aAddActive), mSupportsSeamless (aSupportsSeamless), 235 mSupportsGraphics (aSupportsGraphics) {} 234 236 const QString &osTypeId() const { return mOsTypeId; } 235 237 const QString &additionVersion() const { return mAddVersion; } 236 238 bool additionActive() const { return mAddActive; } 237 239 bool supportsSeamless() const { return mSupportsSeamless; } 240 bool supportsGraphics() const { return mSupportsGraphics; } 238 241 private: 239 242 QString mOsTypeId; … … 241 244 bool mAddActive; 242 245 bool mSupportsSeamless; 246 bool mSupportsGraphics; 243 247 }; 244 248 … … 429 433 guest.GetAdditionsVersion(), 430 434 guest.GetAdditionsActive(), 431 guest.GetSupportsSeamless())); 435 guest.GetSupportsSeamless(), 436 guest.GetSupportsGraphics())); 432 437 return S_OK; 433 438 } … … 1198 1203 emit additionsStateChanged (ge->additionVersion(), 1199 1204 ge->additionActive(), 1200 ge->supportsSeamless()); 1205 ge->supportsSeamless(), 1206 ge->supportsGraphics()); 1201 1207 return true; 1202 1208 } -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r8211 r8292 125 125 , mIsSeamless (false) 126 126 , mIsSeamlessSupported (false) 127 , mIsGraphicsSupported (false) 127 128 , was_max (false) 128 129 , console_style (0) … … 808 809 connect (console, SIGNAL (machineStateChanged (KMachineState)), 809 810 this, SLOT (updateMachineState (KMachineState))); 810 connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool )),811 this, SLOT (updateAdditionsState (const QString &, bool, bool )));811 connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool, bool)), 812 this, SLOT (updateAdditionsState (const QString &, bool, bool, bool))); 812 813 connect (console, SIGNAL (mediaChanged (VBoxDefs::DiskType)), 813 814 this, SLOT (updateMediaState (VBoxDefs::DiskType))); … … 952 953 /* If seamless mode should be enabled then check if it is enabled 953 954 * currently and re-enable it if seamless is supported */ 954 if (vmSeamlessAction->isChecked() && mIsSeamlessSupported) 955 if ( vmSeamlessAction->isChecked() 956 && mIsSeamlessSupported 957 && mIsGraphicsSupported) 955 958 toggleFullscreenMode (true, true); 956 959 mIsOpenViewFinished = true; … … 1072 1075 #endif 1073 1076 1074 vmSeamlessAction->setEnabled (mIsSeamlessSupported );1077 vmSeamlessAction->setEnabled (mIsSeamlessSupported && mIsGraphicsSupported); 1075 1078 vmFullscreenAction->setEnabled (true); 1076 1079 … … 2053 2056 mIsFullscreen = aOn; 2054 2057 vmAdjustWindowAction->setEnabled (!aOn); 2055 vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported );2058 vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported && mIsGraphicsSupported); 2056 2059 } 2057 2060 … … 2341 2344 { 2342 2345 /* check if it is possible to enter/leave seamless mode */ 2343 if (mIsSeamlessSupported || !aOn)2346 if (mIsSeamlessSupported && mIsGraphicsSupported || !aOn) 2344 2347 { 2345 2348 bool ok = toggleFullscreenMode (aOn, true /* aSeamless */); … … 3272 3275 void VBoxConsoleWnd::updateAdditionsState (const QString &aVersion, 3273 3276 bool aActive, 3274 bool aSeamlessSupported) 3275 { 3276 vmAutoresizeGuestAction->setEnabled (aActive); 3277 if (mIsSeamlessSupported != aSeamlessSupported) 3278 { 3279 vmSeamlessAction->setEnabled (aSeamlessSupported); 3277 bool aSeamlessSupported, 3278 bool aGraphicsSupported) 3279 { 3280 vmAutoresizeGuestAction->setEnabled (aActive && aGraphicsSupported); 3281 if ( (mIsSeamlessSupported != aSeamlessSupported) 3282 || (mIsGraphicsSupported != aGraphicsSupported)) 3283 { 3284 vmSeamlessAction->setEnabled (aSeamlessSupported && aGraphicsSupported); 3280 3285 mIsSeamlessSupported = aSeamlessSupported; 3286 mIsGraphicsSupported = aGraphicsSupported; 3281 3287 /* If seamless mode should be enabled then check if it is enabled 3282 3288 * currently and re-enable it if open-view procedure is finished */ 3283 if (vmSeamlessAction->isChecked() && mIsOpenViewFinished && aSeamlessSupported) 3289 if ( vmSeamlessAction->isChecked() 3290 && mIsOpenViewFinished 3291 && aSeamlessSupported 3292 && aGraphicsSupported) 3284 3293 toggleFullscreenMode (true, true); 3285 3294 }
Note:
See TracChangeset
for help on using the changeset viewer.