Changeset 2463 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 3, 2007 1:53:29 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r2378 r2463 367 367 QString::fromUcs2 (message))); 368 368 return S_OK; 369 } 370 371 STDMETHOD(OnCanShowWindow)(BOOL *canShow) 372 { 373 if (!canShow) 374 return E_POINTER; 375 /* @todo return TRUE... */ 376 *canShow = FALSE; 377 return S_OK; 378 } 379 380 STDMETHOD(OnShowWindow)() 381 { 382 /* @todo implement */ 383 return E_NOTIMPL; 369 384 } 370 385 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r2392 r2463 174 174 STDMETHOD(OnExtraDataCanChange)(IN_GUIDPARAM id, 175 175 IN_BSTRPARAM key, IN_BSTRPARAM value, 176 B OOL *allowChange)177 { 178 if (! allowChange)176 BSTR *error, BOOL *allowChange) 177 { 178 if (!error || !allowChange) 179 179 return E_INVALIDARG; 180 180 181 181 if (COMBase::toQUuid (id).isNull()) 182 182 { 183 / / it's a global extra data key someone wants to change183 /* it's a global extra data key someone wants to change */ 184 184 QString sKey = QString::fromUcs2 (key); 185 185 QString sVal = QString::fromUcs2 (value); 186 186 if (sKey.startsWith ("GUI/")) 187 187 { 188 / / try to set the global setting to check its syntax188 /* try to set the global setting to check its syntax */ 189 189 VBoxGlobalSettings gs (false /* non-null */); 190 190 if (gs.setPublicProperty (sKey, sVal)) 191 191 { 192 /// @todo (dmik) 193 // report the error message to the server using 194 // IVurtualBoxError 195 *allowChange = !!gs; // allow only when no error 192 /* this is a known GUI property key */ 193 if (!gs) 194 { 195 /* disallow the change when there is an error*/ 196 *error = SysAllocString ((const OLECHAR *) 197 gs.lastError().ucs2()); 198 *allowChange = FALSE; 199 } 200 else 201 *allowChange = TRUE; 196 202 return S_OK; 197 203 } … … 199 205 } 200 206 201 / / not interested in this key -- never disagree207 /* not interested in this key -- never disagree */ 202 208 *allowChange = TRUE; 203 209 return S_OK; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
r2354 r2463 197 197 198 198 /** 199 * Sets a value of theproperty with the given public name.200 * Returns false if suchproperty is not found, and true otherwise.199 * Sets a value of a property with the given public name. 200 * Returns false if the specified property is not found, and true otherwise. 201 201 * 202 202 * This method (as opposed to #setProperty (const char *name, const QVariant& value)) … … 204 204 * 205 205 * If an error occures while setting the value of the property, #operator !() 206 * will return false after this method returns , and #lastError() will contain206 * will return false after this method returns true, and #lastError() will contain 207 207 * the error message. 208 208 * -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui.h
r2420 r2463 656 656 */ 657 657 CHost host = vboxGlobal().virtualBox().GetHost(); 658 CHostUSBDeviceFilter removedFilter;659 658 if (mUSBFilterListModified) 660 for (ulong c ount = host.GetUSBDeviceFilters().GetCount(); count; -- count)661 host.RemoveUSBDeviceFilter (0 , removedFilter);659 for (ulong cnt = host.GetUSBDeviceFilters().GetCount(); cnt; -- cnt) 660 host.RemoveUSBDeviceFilter (0); 662 661 663 662 /* then add all new filters */ … … 877 876 } 878 877 879 /* creat ingnew usb filter */880 CHost USBDeviceFilter hostFilter;881 vboxGlobal().virtualBox().GetHost().CreateUSBDeviceFilter (882 usbFilterName.arg (maxFilterIndex + 1), hostFilter);878 /* create a new usb filter */ 879 CHost host = vboxGlobal().virtualBox().GetHost(); 880 CHostUSBDeviceFilter hostFilter = host 881 .CreateUSBDeviceFilter (usbFilterName.arg (maxFilterIndex + 1)); 883 882 hostFilter.SetAction (CEnums::USBDeviceFilterHold); 884 883 … … 904 903 905 904 CHost host = vboxGlobal().virtualBox().GetHost(); 906 CHostUSBDeviceFilter hostFilter ;907 host.CreateUSBDeviceFilter (vboxGlobal().details (usb), hostFilter);905 CHostUSBDeviceFilter hostFilter = host 906 .CreateUSBDeviceFilter (vboxGlobal().details (usb)); 908 907 hostFilter.SetAction (CEnums::USBDeviceFilterHold); 909 908
Note:
See TracChangeset
for help on using the changeset viewer.