Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp	(revision 73692)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp	(revision 73693)
@@ -1,9 +1,9 @@
 /* $Id$ */
 /** @file
- * VBox Qt GUI - UIVMLogViewer class implementation.
+ * VBox Qt GUI - UIVMLogViewerDialog class implementation.
  */
 
 /*
- * Copyright (C) 2010-2017 Oracle Corporation
+ * Copyright (C) 2010-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -27,7 +27,7 @@
 # include <QKeyEvent>
 # include <QLabel>
-# include <QScrollBar>
 # include <QPlainTextEdit>
 # include <QPushButton>
+# include <QScrollBar>
 # include <QVBoxLayout>
 
@@ -41,10 +41,15 @@
 # ifdef VBOX_WS_MAC
 #  include "VBoxUtils-darwin.h"
-# endif /* VBOX_WS_MAC */
+# endif
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
-UIVMLogViewerDialogFactory::UIVMLogViewerDialogFactory(const CMachine &machine)
-    :m_comMachine(machine)
+
+/*********************************************************************************************************************************
+*   Class UIVMLogViewerDialogFactory implementation.                                                                             *
+*********************************************************************************************************************************/
+
+UIVMLogViewerDialogFactory::UIVMLogViewerDialogFactory(const CMachine &comMachine /* = CMachine() */)
+    : m_comMachine(comMachine)
 {
 }
@@ -55,7 +60,12 @@
 }
 
-UIVMLogViewerDialog::UIVMLogViewerDialog(QWidget *pCenterWidget, const CMachine &machine)
+
+/*********************************************************************************************************************************
+*   Class UIVMLogViewerDialog implementation.                                                                                    *
+*********************************************************************************************************************************/
+
+UIVMLogViewerDialog::UIVMLogViewerDialog(QWidget *pCenterWidget, const CMachine &comMachine)
     : QIWithRetranslateUI<QIManagerDialog>(pCenterWidget)
-    , m_comMachine(machine)
+    , m_comMachine(comMachine)
 {
 }
@@ -63,10 +73,18 @@
 void UIVMLogViewerDialog::retranslateUi()
 {
-    button(ButtonType_Close)->setText(UIVMLogViewerWidget::tr("Close"));
-    /* Setup a dialog caption: */
+    /* Translate window title: */
     if (!m_comMachine.isNull())
         setWindowTitle(tr("%1 - Log Viewer").arg(m_comMachine.GetName()));
     else
         setWindowTitle(UIVMLogViewerWidget::tr("Log Viewer"));
+
+    /* Translate buttons: */
+    button(ButtonType_Close)->setText(UIVMLogViewerWidget::tr("Close"));
+}
+
+void UIVMLogViewerDialog::configure()
+{
+    /* Apply window icons: */
+    setWindowIcon(UIIconPool::iconSetFull(":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png"));
 }
 
@@ -74,5 +92,5 @@
 {
     /* Create widget: */
-    UIVMLogViewerWidget *pWidget = new UIVMLogViewerWidget(EmbedTo_Dialog, this, m_comMachine);
+    UIVMLogViewerWidget *pWidget = new UIVMLogViewerWidget(EmbedTo_Dialog, m_comMachine, this);
     if (pWidget)
     {
@@ -83,20 +101,18 @@
         setWidgetToolbar(pWidget->toolbar());
 #endif
+        connect(pWidget, &UIVMLogViewerWidget::sigSetCloseButtonShortCut,
+                this, &UIVMLogViewerDialog::sltSetCloseButtonShortCut);
+
         /* Add into layout: */
         centralWidget()->layout()->addWidget(pWidget);
-        connect(pWidget, &UIVMLogViewerWidget::sigSetCloseButtonShortCut,
-                this, &UIVMLogViewerDialog::sltSetCloseButtonShortCut);
     }
-}
-
-void UIVMLogViewerDialog::configure()
-{
-    /* Apply window icons: */
-    setWindowIcon(UIIconPool::iconSetFull(":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png"));
 }
 
 void UIVMLogViewerDialog::finalize()
 {
+    /* Apply language settings: */
     retranslateUi();
+
+    // WTF? Why here?
     button(ButtonType_Close)->setShortcut(Qt::Key_Escape);
 }
@@ -104,18 +120,18 @@
 void UIVMLogViewerDialog::loadSettings()
 {
-    const UIVMLogViewerWidget *pWidget = qobject_cast<const UIVMLogViewerWidget *>(widget());
+    /* Acquire widget: */
+    const UIVMLogViewerWidget *pWidget = qobject_cast<const UIVMLogViewerWidget*>(widget());
 
     /* Restore window geometry: */
-    /* Getting available geometry to calculate default geometry: */
     const QRect desktopRect = gpDesktop->availableGeometry(this);
     int iDefaultWidth = desktopRect.width() / 2;
     int iDefaultHeight = desktopRect.height() * 3 / 4;
 
-    /* Try obtain the default width of the current logviewer */
+    /* Try obtain the default width of the current logviewer: */
     if (pWidget)
     {
-        int width =  pWidget->defaultLogPageWidth();
-        if (width != 0)
-            iDefaultWidth = width;
+        int iWidth =  pWidget->defaultLogPageWidth();
+        if (iWidth != 0)
+            iDefaultWidth = iWidth;
     }
 
@@ -153,7 +169,7 @@
 }
 
