Changeset 46813 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 26, 2013 6:42:59 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r46586 r46813 1988 1988 tr("Failed to disable the remote desktop server for the virtual machine <b>%1</b>.").arg(strMachineName), 1989 1989 formatErrorInfo(server)); 1990 } 1991 1992 void UIMessageCenter::cannotToggleVideoCapture(const CMachine &machine, bool fEnable) 1993 { 1994 /* Get machine-name preserving error-info: */ 1995 QString strMachineName(CMachine(machine).GetName()); 1996 error(0, MessageType_Error, 1997 fEnable ? 1998 tr("Failed to enable the video capture for the virtual machine <b>%1</b>.").arg(strMachineName) : 1999 tr("Failed to disable the video capture for the virtual machine <b>%1</b>.").arg(strMachineName), 2000 formatErrorInfo(machine)); 1990 2001 } 1991 2002 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r46586 r46813 299 299 void cannotDetachUSBDevice(const CVirtualBoxErrorInfo &errorInfo, const QString &strDevice, const QString &strMachineName) const; 300 300 void cannotToggleVRDEServer(const CVRDEServer &server, const QString &strMachineName, bool fEnable); 301 void cannotToggleVideoCapture(const CMachine &machine, bool fEnable); 301 302 void remindAboutGuestAdditionsAreNotActive() const; 302 303 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r46797 r46813 1946 1946 return; 1947 1947 1948 /* Access machine: */ 1949 CMachine machine = session().GetMachine(); 1950 AssertMsg(!machine.isNull(), ("Machine should NOT be null!\n")); 1951 if (machine.isNull()) 1952 return; 1953 1948 1954 /* Make sure something had changed: */ 1949 CMachine machine = session().GetMachine();1950 1955 if (machine.GetVideoCaptureEnabled() == static_cast<BOOL>(fEnabled)) 1951 1956 return; 1952 1957 1958 /* Update Video Capture state: */ 1959 AssertMsg(machine.isOk(), ("Machine should be OK!\n")); 1960 machine.SetVideoCaptureEnabled(fEnabled); 1961 /* Machine is not OK? */ 1962 if (!machine.isOk()) 1963 { 1964 /* Notify about the error: */ 1965 msgCenter().cannotToggleVideoCapture(machine, fEnabled); 1966 /* Make sure action is updated! */ 1967 uisession()->updateStatusVideoCapture(); 1968 } 1953 1969 /* Machine is OK? */ 1954 if (machine.isOk()) 1955 { 1956 /* Update Video Capture state: */ 1957 machine.SetVideoCaptureEnabled(fEnabled); 1958 /* Machine still OK? */ 1959 if (machine.isOk()) 1960 { 1961 /* Save machine-settings: */ 1962 machine.SaveSettings(); 1963 } 1964 } 1965 /* Machine had failed on one of steps? */ 1966 if (!machine.isOk()) 1967 msgCenter().cannotSaveMachineSettings(machine); 1970 else 1971 { 1972 /* Save machine-settings: */ 1973 machine.SaveSettings(); 1974 /* Machine is not OK? */ 1975 if (!machine.isOk()) 1976 { 1977 /* Notify about the error: */ 1978 msgCenter().cannotSaveMachineSettings(machine); 1979 /* Make sure action is updated! */ 1980 uisession()->updateStatusVideoCapture(); 1981 } 1982 } 1968 1983 } 1969 1984 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r46795 r46813 168 168 void setFrameBuffer(ulong uScreenId, UIFrameBuffer* pFrameBuffer); 169 169 170 /* Temporary API: VRDE stuff:*/170 /* Temporary API: */ 171 171 void updateStatusVRDE() { sltVRDEChange(); } 172 void updateStatusVideoCapture() { sltVideoCaptureChange(); } 172 173 173 174 signals:
Note:
See TracChangeset
for help on using the changeset viewer.