VirtualBox

Changeset 2972 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jun 1, 2007 9:55:15 AM (18 years ago)
Author:
vboxsync
Message:

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

Base LogViewer version implemented.

  1. LogViewer Dialog could be invoked from the Main VM Selector's dropped down menu – by activating the “Show Log...” menu item (or by pressing Ctrl-L shortcut).
  2. This dialog loads all the release logs situated in the current VM's logs folder and shows them in tabbed text browsers.
  3. User can copy-paste a part or all the log by using of text-browser's context menu.
  4. User can save the whole log in preferred location by pressing the “Save” button in the LogViewer Dialog's bottom.
  5. User can update the loaded logs to the latest log-file content by pressing the “Refresh” button in the LogViewer Dialog's bottom.

TODO:

  1. Log incremental searching mechanism.
  2. Real-time log contents update.
Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro

    r2864 r2972  
    3838        ui/VBoxSnapshotsWgt.ui \
    3939        ui/VBoxAboutDlg.ui \
    40         ui/VBoxVMFirstRunWzd.ui
     40        ui/VBoxVMFirstRunWzd.ui \
     41        ui/VBoxVMLogViewer.ui
    4142
    4243IMAGES  = images/tpixel.png \
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h

    r1757 r2972  
    3939class VBoxVMDetailsView;
    4040class VBoxVMDescriptionPage;
     41class VBoxVMLogViewer;
    4142
    4243class QLabel;
     
    7172    void vmDiscard();
    7273    void vmRefresh();
     74    void vmShowLogs (bool);
    7375
    7476    void refreshVMList();
     
    119121    QAction *vmDiscardAction;
    120122    QAction *vmRefreshAction;
     123    QAction *vmShowLogsAction;
    121124    QAction *helpContentsAction;
    122125    QAction *helpWebAction;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r2354 r2972  
    3232#include "VBoxVMSettingsDlg.h"
    3333#include "VBoxGlobalSettingsDlg.h"
     34#include "VBoxVMLogViewer.h"
    3435
    3536#include <qlabel.h>
     
    416417    vmRefreshAction->setIconSet (VBoxGlobal::iconSet (
    417418        "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);
    418423
    419424    helpContentsAction = new QAction (this, "helpContentsAction");
     
    509514    vmMenu->insertSeparator();
    510515    vmRefreshAction->addTo (vmMenu);
     516    vmMenu->insertSeparator();
     517    vmShowLogsAction->addTo (vmMenu);
    511518
    512519    menuBar()->insertItem (QString::null, vmMenu, 2);
     
    569576    connect (vmDiscardAction, SIGNAL (activated()), this, SLOT (vmDiscard()));
    570577    connect (vmRefreshAction, SIGNAL (activated()), this, SLOT (vmRefresh()));
     578    connect (vmShowLogsAction, SIGNAL (toggled (bool)), this, SLOT (vmShowLogs (bool)));
    571579
    572580    connect (helpContentsAction, SIGNAL (activated()), this, SLOT(showHelpContents()));
     
    919927}
    920928
     929void 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
    921942void VBoxSelectorWnd::refreshVMList()
    922943{
     
    10221043
    10231044#ifdef Q_WS_MAC
    1024     /* 
     1045    /*
    10251046     * Macification: Getting the right menu as application preference menu item.
    10261047     *
    10271048     * QMenuBar::isCommand() in qmenubar_mac.cpp doesn't recognize "Setting"(s)
    10281049     * 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.
    10301051     *
    10311052     * Now, since both QMenuBar and we translate these strings, it's going to
     
    10401061     */
    10411062    fileSettingsAction->setMenuText (tr ("&Preferences...", "global settings"));
    1042 #endif 
     1063#endif
    10431064    fileSettingsAction->setAccel (tr ("Ctrl+G"));
    10441065    fileSettingsAction->setStatusTip (tr ("Display the global settings dialog"));
     
    10761097    vmRefreshAction->setStatusTip (
    10771098        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"));
    10781105
    10791106    helpContentsAction->setMenuText (tr ("&Contents..."));
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