-void UIVMLogViewerDialog::sltSetCloseButtonShortCut(QKeySequence shortCut)
+void UIVMLogViewerDialog::sltSetCloseButtonShortCut(QKeySequence shortcut)
 {
     if (button(ButtonType_Close))
-        button(ButtonType_Close)->setShortcut(shortCut);
+        button(ButtonType_Close)->setShortcut(shortcut);
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h	(revision 73692)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h	(revision 73693)
@@ -1,9 +1,9 @@
 /* $Id$ */
 /** @file
- * VBox Qt GUI - UIVMLogViewer class declaration.
+ * VBox Qt GUI - UIVMLogViewerDialog class declaration.
  */
 
 /*
- * Copyright (C) 2010-2017 Oracle Corporation
+ * Copyright (C) 2010-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -39,19 +39,25 @@
 
 
-/** QIManagerDialogFactory  used as a factory for Virtual Media Manager dialog. */
+/** QIManagerDialogFactory extension used as a factory for Log Viewer dialog. */
 class SHARED_LIBRARY_STUFF UIVMLogViewerDialogFactory : public QIManagerDialogFactory
 {
 public:
-    UIVMLogViewerDialogFactory(const CMachine &machine);
+
+    /** Constructs Log Viewer factory acquiring additional arguments.
+      * @param  comMachine  Brings the machine for which VM Log-Viewer is requested. */
+    UIVMLogViewerDialogFactory(const CMachine &comMachine = CMachine());
 
 protected:
+
     /** Creates derived @a pDialog instance.
       * @param  pCenterWidget  Brings the widget to center wrt. pCenterWidget. */
     virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) /* override */;
-    CMachine m_comMachine;
+
+    /** Holds the machine reference. */
+    CMachine      m_comMachine;
 };
 
 
-/** A QIDialog to display machine logs. */
+/** QIManagerDialog extension providing GUI with the dialog displaying machine logs. */
 class SHARED_LIBRARY_STUFF UIVMLogViewerDialog : public QIWithRetranslateUI<QIManagerDialog>
 {
@@ -60,27 +66,47 @@
 public:
 
-    UIVMLogViewerDialog(QWidget *pCenterWidget, const CMachine &machine);
+    /** Constructs Log Viewer dialog.
+      * @param  pCenterWidget  Brings the widget reference to center according to.
+      * @param  comMachine     Brings the machine reference. */
+    UIVMLogViewerDialog(QWidget *pCenterWidget, const CMachine &comMachine);
 
 protected:
 
+    /** @name Event-handling stuff.
+      * @{ */
+        /** Handles translation event. */
+        virtual void retranslateUi() /* override */;
+    /** @} */
+
     /** @name Prepare/cleanup cascade.
      * @{ */
+        /** Configures all. */
         virtual void configure() /* override */;
+        /** Configures central-widget. */
         virtual void configureCentralWidget() /* override */;
+        /** Perform final preparations. */
         virtual void finalize() /* override */;
+        /** Loads dialog setting such as geometry from extradata. */
+        virtual void loadSettings() /* override */;
+
+        /** Saves dialog setting into extradata. */
         virtual void saveSettings() const /* override */;
-        virtual void loadSettings() /* override */;
     /** @} */
-    /* Reads the related extradata to determine if the dialog should be maximized. */
-    virtual bool shouldBeMaximized() const /* override */;
+
+    /** @name Functions related to geometry restoration.
+     * @{ */
+        /** Returns whether the window should be maximized when geometry being restored. */
+        virtual bool shouldBeMaximized() const /* override */;
+    /** @} */
 
 private slots:
 
-    void sltSetCloseButtonShortCut(QKeySequence shortCut);
+    /** Must be handles soemthing related to close @a shortcut. */
+    void sltSetCloseButtonShortCut(QKeySequence shortcut);
 
 private:
 
-    void retranslateUi();
-    CMachine m_comMachine;
+    /** Holds the machine reference. */
+    CMachine  m_comMachine;
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 73692)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 73693)
@@ -1,9 +1,9 @@
 /* $Id$ */
 /** @file
- * VBox Qt GUI - UIVMLogViewer class implementation.
+ * VBox Qt GUI - UIVMLogViewerWidget class implementation.
  */
 
 /*
- * Copyright (C) 2010-2017 Oracle Corporation
+ * Copyright (C) 2010-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -57,8 +57,11 @@
 
 
-UIVMLogViewerWidget::UIVMLogViewerWidget(EmbedTo enmEmbedding, QWidget *pParent /* = 0 */, const CMachine &machine /* = CMachine() */)
+UIVMLogViewerWidget::UIVMLogViewerWidget(EmbedTo enmEmbedding,
+                                         const CMachine &comMachine /* = CMachine() */,
+                                         QWidget *pParent /* = 0 */)
     : QIWithRetranslateUI<QWidget>(pParent)
+    , m_enmEmbedding(enmEmbedding)
+    , m_comMachine(comMachine)
     , m_fIsPolished(false)
-    , m_comMachine(machine)
     , m_pTabWidget(0)
     , m_pSearchPanel(0)
@@ -67,5 +70,4 @@
     , m_pSettingsPanel(0)
     , m_pMainLayout(0)
-    , m_enmEmbedding(enmEmbedding)
     , m_pToolBar(0)
     , m_pActionFind(0)
@@ -86,21 +88,6 @@
 UIVMLogViewerWidget::~UIVMLogViewerWidget()
 {
-    saveSettings();
     /* Cleanup VM Log-Viewer: */
     cleanup();
-}
-
-void UIVMLogViewerWidget::loadSettings()
-{
-    m_bWrapLines = gEDataManager->logViewerWrapLines();
-    m_bShowLineNumbers = gEDataManager->logViewerShowLineNumbers();
-    QFont loadedFont = gEDataManager->logViewerFont();
-    if (loadedFont != QFont())
-        m_font = loadedFont;
-}
-
-void UIVMLogViewerWidget::saveSettings()
-{
-    gEDataManager->setLogViweverSettings(m_font, m_bWrapLines, m_bShowLineNumbers);
 }
 
