VirtualBox

Ignore:
Timestamp:
Apr 3, 2007 3:42:03 PM (18 years ago)
Author:
vboxsync
Message:

1902: "Select Directory" dialogs are not native:

  1. Fixing getExistingDirectory method over-complexity through inner event loop processing.
  2. Fixing starting directory selection for example, we have “/path/to/dir” directory to be set as the initial directory of the dialog:
    1. For Win32 platform “dir” will be the current selection after opening the contents of “/path/to”.
    2. For the other platforms where it is not possible to select some dir at the beginning, the initial directory will be set to “/path/to/dir” in the dialog instead of “/path/to”.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui.h

    r1863 r1889  
    188188                 this, SLOT (validate()));
    189189        connect (tbPath, SIGNAL (clicked()), this, SLOT (showFileDialog()));
    190         connect (&vboxGlobal(), SIGNAL (existingDirectoryResult (const QString&)),
    191                  this, SLOT (folderSelected (const QString&)));
    192190        QWhatsThis::add (mLePath, tr ("Enter existing path for the shared folder here"));
    193191        QWhatsThis::add (mLeName, tr ("Enter name for the shared folder to be created"));
     
    233231    void showFileDialog()
    234232    {
    235         vboxGlobal().getExistingDirectory (QDir::convertSeparators (
    236                                            QDir::rootDirPath()),
    237                                            this, "addSharedFolderDialog",
    238                                            tr ("Select a folder to share"));
    239     }
    240 
    241     void folderSelected (const QString &aFolder)
    242     {
    243         if (aFolder.isNull())
     233        QString folder = vboxGlobal().getExistingDirectory (QDir::rootDirPath(),
     234                                                  this, "addSharedFolderDialog",
     235                                                  tr ("Select a folder to share"));
     236        if (folder.isNull())
    244237            return;
    245238
    246         QString folderName = QDir::convertSeparators (aFolder);
     239        QString folderName = QDir::convertSeparators (folder);
    247240        QRegExp commonRule ("[\\\\/]([^\\\\^/]+)[\\\\/]?$");
    248241        QRegExp rootRule ("(([a-zA-Z])[^\\\\^/])?[\\\\/]$");
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