Changeset 77263 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 11, 2019 1:49:58 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128771
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r77238 r77263 2765 2765 QWidget *pDialogParent = windowManager().realParentWindow(pParent); 2766 2766 2767 UIFDCreationDialog *pDialog = new UIFDCreationDialog(pParent, strMachine Name, strMachineFolder);2767 UIFDCreationDialog *pDialog = new UIFDCreationDialog(pParent, strMachineFolder, strMachineName); 2768 2768 if (!pDialog) 2769 2769 return QUuid(); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
r77238 r77263 37 37 38 38 39 UIFDCreationDialog::UIFDCreationDialog(QWidget *pParent /* = 0 */,40 const QString &strMachineName /* = QString() */,41 const QString &strMachineFolder/* = QString() */)39 UIFDCreationDialog::UIFDCreationDialog(QWidget *pParent, 40 const QString &strDefaultFolder, 41 const QString &strMachineName /* = QString() */) 42 42 : QIWithRetranslateUI<QDialog>(pParent) 43 43 , m_pFilePathselector(0) … … 47 47 , m_pButtonBox(0) 48 48 , m_pFormatCheckBox(0) 49 , m_strDefaultFolder(strDefaultFolder) 49 50 , m_strMachineName(strMachineName) 50 , m_strMachineFolder(strMachineFolder)51 51 { 52 52 … … 63 63 void UIFDCreationDialog::retranslateUi() 64 64 { 65 setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(tr("Floppy Disk Creator"))); 65 if (m_strMachineName.isEmpty()) 66 setWindowTitle(QString("%1").arg(tr("Floppy Disk Creator"))); 67 else 68 setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(tr("Floppy Disk Creator"))); 66 69 if (m_pPathLabel) 67 70 m_pPathLabel->setText(tr("File Path:")); … … 156 159 QString strPreferredExtension = UIMediumDefs::getPreferredExtensionForMedium(KDeviceType_Floppy); 157 160 158 QString strInitialPath = m_str MachineFolder;161 QString strInitialPath = m_strDefaultFolder; 159 162 if (strInitialPath.isEmpty()) 160 163 strInitialPath = vboxGlobal().virtualBox().GetSystemProperties().GetDefaultMachineFolder(); … … 163 166 return strInitialPath; 164 167 165 QString strDiskname = VBoxGlobal::findUniqueFileName(m_strMachineFolder, m_strMachineName); 168 QString strDiskname = !(m_strMachineName.isEmpty()) ? m_strMachineName : "NewFloppyDisk"; 169 strDiskname = VBoxGlobal::findUniqueFileName(m_strDefaultFolder, m_strMachineName); 166 170 167 171 strInitialPath = QDir(strInitialPath).absoluteFilePath(strDiskname + "." + strPreferredExtension); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.h
r76581 r77263 45 45 public: 46 46 47 UIFDCreationDialog(QWidget *pParent = 0, 48 const QString &strMachineName = QString(), 49 const QString &strMachineFolder = QString()); 47 UIFDCreationDialog(QWidget *pParent, 48 const QString &strDefaultFolder, 49 const QString &strMachineName = QString()); 50 50 51 51 52 virtual void accept() /* override */; … … 78 79 QDialogButtonBox *m_pButtonBox; 79 80 QCheckBox *m_pFormatCheckBox; 81 QString m_strDefaultFolder; 80 82 QString m_strMachineName; 81 QString m_strMachineFolder;82 83 QUuid m_uMediumID; 83 84 };
Note:
See TracChangeset
for help on using the changeset viewer.