@@ -125,63 +112,23 @@
 }
 
+void UIVMLogViewerWidget::setMachine(const CMachine &comMachine)
+{
+    if (comMachine == m_comMachine)
+        return;
+    m_comMachine = comMachine;
+    sltRefresh();
+}
+
+QFont UIVMLogViewerWidget::currentFont() const
+{
+    const UIVMLogPage* logPage = currentLogPage();
+    if (!logPage)
+        return QFont();
+    return logPage->currentFont();
+}
+
 bool UIVMLogViewerWidget::shouldBeMaximized() const
 {
     return gEDataManager->logWindowShouldBeMaximized();
-}
-
-void UIVMLogViewerWidget::sltDeleteBookmark(int index)
-{
-    UIVMLogPage* logPage = currentLogPage();
-    if (!logPage)
-        return;
-    logPage->deleteBookmark(index);
-    if (m_pBookmarksPanel)
-        m_pBookmarksPanel->updateBookmarkList(logPage->bookmarkVector());
-}
-
-void UIVMLogViewerWidget::sltDeleteAllBookmarks()
-{
-    UIVMLogPage* logPage = currentLogPage();
-    if (!logPage)
-        return;
-    logPage->deleteAllBookmarks();
-
-    if (m_pBookmarksPanel)
-        m_pBookmarksPanel->updateBookmarkList(logPage->bookmarkVector());
-}
-
-void UIVMLogViewerWidget::sltUpdateBookmarkPanel()
-{
-    if (!currentLogPage() || !m_pBookmarksPanel)
-        return;
-    m_pBookmarksPanel->updateBookmarkList(currentLogPage()->bookmarkVector());
-}
-
-void UIVMLogViewerWidget::gotoBookmark(int bookmarkIndex)
-{
-    if (!currentLogPage())
-        return;
-    currentLogPage()->scrollToBookmark(bookmarkIndex);
-}
-
-void UIVMLogViewerWidget::sltPanelActionTriggered(bool checked)
-{
-    QAction *pSenderAction = qobject_cast<QAction*>(sender());
-    if (!pSenderAction)
-        return;
-    UIVMLogViewerPanel* pPanel = 0;
-    /* Look for the sender() within the m_panelActionMap's values: */
-    for (QMap<UIVMLogViewerPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin();
-        iterator != m_panelActionMap.end(); ++iterator)
-    {
-        if (iterator.value() == pSenderAction)
-            pPanel = iterator.key();
-    }
-    if (!pPanel)
-        return;
-    if (checked)
-        showPanel(pPanel);
-    else
-        hidePanel(pPanel);
 }
 
@@ -238,4 +185,5 @@
     m_pTabWidget->setCurrentIndex(tabIndex);
     sltTabIndexChange(tabIndex);
+
     /* Enable/Disable toolbar actions (except Refresh) & tab widget according log presence: */
     if (m_pActionFind)
@@ -247,7 +195,7 @@
     if (m_pActionBookmarks)
         m_pActionBookmarks->setEnabled(!noLogsToShow);
-
     if (m_pActionSettings)
         m_pActionSettings->setEnabled(!noLogsToShow);
+
     m_pTabWidget->show();
     if (m_pSearchPanel && m_pSearchPanel->isVisible())
@@ -304,4 +252,60 @@
 }
 
+void UIVMLogViewerWidget::sltDeleteBookmark(int index)
+{
+    UIVMLogPage* logPage = currentLogPage();
+    if (!logPage)
+        return;
+    logPage->deleteBookmark(index);
+    if (m_pBookmarksPanel)
+        m_pBookmarksPanel->updateBookmarkList(logPage->bookmarkVector());
+}
+
+void UIVMLogViewerWidget::sltDeleteAllBookmarks()
+{
+    UIVMLogPage* logPage = currentLogPage();
+    if (!logPage)
+        return;
+    logPage->deleteAllBookmarks();
+
+    if (m_pBookmarksPanel)
+        m_pBookmarksPanel->updateBookmarkList(logPage->bookmarkVector());
+}
+
+void UIVMLogViewerWidget::sltUpdateBookmarkPanel()
+{
+    if (!currentLogPage() || !m_pBookmarksPanel)
+        return;
+    m_pBookmarksPanel->updateBookmarkList(currentLogPage()->bookmarkVector());
+}
+
+void UIVMLogViewerWidget::gotoBookmark(int bookmarkIndex)
+{
+    if (!currentLogPage())
+        return;
+    currentLogPage()->scrollToBookmark(bookmarkIndex);
+}
+
+void UIVMLogViewerWidget::sltPanelActionToggled(bool fChecked)
+{
+    QAction *pSenderAction = qobject_cast<QAction*>(sender());
+    if (!pSenderAction)
+        return;
+    UIVMLogViewerPanel* pPanel = 0;
+    /* Look for the sender() within the m_panelActionMap's values: */
+    for (QMap<UIVMLogViewerPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin();
+        iterator != m_panelActionMap.end(); ++iterator)
+    {
+        if (iterator.value() == pSenderAction)
+            pPanel = iterator.key();
+    }
+    if (!pPanel)
+        return;
+    if (fChecked)
+        showPanel(pPanel);
+    else
+        hidePanel(pPanel);
+}
+
 void UIVMLogViewerWidget::sltSearchResultHighLigting()
 {
@@ -399,4 +403,5 @@
     }
 }
+
 void UIVMLogViewerWidget::sltResetSettingsToDefault()
 {
@@ -413,23 +418,16 @@
 }
 
