VirtualBox

Changeset 95129 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 27, 2022 12:12:37 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt/Ds: bugref:6899: Machine settings: Shared Folders page accessibility improvements; Rework and cleanup for UIMachineSettingsSFDetails editor and moving it to appropriate place.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r95077 r95129  
    922922        src/settings/editors/UIScaleFactorEditor.h \
    923923        src/settings/editors/UISharedClipboardEditor.h \
     924        src/settings/editors/UISharedFolderDetailsEditor.h \
    924925        src/settings/editors/UISharedFoldersEditor.h \
    925926        src/settings/editors/UIShortcutConfigurationEditor.h \
     
    942943        src/settings/machine/UIMachineSettingsPortForwardingDlg.h \
    943944        src/settings/machine/UIMachineSettingsSF.h \
    944         src/settings/machine/UIMachineSettingsSFDetails.h \
    945945        src/settings/machine/UIMachineSettingsSerial.h \
    946946        src/settings/machine/UIMachineSettingsStorage.h \
     
    14921492        src/settings/editors/UIScaleFactorEditor.cpp \
    14931493        src/settings/editors/UISharedClipboardEditor.cpp \
     1494        src/settings/editors/UISharedFolderDetailsEditor.cpp \
    14941495        src/settings/editors/UISharedFoldersEditor.cpp \
    14951496        src/settings/editors/UIShortcutConfigurationEditor.cpp \
     
    15121513        src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
    15131514        src/settings/machine/UIMachineSettingsSF.cpp \
    1514         src/settings/machine/UIMachineSettingsSFDetails.cpp \
    15151515        src/settings/machine/UIMachineSettingsSerial.cpp \
    15161516        src/settings/machine/UIMachineSettingsStorage.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UISharedFolderDetailsEditor.cpp

    r95128 r95129  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIMachineSettingsSFDetails class implementation.
     3 * VBox Qt GUI - UISharedFolderDetailsEditor class implementation.
    44 */
    55
     
    2626/* GUI includes */
    2727#include "QIDialogButtonBox.h"
     28#include "UICommon.h"
    2829#include "UIFilePathSelector.h"
    29 #include "UIMachineSettingsSFDetails.h"
    30 #include "UICommon.h"
    31 
    32 
    33 UIMachineSettingsSFDetails::UIMachineSettingsSFDetails(SFDialogType type,
    34                                                        bool fUsePermanent,
    35                                                        const QStringList &usedNames,
    36                                                        QWidget *pParent /* = 0 */)
     30#include "UISharedFolderDetailsEditor.h"
     31
     32
     33UISharedFolderDetailsEditor::UISharedFolderDetailsEditor(EditorType enmType,
     34                                                         bool fUsePermanent,
     35                                                         const QStringList &usedNames,
     36                                                         QWidget *pParent /* = 0 */)
    3737    : QIWithRetranslateUI2<QIDialog>(pParent)
    38     , m_type(type)
     38    , m_enmType(enmType)
    3939    , m_fUsePermanent(fUsePermanent)
    4040    , m_usedNames(usedNames)
    41     , m_pCache(0)
    4241    , m_pLabelPath(0)
    4342    , m_pSelectorPath(0)
     
    5453}
    5554
    56 void UIMachineSettingsSFDetails::setPath(const QString &strPath)
    57 {
    58     m_pSelectorPath->setPath(strPath);
    59 }
    60 
    61 QString UIMachineSettingsSFDetails::path() const
    62 {
    63     return m_pSelectorPath->path();
    64 }
    65 
    66 void UIMachineSettingsSFDetails::setName(const QString &strName)
    67 {
    68     m_pEditorName->setText(strName);
    69 }
    70 
    71 QString UIMachineSettingsSFDetails::name() const
    72 {
    73     return m_pEditorName->text();
    74 }
    75 
    76 void UIMachineSettingsSFDetails::setWriteable(bool fWritable)
    77 {
    78     m_pCheckBoxReadonly->setChecked(!fWritable);
    79 }
    80 
    81 bool UIMachineSettingsSFDetails::isWriteable() const
    82 {
    83     return !m_pCheckBoxReadonly->isChecked();
    84 }
    85 
    86 void UIMachineSettingsSFDetails::setAutoMount(bool fAutoMount)
    87 {
    88     m_pCheckBoxAutoMount->setChecked(fAutoMount);
    89 }
    90 
    91 bool UIMachineSettingsSFDetails::isAutoMounted() const
    92 {
    93     return m_pCheckBoxAutoMount->isChecked();
    94 }
    95 
    96 void UIMachineSettingsSFDetails::setAutoMountPoint(const QString &strAutoMountPoint)
    97 {
    98     m_pEditorAutoMountPoint->setText(strAutoMountPoint);
    99 }
    100 
    101 QString UIMachineSettingsSFDetails::autoMountPoint() const
    102 {
    103     return m_pEditorAutoMountPoint->text();
    104 }
    105 
    106 void UIMachineSettingsSFDetails::setPermanent(bool fPermanent)
    107 {
    108     m_pCheckBoxPermanent->setChecked(fPermanent);
    109 }
    110 
    111 bool UIMachineSettingsSFDetails::isPermanent() const
     55void UISharedFolderDetailsEditor::setPath(const QString &strPath)
     56{
     57    if (m_pSelectorPath)
     58        m_pSelectorPath->setPath(strPath);
     59}
     60
     61QString UISharedFolderDetailsEditor::path() const
     62{
     63    return m_pSelectorPath ? m_pSelectorPath->path() : QString();
     64}
     65
     66void UISharedFolderDetailsEditor::setName(const QString &strName)
     67{
     68    if (m_pEditorName)
     69        m_pEditorName->setText(strName);
     70}
     71
     72QString UISharedFolderDetailsEditor::name() const
     73{
     74    return m_pEditorName ? m_pEditorName->text() : QString();
     75}
     76
     77void UISharedFolderDetailsEditor::setWriteable(bool fWritable)
     78{
     79    if (m_pCheckBoxReadonly)
     80        m_pCheckBoxReadonly->setChecked(!fWritable);
     81}
     82
     83bool UISharedFolderDetailsEditor::isWriteable() const
     84{
     85    return m_pCheckBoxReadonly ? !m_pCheckBoxReadonly->isChecked() : false;
     86}
     87
     88void UISharedFolderDetailsEditor::setAutoMount(bool fAutoMount)
     89{
     90    if (m_pCheckBoxAutoMount)
     91        m_pCheckBoxAutoMount->setChecked(fAutoMount);
     92}
     93
     94bool UISharedFolderDetailsEditor::isAutoMounted() const
     95{
     96    return m_pCheckBoxAutoMount ? m_pCheckBoxAutoMount->isChecked() : false;
     97}
     98
     99void UISharedFolderDetailsEditor::setAutoMountPoint(const QString &strAutoMountPoint)
     100{
     101    if (m_pEditorAutoMountPoint)
     102        m_pEditorAutoMountPoint->setText(strAutoMountPoint);
     103}
     104
     105QString UISharedFolderDetailsEditor::autoMountPoint() const
     106{
     107    return m_pEditorAutoMountPoint ? m_pEditorAutoMountPoint->text() : QString();
     108}
     109
     110void UISharedFolderDetailsEditor::setPermanent(bool fPermanent)
     111{
     112    if (m_pCheckBoxPermanent)
     113        m_pCheckBoxPermanent->setChecked(fPermanent);
     114}
     115
     116bool UISharedFolderDetailsEditor::isPermanent() const
    112117{
    113118    return m_fUsePermanent ? m_pCheckBoxPermanent->isChecked() : true;
    114119}
    115120
    116 void UIMachineSettingsSFDetails::retranslateUi()
    117 {
    118     m_pLabelPath->setText(tr("Folder Path:"));
    119     m_pLabelName->setText(tr("Folder Name:"));
    120     m_pEditorName->setToolTip(tr("Holds the name of the shared folder (as it will be seen by the guest OS)."));
    121     m_pCheckBoxReadonly->setToolTip(tr("When checked, the guest OS will not be able to write to the specified shared folder."));
    122     m_pCheckBoxReadonly->setText(tr("&Read-only"));
    123     m_pCheckBoxAutoMount->setToolTip(tr("When checked, the guest OS will try to automatically mount the shared folder on startup."));
    124     m_pCheckBoxAutoMount->setText(tr("&Auto-mount"));
    125     m_pLabelAutoMountPoint->setText(tr("Mount point:"));
    126     m_pEditorAutoMountPoint->setToolTip(tr("Where to automatically mount the folder in the guest.  A drive letter (e.g. 'G:') "
    127                                            "for Windows and OS/2 guests, path for the others.  If left empty the guest will pick "
    128                                            "something fitting."));
    129     m_pCheckBoxPermanent->setToolTip(tr("When checked, this shared folder will be permanent."));
    130     m_pCheckBoxPermanent->setText(tr("&Make Permanent"));
    131 
    132     switch (m_type)
    133     {
    134         case AddType:
    135             setWindowTitle(tr("Add Share"));
    136             break;
    137         case EditType:
    138             setWindowTitle(tr("Edit Share"));
    139             break;
    140         default:
    141             AssertMsgFailed(("Incorrect shared-folders dialog type: %d\n", m_type));
    142     }
    143 }
    144 
    145 void UIMachineSettingsSFDetails::sltValidate()
    146 {
    147     m_pButtonBox->button(QDialogButtonBox::Ok)->setEnabled(!m_pSelectorPath->path().isEmpty() &&
    148                                                          QDir(m_pSelectorPath->path()).exists() &&
    149                                                          !m_pEditorName->text().trimmed().isEmpty() &&
    150                                                          !m_pEditorName->text().contains(" ") &&
    151                                                          !m_usedNames.contains(m_pEditorName->text()));
    152 }
    153 
    154 void UIMachineSettingsSFDetails::sltSelectPath()
    155 {
    156     if (!m_pSelectorPath->isPathSelected())
     121void UISharedFolderDetailsEditor::retranslateUi()
     122{
     123    switch (m_enmType)
     124    {
     125        case EditorType_Add: setWindowTitle(tr("Add Share")); break;
     126        case EditorType_Edit: setWindowTitle(tr("Edit Share")); break;
     127        default: break;
     128    }
     129
     130    if (m_pLabelPath)
     131        m_pLabelPath->setText(tr("Folder Path:"));
     132    if (m_pLabelName)
     133        m_pLabelName->setText(tr("Folder Name:"));
     134    if (m_pEditorName)
     135        m_pEditorName->setToolTip(tr("Holds the name of the shared folder "
     136                                     "(as it will be seen by the guest OS)."));
     137    if (m_pCheckBoxReadonly)
     138    {
     139        m_pCheckBoxReadonly->setText(tr("&Read-only"));
     140        m_pCheckBoxReadonly->setToolTip(tr("When checked, the guest OS will not be able "
     141                                           "to write to the specified shared folder."));
     142    }
     143    if (m_pCheckBoxAutoMount)
     144    {
     145        m_pCheckBoxAutoMount->setText(tr("&Auto-mount"));
     146        m_pCheckBoxAutoMount->setToolTip(tr("When checked, the guest OS will try to "
     147                                            "automatically mount the shared folder on startup."));
     148    }
     149    if (m_pLabelAutoMountPoint)
     150        m_pLabelAutoMountPoint->setText(tr("Mount point:"));
     151    if (m_pEditorAutoMountPoint)
     152        m_pEditorAutoMountPoint->setToolTip(tr("Where to automatically mount the folder in the guest.  "
     153                                               "A drive letter (e.g. 'G:') for Windows and OS/2 guests, path for the others.  "
     154                                               "If left empty the guest will pick something fitting."));
     155    if (m_pCheckBoxPermanent)
     156    {
     157        m_pCheckBoxPermanent->setText(tr("&Make Permanent"));
     158        m_pCheckBoxPermanent->setToolTip(tr("When checked, this shared folder will be permanent."));
     159    }
     160}
     161
     162void UISharedFolderDetailsEditor::sltValidate()
     163{
     164    if (m_pButtonBox)
     165        m_pButtonBox->button(QDialogButtonBox::Ok)->setEnabled(   !m_pSelectorPath->path().isEmpty()
     166                                                               && QDir(m_pSelectorPath->path()).exists()
     167                                                               && !m_pEditorName->text().trimmed().isEmpty()
     168                                                               && !m_pEditorName->text().contains(" ")
     169                                                               && !m_usedNames.contains(m_pEditorName->text()));
     170}
     171
     172void UISharedFolderDetailsEditor::sltSelectPath()
     173{
     174    if (   !m_pSelectorPath
     175        || !m_pSelectorPath->isPathSelected())
    157176        return;
    158177
     
    167186    }
    168187#endif /* VBOX_WS_WIN || Q_OS_OS2 */
     188
     189    if (!m_pEditorName)
     190        return;
     191
    169192    QDir folder(strFolderName);
    170193    if (!folder.isRoot())
     
    182205#endif
    183206    }
     207
    184208    /* Validate the field values: */
    185209    sltValidate();
    186210}
    187211
    188 void UIMachineSettingsSFDetails::prepare()
     212void UISharedFolderDetailsEditor::prepare()
    189213{
    190214    /* Prepare everything: */
     
    207231}
    208232
    209 void UIMachineSettingsSFDetails::prepareWidgets()
     233void UISharedFolderDetailsEditor::prepareWidgets()
    210234{
    211235    /* Prepare main layout: */
    212     QGridLayout *pLayoutMain = new QGridLayout(this);
    213     if (pLayoutMain)
    214     {
    215         pLayoutMain->setRowStretch(6, 1);
     236    QGridLayout *pLayout = new QGridLayout(this);
     237    if (pLayout)
     238    {
     239        pLayout->setRowStretch(6, 1);
    216240
    217241        /* Prepare path label: */
     
    220244        {
    221245            m_pLabelPath->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    222             pLayoutMain->addWidget(m_pLabelPath, 0, 0);
     246            pLayout->addWidget(m_pLabelPath, 0, 0);
    223247        }
    224248        /* Prepare path selector: */
     
    229253            m_pSelectorPath->setInitialPath(QDir::homePath());
    230254
    231             pLayoutMain->addWidget(m_pSelectorPath, 0, 1);
     255            pLayout->addWidget(m_pSelectorPath, 0, 1);
    232256        }
    233257
     
    237261        {
    238262            m_pLabelName->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    239             pLayoutMain->addWidget(m_pLabelName, 1, 0);
     263            pLayout->addWidget(m_pLabelName, 1, 0);
    240264        }
    241265        /* Prepare name editor: */
    242266        m_pEditorName = new QLineEdit;
    243267        if (m_pEditorName)
    244             pLayoutMain->addWidget(m_pEditorName, 1, 1);
     268            pLayout->addWidget(m_pEditorName, 1, 1);
    245269
    246270        /* Prepare auto-mount point: */
     
    249273        {
    250274            m_pLabelAutoMountPoint->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    251             pLayoutMain->addWidget(m_pLabelAutoMountPoint, 2, 0);
     275            pLayout->addWidget(m_pLabelAutoMountPoint, 2, 0);
    252276        }
    253277        /* Prepare auto-mount editor: */
    254278        m_pEditorAutoMountPoint = new QLineEdit;
    255279        if (m_pEditorAutoMountPoint)
    256             pLayoutMain->addWidget(m_pEditorAutoMountPoint, 2, 1);
     280            pLayout->addWidget(m_pEditorAutoMountPoint, 2, 1);
    257281
    258282        /* Prepare read-only check-box: */
    259283        m_pCheckBoxReadonly = new QCheckBox;
    260284        if (m_pCheckBoxReadonly)
    261             pLayoutMain->addWidget(m_pCheckBoxReadonly, 3, 1);
     285            pLayout->addWidget(m_pCheckBoxReadonly, 3, 1);
    262286        /* Prepare auto-mount check-box: */
    263287        m_pCheckBoxAutoMount = new QCheckBox;
    264288        if (m_pCheckBoxAutoMount)
    265             pLayoutMain->addWidget(m_pCheckBoxAutoMount, 4, 1);
     289            pLayout->addWidget(m_pCheckBoxAutoMount, 4, 1);
    266290        /* Prepare permanent check-box: */
    267291        m_pCheckBoxPermanent = new QCheckBox;
     
    269293        {
    270294            m_pCheckBoxPermanent->setHidden(!m_fUsePermanent);
    271             pLayoutMain->addWidget(m_pCheckBoxPermanent, 5, 1);
     295            pLayout->addWidget(m_pCheckBoxPermanent, 5, 1);
    272296        }
    273297
     
    277301        {
    278302            m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
    279             pLayoutMain->addWidget(m_pButtonBox, 7, 0, 1, 2);
    280         }
    281     }
    282 }
    283 
    284 void UIMachineSettingsSFDetails::prepareConnections()
    285 {
    286     connect(m_pSelectorPath, static_cast<void(UIFilePathSelector::*)(int)>(&UIFilePathSelector::currentIndexChanged),
    287             this, &UIMachineSettingsSFDetails::sltSelectPath);
    288     connect(m_pSelectorPath, &UIFilePathSelector::pathChanged, this, &UIMachineSettingsSFDetails::sltSelectPath);
    289     connect(m_pEditorName, &QLineEdit::textChanged, this, &UIMachineSettingsSFDetails::sltValidate);
     303            pLayout->addWidget(m_pButtonBox, 7, 0, 1, 2);
     304        }
     305    }
     306}
     307
     308void UISharedFolderDetailsEditor::prepareConnections()
     309{
     310    if (m_pSelectorPath)
     311    {
     312        connect(m_pSelectorPath, static_cast<void(UIFilePathSelector::*)(int)>(&UIFilePathSelector::currentIndexChanged),
     313                this, &UISharedFolderDetailsEditor::sltSelectPath);
     314        connect(m_pSelectorPath, &UIFilePathSelector::pathChanged,
     315                this, &UISharedFolderDetailsEditor::sltSelectPath);
     316    }
     317    if (m_pEditorName)
     318        connect(m_pEditorName, &QLineEdit::textChanged,
     319                this, &UISharedFolderDetailsEditor::sltValidate);
    290320    if (m_fUsePermanent)
    291         connect(m_pCheckBoxPermanent, &QCheckBox::toggled, this, &UIMachineSettingsSFDetails::sltValidate);
    292     connect(m_pButtonBox, &QIDialogButtonBox::accepted, this, &UIMachineSettingsSFDetails::accept);
    293     connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIMachineSettingsSFDetails::reject);
    294 }
     321        connect(m_pCheckBoxPermanent, &QCheckBox::toggled,
     322                this, &UISharedFolderDetailsEditor::sltValidate);
     323    if (m_pButtonBox)
     324    {
     325        connect(m_pButtonBox, &QIDialogButtonBox::accepted,
     326                this, &UISharedFolderDetailsEditor::accept);
     327        connect(m_pButtonBox, &QIDialogButtonBox::rejected,
     328                this, &UISharedFolderDetailsEditor::reject);
     329    }
     330}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UISharedFolderDetailsEditor.h

    r95128 r95129  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIMachineSettingsSFDetails class declaration.
     3 * VBox Qt GUI - UISharedFolderDetailsEditor class declaration.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsSFDetails_h
    19 #define FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsSFDetails_h
     18#ifndef FEQT_INCLUDED_SRC_settings_editors_UISharedFolderDetailsEditor_h
     19#define FEQT_INCLUDED_SRC_settings_editors_UISharedFolderDetailsEditor_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
    2222#endif
    2323
    24 /* Includes */
     24/* GUI includes: */
    2525#include "QIDialog.h"
    2626#include "QIWithRetranslateUI.h"
    27 #include "UIMachineSettingsSF.h"
    2827
    29 class UIFilePathSelector;
     28/* Forward declarations: */
    3029class QCheckBox;
    3130class QLabel;
    3231class QLineEdit;
    3332class QIDialogButtonBox;
     33class UIFilePathSelector;
    3434
    35 /* Shared folders details dialog: */
    36 class SHARED_LIBRARY_STUFF UIMachineSettingsSFDetails : public QIWithRetranslateUI2<QIDialog>
     35/** QIDialog subclass used as a shared folders editor. */
     36class SHARED_LIBRARY_STUFF UISharedFolderDetailsEditor : public QIWithRetranslateUI2<QIDialog>
    3737{
    3838    Q_OBJECT;
     
    4040public:
    4141
    42     enum SFDialogType
     42    /** Editor types. */
     43    enum EditorType
    4344    {
    44         AddType,
    45         EditType
     45        EditorType_Add,
     46        EditorType_Edit
    4647    };
    4748
    48     UIMachineSettingsSFDetails(SFDialogType type,
    49                                bool fUsePermanent,
    50                                const QStringList &usedNames,
    51                                QWidget *pParent = 0);
     49    /** Constructs editor passing @a pParent to the base-class.
     50      * @param  enmType        Brings editor type.
     51      * @param  fUsePermanent  Brings whether folder can be permanent.
     52      * @param  usedNames      Brings existing folder names. */
     53    UISharedFolderDetailsEditor(EditorType enmType,
     54                                bool fUsePermanent,
     55                                const QStringList &usedNames,
     56                                QWidget *pParent = 0);
    5257
     58    /** Defines folder @a strPath. */
    5359    void setPath(const QString &strPath);
     60    /** Returns folder path. */
    5461    QString path() const;
    5562
     63    /** Defines folder @a strName. */
    5664    void setName(const QString &strName);
     65    /** Returns folder name. */
    5766    QString name() const;
    5867
     68    /** Defines whether folder is @a fWritable. */
    5969    void setWriteable(bool fWriteable);
     70    /** Returns whether folder is writable. */
    6071    bool isWriteable() const;
    6172
     73    /** Defines whether folder supports @a fAutoMount. */
    6274    void setAutoMount(bool fAutoMount);
     75    /** Returns whether folder supports auto mount. */
    6376    bool isAutoMounted() const;
    6477
     78    /** Defines folder @a strAutoMountPoint. */
    6579    void setAutoMountPoint(const QString &strAutoMountPoint);
     80    /** Returns folder auto mount point. */
    6681    QString autoMountPoint() const;
    6782
     83    /** Defines whether folder is @a fPermanent. */
    6884    void setPermanent(bool fPermanent);
     85    /** Returns whether folder is permanent. */
    6986    bool isPermanent() const;
    7087
    7188protected:
    7289
    73     void retranslateUi();
     90    /** Handles translation event. */
     91    void retranslateUi() RT_OVERRIDE;
    7492
    7593private slots:
    7694
     95    /** Holds signal about folder path selected. */
    7796    void sltSelectPath();
     97    /** Checks editor validness. */
    7898    void sltValidate();
    7999
     
    87107    void prepareConnections();
    88108
    89     SFDialogType  m_type;
    90     bool          m_fUsePermanent;
    91     QStringList   m_usedNames;
    92     UISettingsCacheSharedFolders *m_pCache;
     109    /** @name Arguments
     110      * @{ */
     111        /** Holds editor type. */
     112        EditorType   m_enmType;
     113        /** Holds whether folder can be permanent. */
     114        bool         m_fUsePermanent;
     115        /** Holds existing folder names. */
     116        QStringList  m_usedNames;
     117    /** @} */
    93118
    94119    /** @name Widgets
     
    117142};
    118143
    119 #endif /* !FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsSFDetails_h */
     144#endif /* !FEQT_INCLUDED_SRC_settings_editors_UISharedFolderDetailsEditor_h */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UISharedFoldersEditor.cpp

    r95077 r95129  
    2828#include "QITreeWidget.h"
    2929#include "UIIconPool.h"
    30 #include "UIMachineSettingsSFDetails.h"
     30#include "UISharedFolderDetailsEditor.h"
    3131#include "UISharedFoldersEditor.h"
    3232#include "VBoxUtils.h"
     33
     34/* Other VBox includes: */
     35#include "iprt/assert.h"
    3336
    3437
     
    508511void UISharedFoldersEditor::sltAddFolder()
    509512{
    510     /* Configure folder details dialog: */
    511     UIMachineSettingsSFDetails dlgFolderDetails(UIMachineSettingsSFDetails::AddType,
    512                                                 m_foldersAvailable.value(UISharedFolderType_Console),
    513                                                 usedList(true),
    514                                                 this);
     513    /* Configure shared folder details editor: */
     514    UISharedFolderDetailsEditor dlgFolderDetails(UISharedFolderDetailsEditor::EditorType_Add,
     515                                                 m_foldersAvailable.value(UISharedFolderType_Console),
     516                                                 usedList(true),
     517                                                 this);
    515518
    516519    /* Run folder details dialog: */
     
    549552    AssertPtrReturnVoid(pItem->parentItem());
    550553
    551     /* Configure folder details dialog: */
    552     UIMachineSettingsSFDetails dlgFolderDetails(UIMachineSettingsSFDetails::EditType,
    553                                                 m_foldersAvailable.value(UISharedFolderType_Console),
    554                                                 usedList(false),
    555                                                 this);
     554    /* Configure shared folder details editor: */
     555    UISharedFolderDetailsEditor dlgFolderDetails(UISharedFolderDetailsEditor::EditorType_Edit,
     556                                                 m_foldersAvailable.value(UISharedFolderType_Console),
     557                                                 usedList(false),
     558                                                 this);
    556559    dlgFolderDetails.setPath(pItem->m_strPath);
    557560    dlgFolderDetails.setName(pItem->m_strName);
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