Changeset 1435 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 13, 2007 9:35:26 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 19468
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r993 r1435 109 109 void finalizeOpenView(); 110 110 111 void loadGuiCustomizations(); 112 111 113 void vmFullscreen (bool on); 112 114 void vmAutoresizeGuest (bool on); -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r1370 r1435 207 207 const QString &hostKey); 208 208 209 void cannotRunInSelectorMode(); 210 209 211 void showRuntimeError (const CConsole &console, bool fatal, 210 212 const QString &errorID, -
trunk/src/VBox/Frontends/VirtualBox/include/VMGlobalSettings.h
r382 r1435 43 43 int hostkey; 44 44 bool autoCapture; 45 QString guiFeatures; 45 46 46 47 friend class VMGlobalSettings; … … 54 55 Q_PROPERTY (int hostKey READ hostKey WRITE setHostKey) 55 56 Q_PROPERTY (bool autoCapture READ autoCapture WRITE setAutoCapture) 57 Q_PROPERTY (QString guiFeatures READ guiFeatures WRITE setGuiFeatures) 56 58 57 59 public: … … 76 78 resetError(); 77 79 } 80 81 QString guiFeatures() const { return data()->guiFeatures; } 82 void setGuiFeatures (const QString &aFeatures) 83 { 84 mData()->guiFeatures = aFeatures; 85 } 86 bool isFeatureActivated (const char*) const; 78 87 79 88 // -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r1285 r1435 562 562 centralWidget(), "console"); 563 563 564 loadGuiCustomizations(); 565 564 566 ((QBoxLayout*) centralWidget()->layout())->addWidget ( 565 567 console, 0, AlignVCenter | AlignHCenter); … … 700 702 LogFlowFuncLeave(); 701 703 return true; 704 } 705 706 void VBoxConsoleWnd::loadGuiCustomizations() 707 { 708 VMGlobalSettings settings = vboxGlobal().settings(); 709 /* Searching for known keys */ 710 const char *noMenuBar = "noMenuBar"; 711 const char *noStatusBar = "noStatusBar"; 712 menuBar()->setHidden (settings.isFeatureActivated (noMenuBar)); 713 statusBar()->setHidden (settings.isFeatureActivated (noStatusBar)); 702 714 } 703 715 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r1370 r1435 1361 1361 } 1362 1362 1363 void VBoxProblemReporter::cannotRunInSelectorMode() 1364 { 1365 message (mainWindowShown(), Critical, 1366 tr ("<p>VirtualBox is running in forced <b>noSelector</b> " 1367 "mode.</p><p>Please run VirtualBox with -startvm parameter " 1368 "specifying required VM to start.</p>" 1369 "<p>The application will now terminate.</p>")); 1370 } 1371 1363 1372 void VBoxProblemReporter::showRuntimeError (const CConsole &aConsole, bool fatal, 1364 1373 const QString &errorID, -
trunk/src/VBox/Frontends/VirtualBox/src/VMGlobalSettings.cpp
r1285 r1435 55 55 #endif 56 56 autoCapture = true; 57 guiFeatures = QString::null; 57 58 } 58 59 … … 60 61 hostkey = that.hostkey; 61 62 autoCapture = that.autoCapture; 63 guiFeatures = that.guiFeatures; 62 64 } 63 65 … … 70 72 return this == &that || ( 71 73 hostkey == that.hostkey && 72 autoCapture == that.autoCapture 74 autoCapture == that.autoCapture && 75 guiFeatures == that.guiFeatures 73 76 ); 74 77 } … … 90 93 { "GUI/Input/HostKey", "hostKey", "\\d*[1-9]\\d*" }, 91 94 { "GUI/Input/AutoCapture", "autoCapture", "true|false" }, 95 { "GUI/Customizations", "guiFeatures", "\\S+" }, 92 96 }; 93 97 … … 103 107 mData()->hostkey = key; 104 108 resetError(); 109 } 110 111 bool VMGlobalSettings::isFeatureActivated (const char *aFeature) const 112 { 113 QStringList featureList = QStringList::split (',', data()->guiFeatures); 114 return featureList.contains (aFeature); 105 115 } 106 116 -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r1343 r1435 22 22 23 23 #include "VBoxGlobal.h" 24 #include "VBoxProblemReporter.h" 24 25 #include "VBoxSelectorWnd.h" 25 26 #include "VBoxConsoleWnd.h" … … 215 216 if (vboxGlobal().isValid()) 216 217 { 218 VMGlobalSettings settings = vboxGlobal().settings(); 219 /* Searching for known keys */ 220 const char *noSelector = "noSelector"; 221 bool forcedConsole = settings.isFeatureActivated (noSelector); 222 217 223 if (vboxGlobal().isVMConsoleProcess()) 218 224 { … … 220 226 if (vboxGlobal().startMachine (vboxGlobal().managedVMUuid())) 221 227 rc = a.exec(); 228 } 229 else if (forcedConsole) 230 { 231 vboxProblem().cannotRunInSelectorMode(); 222 232 } 223 233 else
Note:
See TracChangeset
for help on using the changeset viewer.