-void UIVMLogViewerWidget::setMachine(const CMachine &machine)
-{
-    if (machine == m_comMachine)
-        return;
-    m_comMachine = machine;
-    sltRefresh();
-}
-
 void UIVMLogViewerWidget::prepare()
 {
-    loadSettings();
+    /* Create main layout: */
     m_pMainLayout = new QVBoxLayout(this);
 
+    /* Prepare stuff: */
     prepareActions();
     prepareToolBar();
-
     prepareMenu();
     prepareWidgets();
-
+    /* Load settings: */
+    loadSettings();
 
     /* Reading log files: */
@@ -439,84 +437,5 @@
     retranslateUi();
 
-    m_panelActionMap.insert(m_pBookmarksPanel, m_pActionBookmarks);
-    m_panelActionMap.insert(m_pSearchPanel, m_pActionFind);
-    m_panelActionMap.insert(m_pFilterPanel, m_pActionFilter);
-    m_panelActionMap.insert(m_pSettingsPanel, m_pActionSettings);
     manageEscapeShortCut();
-}
-
-void UIVMLogViewerWidget::prepareWidgets()
-{
-    /* Configure layout: */
-    layout()->setContentsMargins(0, 0, 0, 0);
-#ifdef VBOX_WS_MAC
-    layout()->setSpacing(10);
-#else
-    layout()->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2);
-#endif
-
-    /* Create VM Log-Viewer container: */
-    m_pTabWidget = new QITabWidget;
-    if (m_pTabWidget)
-    {
-        /* Add VM Log-Viewer container to main-layout: */
-        m_pMainLayout->addWidget(m_pTabWidget);
-    }
-
-    /* Create VM Log-Viewer search-panel: */
-    m_pSearchPanel = new UIVMLogViewerSearchPanel(0, this);
-    if (m_pSearchPanel)
-    {
-        /* Configure VM Log-Viewer search-panel: */
-        installEventFilter(m_pSearchPanel);
-        m_pSearchPanel->hide();
-        /* Add VM Log-Viewer search-panel to main-layout: */
-        m_pMainLayout->addWidget(m_pSearchPanel);
-        connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHighlightingUpdated,
-                this, &UIVMLogViewerWidget::sltSearchResultHighLigting);
-    }
-
-    /* Create VM Log-Viewer filter-panel: */
-    m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this);
-    if (m_pFilterPanel)
-    {
-        /* Configure VM Log-Viewer filter-panel: */
-        installEventFilter(m_pFilterPanel);
-        m_pFilterPanel->hide();
-        /* Add VM Log-Viewer filter-panel to main-layout: */
-        m_pMainLayout->addWidget(m_pFilterPanel);
-        connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied,
-                this, &UIVMLogViewerWidget::sltFilterApplied);
-    }
-
-    m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel(0, this);
-    if (m_pBookmarksPanel)
-    {
-        m_pBookmarksPanel->hide();
-        m_pMainLayout->addWidget(m_pBookmarksPanel);
-        connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteBookmark,
-                this, &UIVMLogViewerWidget::sltDeleteBookmark);
-        connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteAllBookmarks,
-                this, &UIVMLogViewerWidget::sltDeleteAllBookmarks);
-        connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigBookmarkSelected,
-                this, &UIVMLogViewerWidget::gotoBookmark);
-    }
-
-    m_pSettingsPanel = new UIVMLogViewerSettingsPanel(0, this);
-    if (m_pSettingsPanel)
-    {
-        m_pSettingsPanel->hide();
-        /* Initialize settings' panel checkboxes and input fields: */
-        m_pSettingsPanel->setShowLineNumbers(m_bShowLineNumbers);
-        m_pSettingsPanel->setWrapLines(m_bWrapLines);
-        m_pSettingsPanel->setFontSizeInPoints(m_font.pointSize());
-
-        m_pMainLayout->addWidget(m_pSettingsPanel);
-        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigShowLineNumbers, this, &UIVMLogViewerWidget::sltShowLineNumbers);
-        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines);
-        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigChangeFontSizeInPoints, this, &UIVMLogViewerWidget::sltFontSizeChanged);
-        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigChangeFont, this, &UIVMLogViewerWidget::sltChangeFont);
-        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigResetToDefaults, this, &UIVMLogViewerWidget::sltResetSettingsToDefault);
-    }
 }
 
@@ -529,5 +448,5 @@
         m_pActionFind->setShortcut(QKeySequence("Ctrl+F"));
         m_pActionFind->setCheckable(true);
-        connect(m_pActionFind, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionTriggered);
+        connect(m_pActionFind, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionToggled);
     }
 
@@ -538,5 +457,5 @@
         m_pActionFilter->setShortcut(QKeySequence("Ctrl+T"));
         m_pActionFilter->setCheckable(true);
-        connect(m_pActionFilter, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionTriggered);
+        connect(m_pActionFilter, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionToggled);
     }
     /* Create and configure 'Bookmark' action: */
@@ -549,5 +468,5 @@
             m_pActionBookmarks->setShortcut(QKeySequence("Ctrl+D"));
         m_pActionBookmarks->setCheckable(true);
-        connect(m_pActionBookmarks, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionTriggered);
+        connect(m_pActionBookmarks, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionToggled);
     }
 
@@ -558,5 +477,5 @@
         m_pActionSettings->setShortcut(QKeySequence("Ctrl+P"));
         m_pActionSettings->setCheckable(true);
-        connect(m_pActionSettings, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionTriggered);
+        connect(m_pActionSettings, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionToggled);
     }
 
