Changeset 3016 in vbox
- Timestamp:
- Jun 4, 2007 10:07:06 AM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/ui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMLogViewer.ui
r2996 r3016 162 162 </forwards> 163 163 <variables> 164 <variable access="private">static VBoxVMLogViewer *mSelf;</variable> 164 <variable access="private">typedef QMap <QString, VBoxVMLogViewer*> LogViewersMap;</variable> 165 <variable access="private">static LogViewersMap mSelfArray;</variable> 165 166 <variable access="private">bool mFirstRun;</variable> 166 167 <variable access="private">bool mIsPolished;</variable> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMLogViewer.ui.h
r2999 r3016 31 31 32 32 33 VBoxVMLogViewer *VBoxVMLogViewer::mSelf = 0; 33 VBoxVMLogViewer::LogViewersMap VBoxVMLogViewer::mSelfArray = LogViewersMap(); 34 34 35 void VBoxVMLogViewer::createLogViewer (CMachine &aMachine) 35 36 { 36 if ( !mSelf)37 if (mSelfArray.find (aMachine.GetName()) == mSelfArray.end()) 37 38 { 38 39 /* 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(); 53 50 } 54 51 … … 89 86 void VBoxVMLogViewer::destroy() 90 87 { 91 mSelf = 0;88 mSelfArray.erase (mMachine.GetName()); 92 89 } 93 90
Note:
See TracChangeset
for help on using the changeset viewer.