Changeset 8813 in vbox for trunk/src/VBox
- Timestamp:
- May 14, 2008 2:12:46 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r8513 r8813 185 185 void processGlobalSettingChange (const char *publicName, const char *name); 186 186 187 void dbgPrepareDebugMenu(); 187 188 void dbgShowStatistics(); 188 189 void dbgShowCommandLine(); 190 void dbgLoggingToggled (bool); 189 191 190 192 void onEnterFullscreen(); … … 233 235 QAction *dbgStatisticsAction; 234 236 QAction *dbgCommandLineAction; 237 QAction *dbgLoggingAction; 235 238 #endif 236 239 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r8779 r8813 112 112 , dbgStatisticsAction (NULL) 113 113 , dbgCommandLineAction (NULL) 114 , dbgLoggingAction (NULL) 114 115 , dbgMenu (NULL) 115 116 #endif … … 260 261 261 262 #ifdef VBOX_WITH_DEBUGGER_GUI 263 /* Debug menu actions */ 262 264 if (vboxGlobal().isDebuggerEnabled()) 263 265 { 264 266 dbgStatisticsAction = new QAction (this, "dbgStatisticsAction"); 265 267 dbgCommandLineAction = new QAction (this, "dbgCommandLineAction"); 268 dbgLoggingAction = new QAction (this, "dbgLoggingAction"); 269 dbgLoggingAction->setToggleAction (true); 270 dbgLoggingAction->setIconSet (VBoxGlobal::iconSet ("start_16px.png")); /// @todo find the default check boxes. 266 271 } 267 272 else … … 269 274 dbgStatisticsAction = NULL; 270 275 dbgCommandLineAction = NULL; 276 dbgLoggingAction = NULL; 271 277 } 272 278 #endif … … 378 384 dbgStatisticsAction->addTo (dbgMenu); 379 385 dbgCommandLineAction->addTo (dbgMenu); 386 dbgLoggingAction->addTo (dbgMenu); 380 387 menuBar()->insertItem (QString::null, dbgMenu, dbgMenuId); 381 388 mMainMenu->insertItem (QString::null, dbgMenu, dbgMenuId); … … 582 589 583 590 #ifdef VBOX_WITH_DEBUGGER_GUI 591 if (dbgMenu) 592 connect (dbgMenu, SIGNAL (aboutToShow()), 593 this, SLOT (dbgPrepareDebugMenu())); 584 594 if (dbgStatisticsAction) 585 595 connect (dbgStatisticsAction, SIGNAL (activated()), … … 588 598 connect (dbgCommandLineAction, SIGNAL (activated()), 589 599 this, SLOT (dbgShowCommandLine())); 600 if (dbgLoggingAction) 601 connect (dbgLoggingAction, SIGNAL (toggled (bool)), 602 this, SLOT (dbgLoggingToggled (bool))); 590 603 #endif 591 604 … … 1551 1564 if (dbgCommandLineAction) 1552 1565 dbgCommandLineAction->setMenuText (tr ("&Command line...")); 1566 if (dbgLoggingAction) 1567 dbgLoggingAction->setMenuText (tr ("&Logging...")); 1553 1568 #endif 1554 1569 … … 3363 3378 3364 3379 /** 3380 * Prepare the Debug menu. 3381 */ 3382 void VBoxConsoleWnd::dbgPrepareDebugMenu() 3383 { 3384 /* The "Logging" item. */ 3385 bool fEnabled = false; 3386 bool fChecked = false; 3387 CConsole cconsole = csession.GetConsole(); 3388 if (cconsole.isOk()) 3389 { 3390 CMachineDebugger cdebugger = cconsole.GetDebugger(); 3391 if (cconsole.isOk()) 3392 { 3393 fEnabled = true; 3394 fChecked = cdebugger.GetLogEnabled() != FALSE; 3395 } 3396 } 3397 if (fEnabled != dbgLoggingAction->isEnabled()) 3398 dbgLoggingAction->setEnabled (fEnabled); 3399 if (fChecked != dbgLoggingAction->isOn()) 3400 dbgLoggingAction->setOn (fChecked); 3401 } 3402 3403 /** 3365 3404 * Called when the Debug->Statistics... menu item is selected. 3366 3405 */ … … 3382 3421 DBGGuiShowCommandLine (dbg_gui); 3383 3422 #endif 3423 } 3424 3425 /** 3426 * Called when the Debug->Logging menu item is selected. 3427 */ 3428 void VBoxConsoleWnd::dbgLoggingToggled (bool aState) 3429 { 3430 CConsole cconsole = csession.GetConsole(); 3431 if (cconsole.isOk()) 3432 { 3433 CMachineDebugger cdebugger = cconsole.GetDebugger(); 3434 if (cconsole.isOk()) 3435 cdebugger.SetLogEnabled(aState); 3436 } 3437 3384 3438 } 3385 3439
Note:
See TracChangeset
for help on using the changeset viewer.