@@ -586,24 +505,22 @@
 void UIVMLogViewerWidget::prepareActionIcons()
 {
-    QString strPrefix = "log_viewer";
-
     if (m_pActionFind)
-        m_pActionFind->setIcon(UIIconPool::iconSet(QString(":/%1_find_22px.png").arg(strPrefix),
-                                                       QString(":/%1_find_disabled_22px.png").arg(strPrefix)));
+        m_pActionFind->setIcon(UIIconPool::iconSet(QString(":/log_viewer_find_22px.png"),
+                                                   QString(":/log_viewer_find_disabled_22px.png")));
     if (m_pActionFilter)
-        m_pActionFilter->setIcon(UIIconPool::iconSet(QString(":/%1_filter_22px.png").arg(strPrefix),
-                                                         QString(":/%1_filter_disabled_22px.png").arg(strPrefix)));
+        m_pActionFilter->setIcon(UIIconPool::iconSet(QString(":/log_viewer_filter_22px.png"),
+                                                     QString(":/log_viewer_filter_disabled_22px.png")));
     if (m_pActionRefresh)
-        m_pActionRefresh->setIcon(UIIconPool::iconSet(QString(":/%1_refresh_22px.png").arg(strPrefix),
-                                                          QString(":/%1_refresh_disabled_22px.png").arg(strPrefix)));
+        m_pActionRefresh->setIcon(UIIconPool::iconSet(QString(":/log_viewer_refresh_22px.png"),
+                                                      QString(":/log_viewer_refresh_disabled_22px.png")));
     if (m_pActionSave)
-        m_pActionSave->setIcon(UIIconPool::iconSet(QString(":/%1_save_22px.png").arg(strPrefix),
-                                                       QString(":/%1_save_disabled_22px.png").arg(strPrefix)));
+        m_pActionSave->setIcon(UIIconPool::iconSet(QString(":/log_viewer_save_22px.png"),
+                                                   QString(":/log_viewer_save_disabled_22px.png")));
     if (m_pActionBookmarks)
-        m_pActionBookmarks->setIcon(UIIconPool::iconSet(QString(":/%1_bookmark_22px.png").arg(strPrefix),
-                                                       QString(":/%1_bookmark_disabled_22px.png").arg(strPrefix)));
+        m_pActionBookmarks->setIcon(UIIconPool::iconSet(QString(":/log_viewer_bookmark_22px.png"),
+                                                        QString(":/log_viewer_bookmark_disabled_22px.png")));
     if (m_pActionSettings)
-        m_pActionSettings->setIcon(UIIconPool::iconSet(QString(":/%1_settings_22px.png").arg(strPrefix),
-                                                       QString(":/%1_settings_disabled_22px.png").arg(strPrefix)));
+        m_pActionSettings->setIcon(UIIconPool::iconSet(QString(":/log_viewer_settings_22px.png"),
+                                                       QString(":/log_viewer_settings_disabled_22px.png")));
 }
 
@@ -618,4 +535,5 @@
         m_pToolBar->setIconSize(QSize(iIconMetric, iIconMetric));
         m_pToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
+
         /* Add toolbar actions: */
         if (m_pActionSave)
@@ -679,6 +597,107 @@
 }
 
+void UIVMLogViewerWidget::prepareWidgets()
+{
+    /* Configure layout: */
+    layout()->setContentsMargins(0, 0, 0, 0);
+#ifdef VBOX_WS_MAC
+    layout()->setSpacing(10);
+#else
+    layout()->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2);
+#endif
+
+    /* Create VM Log-Viewer container: */
+    m_pTabWidget = new QITabWidget;
+    if (m_pTabWidget)
+    {
+        /* Add into layout: */
+        m_pMainLayout->addWidget(m_pTabWidget);
+    }
+
+    /* Create VM Log-Viewer search-panel: */
+    m_pSearchPanel = new UIVMLogViewerSearchPanel(0, this);
+    if (m_pSearchPanel)
+    {
+        /* Configure VM Log-Viewer search-panel: */
+        installEventFilter(m_pSearchPanel);
+        m_pSearchPanel->hide();
+        connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHighlightingUpdated,
+                this, &UIVMLogViewerWidget::sltSearchResultHighLigting);
+        m_panelActionMap.insert(m_pSearchPanel, m_pActionFind);
+
+        /* Add into layout: */
+        m_pMainLayout->addWidget(m_pSearchPanel);
+    }
+
+    /* Create VM Log-Viewer filter-panel: */
+    m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this);
+    if (m_pFilterPanel)
+    {
+        /* Configure VM Log-Viewer filter-panel: */
+        installEventFilter(m_pFilterPanel);
+        m_pFilterPanel->hide();
+        connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied,
+                this, &UIVMLogViewerWidget::sltFilterApplied);
+        m_panelActionMap.insert(m_pFilterPanel, m_pActionFilter);
+
+        /* Add into layout: */
+        m_pMainLayout->addWidget(m_pFilterPanel);
+    }
+
+    m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel(0, this);
+    if (m_pBookmarksPanel)
+    {
+        /* Configure VM Log-Viewer bookmarks-panel: */
+        m_pBookmarksPanel->hide();
+        connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteBookmark,
+                this, &UIVMLogViewerWidget::sltDeleteBookmark);
+        connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteAllBookmarks,
+                this, &UIVMLogViewerWidget::sltDeleteAllBookmarks);
+        connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigBookmarkSelected,
+                this, &UIVMLogViewerWidget::gotoBookmark);
+        m_panelActionMap.insert(m_pBookmarksPanel, m_pActionBookmarks);
+
+        /* Add into layout: */
+        m_pMainLayout->addWidget(m_pBookmarksPanel);
+    }
+
+    m_pSettingsPanel = new UIVMLogViewerSettingsPanel(0, this);
+    if (m_pSettingsPanel)
+    {
+        /* Configure VM Log-Viewer settings-panel: */
+        m_pSettingsPanel->hide();
+        m_pSettingsPanel->setShowLineNumbers(m_bShowLineNumbers);
+        m_pSettingsPanel->setWrapLines(m_bWrapLines);
+        m_pSettingsPanel->setFontSizeInPoints(m_font.pointSize());
+        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigShowLineNumbers, this, &UIVMLogViewerWidget::sltShowLineNumbers);
+        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines);
+        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigChangeFontSizeInPoints, this, &UIVMLogViewerWidget::sltFontSizeChanged);
+        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigChangeFont, this, &UIVMLogViewerWidget::sltChangeFont);
+        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigResetToDefaults, this, &UIVMLogViewerWidget::sltResetSettingsToDefault);
+        m_panelActionMap.insert(m_pSettingsPanel, m_pActionSettings);
+
+        /* Add into layout: */
+        m_pMainLayout->addWidget(m_pSettingsPanel);
+    }
+}
+
+void UIVMLogViewerWidget::loadSettings()
+{
+    m_bWrapLines = gEDataManager->logViewerWrapLines();
+    m_bShowLineNumbers = gEDataManager->logViewerShowLineNumbers();
+    QFont loadedFont = gEDataManager->logViewerFont();
+    if (loadedFont != QFont())
+        m_font = loadedFont;
+}
+
+void UIVMLogViewerWidget::saveSettings()
+{
+    gEDataManager->setLogViweverSettings(m_font, m_bWrapLines, m_bShowLineNumbers);
+}
+
 void UIVMLogViewerWidget::cleanup()
 {
+    /* Save settings: */
+    saveSettings();
 }
 
