VirtualBox

Changeset 12436 in vbox


Ignore:
Timestamp:
Sep 12, 2008 4:18:35 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
36509
Message:

VirtualBox4: Prepare the logging menu entry (dbg gui).

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h

    r12424 r12436  
    191191    void processGlobalSettingChange (const char *publicName, const char *name);
    192192
     193    void dbgPrepareDebugMenu();
    193194    void dbgShowStatistics();
    194195    void dbgShowCommandLine();
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r12435 r12436  
    568568
    569569#ifdef VBOX_WITH_DEBUGGER_GUI
     570    if (mDbgMenu)
     571        connect (mDbgMenu, SIGNAL (aboutToShow()), this, SLOT (dbgPrepareDebugMenu()));
    570572    if (dbgStatisticsAction)
    571         connect (dbgStatisticsAction, SIGNAL (triggered()),
    572                  this, SLOT (dbgShowStatistics()));
     573        connect (dbgStatisticsAction, SIGNAL (triggered()), this, SLOT (dbgShowStatistics()));
    573574    if (dbgCommandLineAction)
    574         connect (dbgCommandLineAction, SIGNAL (triggered()),
    575                  this, SLOT (dbgShowCommandLine()));
     575        connect (dbgCommandLineAction, SIGNAL (triggered()), this, SLOT (dbgShowCommandLine()));
    576576    if (dbgLoggingAction)
    577         connect (dbgLoggingAction, SIGNAL (toggled (bool)),
    578                  this, SLOT (dbgLoggingToggled (bool)));
     577        connect (dbgLoggingAction, SIGNAL (toggled (bool)), this, SLOT (dbgLoggingToggled (bool)));
    579578#endif
    580579
     
    34043403
    34053404/**
     3405 * Prepare the Debug menu.
     3406 */
     3407void VBoxConsoleWnd::dbgPrepareDebugMenu()
     3408{
     3409#ifdef VBOX_WITH_DEBUGGER_GUI
     3410    /* The "Logging" item. */
     3411    bool fEnabled = false;
     3412    bool fChecked = false;
     3413    CConsole cconsole = csession.GetConsole();
     3414    if (cconsole.isOk())
     3415    {
     3416        CMachineDebugger cdebugger = cconsole.GetDebugger();
     3417        if (cconsole.isOk())
     3418        {
     3419            fEnabled = true;
     3420            fChecked = cdebugger.GetLogEnabled() != FALSE;
     3421        }
     3422    }
     3423    if (fEnabled != dbgLoggingAction->isEnabled())
     3424        dbgLoggingAction->setEnabled (fEnabled);
     3425    if (fChecked != dbgLoggingAction->isChecked())
     3426        dbgLoggingAction->setChecked (fChecked);
     3427#endif /* VBOX_WITH_DEBUGGER_GUI */
     3428}
     3429
     3430/**
    34063431 * Called when the Debug->Statistics... menu item is selected.
    34073432 */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette