VirtualBox

Changeset 3016 in vbox


Ignore:
Timestamp:
Jun 4, 2007 10:07:06 AM (18 years ago)
Author:
vboxsync
Message:

1952: Easy way to store the RELEASE log using the GUI:

Separate Log Viewer for each of the virtual machine implemented.

Location:
trunk/src/VBox/Frontends/VirtualBox/ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMLogViewer.ui

    r2996 r3016  
    162162</forwards>
    163163<variables>
    164     <variable access="private">static VBoxVMLogViewer *mSelf;</variable>
     164    <variable access="private">typedef QMap &lt;QString, VBoxVMLogViewer*&gt; LogViewersMap;</variable>
     165    <variable access="private">static LogViewersMap mSelfArray;</variable>
    165166    <variable access="private">bool mFirstRun;</variable>
    166167    <variable access="private">bool mIsPolished;</variable>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMLogViewer.ui.h

    r2999 r3016  
    3131
    3232
    33 VBoxVMLogViewer *VBoxVMLogViewer::mSelf = 0;
     33VBoxVMLogViewer::LogViewersMap VBoxVMLogViewer::mSelfArray = LogViewersMap();
     34
    3435void VBoxVMLogViewer::createLogViewer (CMachine &aMachine)
    3536{
    36     if (!mSelf)
     37    if (mSelfArray.find (aMachine.GetName()) == mSelfArray.end())
    3738    {
    3839        /* creating new log viewer if there is no one existing */
    39         mSelf = new VBoxVMLogViewer (0, "VBoxVMLogViewer",
    40                                      WType_TopLevel | WDestructiveClose);
    41     }
    42 
    43     if (mSelf->machine() != aMachine)
    44     {
    45         /* re-read new machine data if the machine was changed or
    46          * the log-viewer is opened for the first time */
    47         mSelf->setup (aMachine);
    48     }
    49 
    50     mSelf->show();
    51     mSelf->setWindowState (mSelf->windowState() & ~WindowMinimized);
    52     mSelf->setActiveWindow();
     40        mSelfArray [aMachine.GetName()] = new VBoxVMLogViewer (0,
     41            "VBoxVMLogViewer", WType_TopLevel | WDestructiveClose);
     42        /* read new machine data for this log viewer */
     43        mSelfArray [aMachine.GetName()]->setup (aMachine);
     44    }
     45
     46    VBoxVMLogViewer *viewer = mSelfArray [aMachine.GetName()];
     47    viewer->show();
     48    viewer->setWindowState (viewer->windowState() & ~WindowMinimized);
     49    viewer->setActiveWindow();
    5350}
    5451
     
    8986void VBoxVMLogViewer::destroy()
    9087{
    91     mSelf = 0;
     88    mSelfArray.erase (mMachine.GetName());
    9289}
    9390
Note: See TracChangeset for help on using the changeset viewer.

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