@@ -807,67 +826,4 @@
 }
 
-const UIVMLogPage *UIVMLogViewerWidget::currentLogPage() const
-{
-    int currentTabIndex = m_pTabWidget->currentIndex();
-    if (currentTabIndex >= m_logPageList.size())
-        return 0;
-    return qobject_cast<const UIVMLogPage*>(m_logPageList.at(currentTabIndex));
-}
-UIVMLogPage *UIVMLogViewerWidget::currentLogPage()
-{
-    int currentTabIndex = m_pTabWidget->currentIndex();
-    if (currentTabIndex >= m_logPageList.size() || currentTabIndex == -1)
-        return 0;
-
-    return qobject_cast<UIVMLogPage*>(m_logPageList.at(currentTabIndex));
-}
-
-void UIVMLogViewerWidget::hidePanel(UIVMLogViewerPanel* panel)
-{
-    if (panel && panel->isVisible())
-        panel->setVisible(false);
-    QMap<UIVMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
-    if (iterator != m_panelActionMap.end())
-    {
-        if (iterator.value() && iterator.value()->isChecked())
-            iterator.value()->setChecked(false);
-    }
-    m_visiblePanelsList.removeOne(panel);
-    manageEscapeShortCut();
-}
-
-void UIVMLogViewerWidget::showPanel(UIVMLogViewerPanel* panel)
-{
-    if (panel && panel->isHidden())
-        panel->setVisible(true);
-    QMap<UIVMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
-    if (iterator != m_panelActionMap.end())
-    {
-        if (!iterator.value()->isChecked())
-            iterator.value()->setChecked(true);
-    }
-    m_visiblePanelsList.push_back(panel);
-    manageEscapeShortCut();
-}
-
-void UIVMLogViewerWidget::manageEscapeShortCut()
-{
-    /* if there is no visible panels give the escape shortcut to parent dialog: */
-    if (m_visiblePanelsList.isEmpty())
-    {
-        emit sigSetCloseButtonShortCut(QKeySequence(Qt::Key_Escape));
-        return;
-    }
-    /* Take the escape shortcut from the dialog: */
-    emit sigSetCloseButtonShortCut(QKeySequence());
-    /* Just loop thru the visible panel list and set the esc key to the
-       panel which made visible latest */
-    for (int i = 0; i < m_visiblePanelsList.size() - 1; ++i)
-    {
-        m_visiblePanelsList[i]->setCloseButtonShortCut(QKeySequence());
-    }
-    m_visiblePanelsList.back()->setCloseButtonShortCut(QKeySequence(Qt::Key_Escape));
-}
-
 QPlainTextEdit* UIVMLogViewerWidget::logPage(int pIndex) const
 {
@@ -879,4 +835,64 @@
     QPlainTextEdit *pBrowser = pContainer->findChild<QPlainTextEdit*>();
     return pBrowser;
+}
+
+void UIVMLogViewerWidget::createLogPage(const QString &strFileName, const QString &strLogContent, bool noLogsToShow /* = false */)
+{
+    if (!m_pTabWidget)
+        return;
+
+    /* Create page-container: */
+    UIVMLogPage* pLogPage = new UIVMLogPage();
+    if (pLogPage)
+    {
+        connect(pLogPage, &UIVMLogPage::sigBookmarksUpdated, this, &UIVMLogViewerWidget::sltUpdateBookmarkPanel);
+        connect(pLogPage, &UIVMLogPage::sigLogPageFilteredChanged, this, &UIVMLogViewerWidget::sltLogPageFilteredChanged);
+        /* Initialize setting for this log page */
+        pLogPage->setShowLineNumbers(m_bShowLineNumbers);
+        pLogPage->setWrapLines(m_bWrapLines);
+        pLogPage->setCurrentFont(m_font);
+
+        /* Set the file name only if we really have log file to read. */
+        if (!noLogsToShow)
+            pLogPage->setLogFileName(strFileName);
+
+        /* Add page-container to viewer-container: */
+        int tabIndex = m_pTabWidget->insertTab(m_pTabWidget->count(), pLogPage, QFileInfo(strFileName).fileName());
+
+        pLogPage->setTabIndex(tabIndex);
+        m_logPageList.resize(m_pTabWidget->count());
+        m_logPageList[tabIndex] = pLogPage;
+
+        /* Set text edit since we want to display this text: */
+        if (!noLogsToShow)
+        {
+            pLogPage->setTextEditText(strLogContent);
+            /* Set the log string of the UIVMLogPage: */
+            pLogPage->setLogString(strLogContent);
+        }
+        /* In case there are some errors append the error text as html: */
+        else
+        {
+            pLogPage->setTextEditTextAsHtml(strLogContent);
+            pLogPage->markForError();
+        }
+    }
+}
+
+const UIVMLogPage *UIVMLogViewerWidget::currentLogPage() const
+{
+    int currentTabIndex = m_pTabWidget->currentIndex();
+    if (currentTabIndex >= m_logPageList.size())
+        return 0;
+    return qobject_cast<const UIVMLogPage*>(m_logPageList.at(currentTabIndex));
+}
+
+UIVMLogPage *UIVMLogViewerWidget::currentLogPage()
+{
+    int currentTabIndex = m_pTabWidget->currentIndex();
+    if (currentTabIndex >= m_logPageList.size() || currentTabIndex == -1)
+        return 0;
+
+    return qobject_cast<UIVMLogPage*>(m_logPageList.at(currentTabIndex));
 }
 
