Changeset 2972 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 1, 2007 9:55:15 AM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r2864 r2972 38 38 ui/VBoxSnapshotsWgt.ui \ 39 39 ui/VBoxAboutDlg.ui \ 40 ui/VBoxVMFirstRunWzd.ui 40 ui/VBoxVMFirstRunWzd.ui \ 41 ui/VBoxVMLogViewer.ui 41 42 42 43 IMAGES = images/tpixel.png \ -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h
r1757 r2972 39 39 class VBoxVMDetailsView; 40 40 class VBoxVMDescriptionPage; 41 class VBoxVMLogViewer; 41 42 42 43 class QLabel; … … 71 72 void vmDiscard(); 72 73 void vmRefresh(); 74 void vmShowLogs (bool); 73 75 74 76 void refreshVMList(); … … 119 121 QAction *vmDiscardAction; 120 122 QAction *vmRefreshAction; 123 QAction *vmShowLogsAction; 121 124 QAction *helpContentsAction; 122 125 QAction *helpWebAction; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r2354 r2972 32 32 #include "VBoxVMSettingsDlg.h" 33 33 #include "VBoxGlobalSettingsDlg.h" 34 #include "VBoxVMLogViewer.h" 34 35 35 36 #include <qlabel.h> … … 416 417 vmRefreshAction->setIconSet (VBoxGlobal::iconSet ( 417 418 "refresh_16px.png", "refresh_disabled_16px.png")); 419 vmShowLogsAction = new QAction (this, "vmShowLogsAction"); 420 vmShowLogsAction->setIconSet (VBoxGlobal::iconSet ( 421 "new_16px.png", "new_16px.png")); 422 vmShowLogsAction->setToggleAction (true); 418 423 419 424 helpContentsAction = new QAction (this, "helpContentsAction"); … … 509 514 vmMenu->insertSeparator(); 510 515 vmRefreshAction->addTo (vmMenu); 516 vmMenu->insertSeparator(); 517 vmShowLogsAction->addTo (vmMenu); 511 518 512 519 menuBar()->insertItem (QString::null, vmMenu, 2); … … 569 576 connect (vmDiscardAction, SIGNAL (activated()), this, SLOT (vmDiscard())); 570 577 connect (vmRefreshAction, SIGNAL (activated()), this, SLOT (vmRefresh())); 578 connect (vmShowLogsAction, SIGNAL (toggled (bool)), this, SLOT (vmShowLogs (bool))); 571 579 572 580 connect (helpContentsAction, SIGNAL (activated()), this, SLOT(showHelpContents())); … … 919 927 } 920 928 929 void VBoxSelectorWnd::vmShowLogs (bool aOn) 930 { 931 if (aOn) 932 { 933 VBoxVMLogViewer *logViewer = new VBoxVMLogViewer (this, 934 "logViewer", WType_TopLevel | WDestructiveClose); 935 VBoxVMListBoxItem *item = (VBoxVMListBoxItem *) vmListBox->selectedItem(); 936 CMachine machine = item->machine(); 937 logViewer->setup (machine, vmShowLogsAction); 938 logViewer->show(); 939 } 940 } 941 921 942 void VBoxSelectorWnd::refreshVMList() 922 943 { … … 1022 1043 1023 1044 #ifdef Q_WS_MAC 1024 /* 1045 /* 1025 1046 * Macification: Getting the right menu as application preference menu item. 1026 1047 * 1027 1048 * QMenuBar::isCommand() in qmenubar_mac.cpp doesn't recognize "Setting"(s) 1028 1049 * unless it's in the first position. So, we use the Mac term here to make 1029 * sure we get picked instead of the VM settings. 1050 * sure we get picked instead of the VM settings. 1030 1051 * 1031 1052 * Now, since both QMenuBar and we translate these strings, it's going to … … 1040 1061 */ 1041 1062 fileSettingsAction->setMenuText (tr ("&Preferences...", "global settings")); 1042 #endif 1063 #endif 1043 1064 fileSettingsAction->setAccel (tr ("Ctrl+G")); 1044 1065 fileSettingsAction->setStatusTip (tr ("Display the global settings dialog")); … … 1076 1097 vmRefreshAction->setStatusTip ( 1077 1098 tr ("Refresh the accessibility state of the selected virtual machine")); 1099 1100 vmShowLogsAction->setMenuText (tr ("Show &Log...")); 1101 vmShowLogsAction->setText (tr ("Show Log...")); 1102 vmShowLogsAction->setAccel (tr ("Ctrl+L")); 1103 vmShowLogsAction->setStatusTip ( 1104 tr ("Show the log of the selected virtual machine")); 1078 1105 1079 1106 helpContentsAction->setMenuText (tr ("&Contents..."));
Note:
See TracChangeset
for help on using the changeset viewer.