Changeset 26908 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 1, 2010 12:49:28 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r26782 r26908 1873 1873 if (!console.isOk()) 1874 1874 { 1875 vboxProblem().cannotStartMachine (console); 1875 if (vboxGlobal().showStartVMErrors()) 1876 vboxProblem().cannotStartMachine (console); 1876 1877 /* close this window (this will call closeView()) */ 1877 1878 close(); … … 1886 1887 /* Disable auto closure because we want to have a chance to show the 1887 1888 * error dialog on startup failure */ 1888 mNoAutoClose = true; 1889 if (vboxGlobal().showStartVMErrors()) 1890 mNoAutoClose = true; 1889 1891 1890 1892 /* show the "VM starting / restoring" progress dialog */ … … 1897 1899 if (progress.GetResultCode() != 0) 1898 1900 { 1899 vboxProblem().cannotStartMachine (progress); 1901 if (vboxGlobal().showStartVMErrors()) 1902 vboxProblem().cannotStartMachine (progress); 1900 1903 /* close this window (this will call closeView()) */ 1901 1904 close(); … … 1906 1909 } 1907 1910 1908 mNoAutoClose = false; 1911 if (vboxGlobal().showStartVMErrors()) 1912 mNoAutoClose = false; 1909 1913 1910 1914 /* Check if we missed a really quick termination after successful -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r26890 r26908 4839 4839 #endif 4840 4840 4841 mShowStartVMErrors = true; 4842 bool startVM = false; 4843 QString vmNameOrUuid; 4844 4841 4845 int argc = qApp->argc(); 4842 4846 int i = 1; … … 4852 4856 if (++i < argc) 4853 4857 { 4854 QString param = QString (qApp->argv() [i]); 4855 QUuid uuid = QUuid(param); 4856 if (!uuid.isNull()) 4857 { 4858 vmUuid = param; 4859 } 4860 else 4861 { 4862 CMachine m = mVBox.FindMachine (param); 4863 if (m.isNull()) 4864 { 4865 vboxProblem().cannotFindMachineByName (mVBox, param); 4866 return; 4867 } 4868 vmUuid = m.GetId(); 4869 } 4858 vmNameOrUuid = QString (qApp->argv() [i]); 4859 startVM = true; 4870 4860 } 4871 4861 } … … 4928 4918 mStartPaused = false; 4929 4919 } 4920 else if (!::strcmp (arg, "--no-startvm-errormsgbox")) 4921 { 4922 mShowStartVMErrors = false; 4923 } 4930 4924 #endif 4931 4925 /** @todo add an else { msgbox(syntax error); exit(1); } here, pretty please... */ 4932 4926 i++; 4927 } 4928 4929 if (startVM) 4930 { 4931 QUuid uuid = QUuid(vmNameOrUuid); 4932 if (!uuid.isNull()) 4933 { 4934 vmUuid = vmNameOrUuid; 4935 } 4936 else 4937 { 4938 CMachine m = mVBox.FindMachine (vmNameOrUuid); 4939 if (m.isNull()) 4940 { 4941 if (showStartVMErrors()) 4942 vboxProblem().cannotFindMachineByName (mVBox, vmNameOrUuid); 4943 return; 4944 } 4945 vmUuid = m.GetId(); 4946 } 4933 4947 } 4934 4948 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r26890 r26908 321 321 322 322 bool isVMConsoleProcess() const { return !vmUuid.isNull(); } 323 bool showStartVMErrors() const { return mShowStartVMErrors; } 323 324 #ifdef VBOX_GUI_WITH_SYSTRAY 324 325 bool isTrayMenu() const; … … 923 924 #endif 924 925 926 /** Whether to show error message boxes for VM start errors. */ 927 bool mShowStartVMErrors; 928 925 929 QThread *mMediaEnumThread; 926 930 VBoxMediaList mMediaList; -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r26729 r26908 271 271 " --start-paused start the VM in the paused state\n" 272 272 " --start-running start the VM running (for overriding --debug*)\n" 273 " --no-startvm-errormsgbox do not show a message box for VM start errors\n" 273 274 "\n" 274 275 "The following environment variables are evaluated:\n"
Note:
See TracChangeset
for help on using the changeset viewer.