@@ -939,47 +955,4 @@
 }
 
-void UIVMLogViewerWidget::createLogPage(const QString &strFileName, const QString &strLogContent, bool noLogsToShow /* = false */)
-{
-    if (!m_pTabWidget)
-        return;
-
-    /* Create page-container: */
-    UIVMLogPage* pLogPage = new UIVMLogPage();
-    if (pLogPage)
-    {
-        connect(pLogPage, &UIVMLogPage::sigBookmarksUpdated, this, &UIVMLogViewerWidget::sltUpdateBookmarkPanel);
-        connect(pLogPage, &UIVMLogPage::sigLogPageFilteredChanged, this, &UIVMLogViewerWidget::sltLogPageFilteredChanged);
-        /* Initialize setting for this log page */
-        pLogPage->setShowLineNumbers(m_bShowLineNumbers);
-        pLogPage->setWrapLines(m_bWrapLines);
-        pLogPage->setCurrentFont(m_font);
-
-        /* Set the file name only if we really have log file to read. */
-        if (!noLogsToShow)
-            pLogPage->setLogFileName(strFileName);
-
-        /* Add page-container to viewer-container: */
-        int tabIndex = m_pTabWidget->insertTab(m_pTabWidget->count(), pLogPage, QFileInfo(strFileName).fileName());
-
-        pLogPage->setTabIndex(tabIndex);
-        m_logPageList.resize(m_pTabWidget->count());
-        m_logPageList[tabIndex] = pLogPage;
-
-        /* Set text edit since we want to display this text: */
-        if (!noLogsToShow)
-        {
-            pLogPage->setTextEditText(strLogContent);
-            /* Set the log string of the UIVMLogPage: */
-            pLogPage->setLogString(strLogContent);
-        }
-        /* In case there are some errors append the error text as html: */
-        else
-        {
-            pLogPage->setTextEditTextAsHtml(strLogContent);
-            pLogPage->markForError();
-        }
-    }
-}
-
 void UIVMLogViewerWidget::resetHighlighthing()
 {
@@ -992,9 +965,48 @@
 }
 
-QFont UIVMLogViewerWidget::currentFont() const
-{
-    const UIVMLogPage* logPage = currentLogPage();
-    if (!logPage)
-        return QFont();
-    return logPage->currentFont();
-}
+void UIVMLogViewerWidget::hidePanel(UIVMLogViewerPanel* panel)
+{
+    if (panel && panel->isVisible())
+        panel->setVisible(false);
+    QMap<UIVMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
+    if (iterator != m_panelActionMap.end())
+    {
+        if (iterator.value() && iterator.value()->isChecked())
+            iterator.value()->setChecked(false);
+    }
+    m_visiblePanelsList.removeOne(panel);
+    manageEscapeShortCut();
+}
+
+void UIVMLogViewerWidget::showPanel(UIVMLogViewerPanel* panel)
+{
+    if (panel && panel->isHidden())
+        panel->setVisible(true);
+    QMap<UIVMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
+    if (iterator != m_panelActionMap.end())
+    {
+        if (!iterator.value()->isChecked())
+            iterator.value()->setChecked(true);
+    }
+    m_visiblePanelsList.push_back(panel);
+    manageEscapeShortCut();
+}
+
+void UIVMLogViewerWidget::manageEscapeShortCut()
+{
+    /* if there is no visible panels give the escape shortcut to parent dialog: */
+    if (m_visiblePanelsList.isEmpty())
+    {
+        emit sigSetCloseButtonShortCut(QKeySequence(Qt::Key_Escape));
+        return;
+    }
+    /* Take the escape shortcut from the dialog: */
+    emit sigSetCloseButtonShortCut(QKeySequence());
+    /* Just loop thru the visible panel list and set the esc key to the
+       panel which made visible latest */
+    for (int i = 0; i < m_visiblePanelsList.size() - 1; ++i)
+    {
+        m_visiblePanelsList[i]->setCloseButtonShortCut(QKeySequence());
+    }
+    m_visiblePanelsList.back()->setCloseButtonShortCut(QKeySequence(Qt::Key_Escape));
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h	(revision 73692)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h	(revision 73693)
@@ -1,9 +1,9 @@
 /* $Id$ */
 /** @file
- * VBox Qt GUI - UIVMLogViewer class declaration.
+ * VBox Qt GUI - UIVMLogViewerWidget class declaration.
  */
 
 /*
- * Copyright (C) 2010-2017 Oracle Corporation
+ * Copyright (C) 2010-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -57,7 +57,10 @@
 
 public:
+
     /** Constructs the VM Log-Viewer by passing @a pParent to QWidget base-class constructor.
-      * @param  machine  Specifies the machine for which VM Log-Viewer is requested. */
-    UIVMLogViewerWidget(EmbedTo enmEmbedding, QWidget *pParent = 0, const CMachine &machine = CMachine());
+      * @param  enmEmbedding  Brings the type of widget embedding.
+      * @param  comMachine    Brings the machine for which VM Log-Viewer is requested. */
+    UIVMLogViewerWidget(EmbedTo enmEmbedding,
+                        const CMachine &comMachine = CMachine(), QWidget *pParent = 0);
     /** Destructs the VM Log-Viewer. */
     ~UIVMLogViewerWidget();
@@ -73,6 +76,6 @@
 #endif
 
-    /** Sets the machine whose logs to show. */
-    void setMachine(const CMachine &machine);
+    /** Defines the @a comMachine whose logs to show. */
+    void setMachine(const CMachine &comMachine);
     QFont currentFont() const;
 
@@ -95,11 +98,11 @@
         /** Receives delete all signal from the bookmark panel and notifies UIVMLogPage. */
         void sltDeleteAllBookmarks();
-        /** Manages bookmark panel update when bookmark vector is updated */
+        /** Manages bookmark panel update when bookmark vector is updated. */
         void sltUpdateBookmarkPanel();
-        /* Makes the current UIVMLogPage to goto (scroll) its bookmark with index @a index. */
+        /** Makes the current UIVMLogPage to goto (scroll) its bookmark with index @a index. */
         void gotoBookmark(int bookmarkIndex);
     /** @} */
 
-    void sltPanelActionTriggered(bool checked);
+    void sltPanelActionToggled(bool fChecked);
     /** Handles the search result highlight changes. */
     void sltSearchResultHighLigting();
@@ -128,11 +131,19 @@
         /** Prepares VM Log-Viewer. */
         void prepare();
+        /** Prepares actions. */
+        void prepareActions();
+        /** Prepares action icons. */
+        void prepareActionIcons();
+        /** Prepares toolbar. */
+        void prepareToolBar();
+        /** Prepares menu. */
+        void prepareMenu();
         /** Prepares widgets. */
         void prepareWidgets();
-        void prepareActions();
-        void prepareActionIcons();
-        void prepareToolBar();
-        void prepareMenu();
-
+        /** Loads settings.  */
+        void loadSettings();
+
+        /** Saves settings.  */
+        void saveSettings();
         /** Cleanups VM Log-Viewer. */
         void cleanup();
@@ -142,10 +153,10 @@
       * @{ */
         /** Handles translation event. */
-        void retranslateUi();
+        virtual void retranslateUi() /* override */;
 
         /** Handles Qt show @a pEvent. */
-        void showEvent(QShowEvent *pEvent);
+        virtual void showEvent(QShowEvent *pEvent) /* override */;
         /** Handles Qt key-press @a pEvent. */
-        void keyPressEvent(QKeyEvent *pEvent);
+        virtual void keyPressEvent(QKeyEvent *pEvent) /* override */;
     /** @} */
 
@@ -156,7 +167,6 @@
     void createLogPage(const QString &strFileName, const QString &strLogContent, bool noLogsToShow = false);
 
-
+    const UIVMLogPage *currentLogPage() const;
     UIVMLogPage *currentLogPage();
-    const UIVMLogPage *currentLogPage() const;
 
     /** Attempts to read the logs through the API, returns true if there exists any logs, false otherwise. */
@@ -176,15 +186,11 @@
     void manageEscapeShortCut();
 
-    /** @name Load/save some settings from/to extra data
-      * @{ */
-        void loadSettings();
-        void saveSettings();
-    /** @} */
+    /** Holds the widget's embedding type. */
+    const EmbedTo m_enmEmbedding;
+    /** Holds the machine instance. */
+    CMachine      m_comMachine;
 
     /** Holds whether the dialog is polished. */
     bool m_fIsPolished;
-
-    /** Holds the machine instance. */
-    CMachine m_comMachine;
 
     /** Holds container for log-pages. */
@@ -204,7 +210,4 @@
     /** @} */
     QVBoxLayout         *m_pMainLayout;
-
-    /** Holds the widget's embedding type. */
-    const EmbedTo m_enmEmbedding;
 
     /** @name Toolbar and menu variables.
Index: /trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp	(revision 73692)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp	(revision 73693)
@@ -1077,5 +1077,5 @@
      * a second call to this function and result in double delete!!!: */
     m_logViewers.erase(sendersIterator);
-    UIVMLogViewerDialogFactory(CMachine()).cleanup(pDialog);
+    UIVMLogViewerDialogFactory().cleanup(pDialog);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 73692)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 73693)
@@ -2413,5 +2413,5 @@
     m_pLogViewerDialog = 0;
     pDialog->close();
-    UIVMLogViewerDialogFactory(CMachine()).cleanup(pDialog);
+    UIVMLogViewerDialogFactory().cleanup(pDialog);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp	(revision 73692)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp	(revision 73693)
@@ -1131,5 +1131,5 @@
        this function and result in double delete!!!: */
     m_logViewers.erase(sendersIterator);
-    UIVMLogViewerDialogFactory(CMachine()).cleanup(pDialog);
+    UIVMLogViewerDialogFactory().cleanup(pDialog);
 }
 
