Commit 012f97d5 authored by Ian Bush's avatar Ian Bush
Browse files

Refs #17807 Replace all instances of (*.*) with (*)

parent f97ffd34
......@@ -659,7 +659,7 @@ void FitDialog::saveUserFunction() {
"Parent of FitDialog is not ApplicationWindow as expected.");
}
QString filter = tr("MantidPlot fit model") + " (*.fit);;";
filter += tr("All files") + " (*.*)";
filter += tr("All files") + " (*)";
QString fn = MantidQt::API::FileDialogHandler::getSaveFileName(
app, tr("MantidPlot") + " - " + tr("Save Fit Model As"),
app->fitModelsPath + "/" + name, filter);
......@@ -1420,7 +1420,7 @@ void FitDialog::saveInitialGuesses() {
"Parent of FitDialog is not ApplicationWindow as expected.");
}
QString filter = tr("MantidPlot fit model") + " (*.fit);;";
filter += tr("All files") + " (*.*)";
filter += tr("All files") + " (*)";
QString fn = MantidQt::API::FileDialogHandler::getSaveFileName(
app, tr("MantidPlot") + " - " + tr("Save Fit Model As"),
app->fitModelsPath + "/" + d_current_fit->objectName(), filter);
......
......@@ -105,7 +105,7 @@ QString getFileDialogFilter(const std::vector<std::string> &exts,
}
filter = filter.trimmed();
}
filter.append("All Files (*.*)");
filter.append("All Files (*)");
return filter;
}
......
......@@ -125,7 +125,7 @@ QString UserSubWindow::openFileDialog(const bool save,
}
filter = filter.trimmed();
}
filter.append(";;All Files (*.*)");
filter.append(";;All Files (*)");
QString filename;
if (save) {
......
......@@ -34,7 +34,7 @@ const std::string EnggDiffFittingViewQtWidget::g_settingsGroup =
const std::string EnggDiffFittingViewQtWidget::g_peaksListExt =
"Peaks list File: CSV "
"(*.csv *.txt);;"
"Other extensions/all files (*.*)";
"Other extensions/all files (*)";
bool EnggDiffFittingViewQtWidget::m_fittingMutliRunMode = false;
bool EnggDiffFittingViewQtWidget::m_fittingSingleRunMode = false;
......
......@@ -33,7 +33,7 @@ int EnggDiffractionViewQtGUI::g_currentCropCalibBankName = 0;
const std::string EnggDiffractionViewQtGUI::g_iparmExtStr =
"GSAS instrument parameters, IPARM file: PRM, PAR, IPAR, IPARAM "
"(*.prm *.par *.ipar *.iparam);;"
"Other extensions/all files (*.*)";
"Other extensions/all files (*)";
const std::string EnggDiffractionViewQtGUI::g_pixelCalibExt =
"Comma separated values text file with calibration table, CSV"
......@@ -42,12 +42,12 @@ const std::string EnggDiffractionViewQtGUI::g_pixelCalibExt =
"(*.nxs *.nexus);;"
"Supported formats: CSV, NXS "
"(*.csv *.nxs *.nexus);;"
"Other extensions/all files (*.*)";
"Other extensions/all files (*)";
const std::string EnggDiffractionViewQtGUI::g_DetGrpExtStr =
"Detector Grouping File: CSV "
"(*.csv *.txt);;"
"Other extensions/all files (*.*)";
"Other extensions/all files (*)";
const std::string EnggDiffractionViewQtGUI::g_settingsGroup =
"CustomInterfaces/EnggDiffractionView";
......
......@@ -387,7 +387,7 @@ QString Homer::openFileDia(const bool save, const QStringList &exts) {
}
filter = filter.trimmed();
}
filter.append(";;All Files (*.*)");
filter.append(";;All Files (*)");
QString filename;
if (save) {
......
......@@ -631,7 +631,7 @@ void MantidEV::loadEventFile_slot() {
QString file_path = getFilePath(last_event_file);
QString Qfile_name =
QFileDialog::getOpenFileName(this, tr("Load event file"), file_path,
tr("Nexus Files (*.nxs);; All files(*.*)"));
tr("Nexus Files (*.nxs);; All files(*)"));
if (Qfile_name.length() > 0) {
m_uiForm.EventFileName_ledt->setText(Qfile_name);
......@@ -647,7 +647,7 @@ void MantidEV::selectDetCalFile_slot() {
QString file_path = getFilePath(last_cal_file);
QString Qfile_name = QFileDialog::getOpenFileName(
this, tr("Load calibration file"), file_path,
tr("ISAW .DetCal Files (*.DetCal);; All files(*.*)"));
tr("ISAW .DetCal Files (*.DetCal);; All files(*)"));
if (Qfile_name.length() > 0) {
m_uiForm.CalFileName_ledt->setText(Qfile_name);
......@@ -663,7 +663,7 @@ void MantidEV::selectDetCalFile2_slot() {
QString file_path = getFilePath(last_cal_file2);
QString Qfile_name = QFileDialog::getOpenFileName(
this, tr("Load calibration file"), file_path,
tr("ISAW .DetCal Files (*.DetCal);; All files(*.*)"));
tr("ISAW .DetCal Files (*.DetCal);; All files(*)"));
if (Qfile_name.length() > 0) {
m_uiForm.CalFileName2_ledt->setText(Qfile_name);
......@@ -762,7 +762,7 @@ void MantidEV::getLoadPeaksFileName_slot() {
QString file_path = getFilePath(last_peaks_file);
QString Qfile_name = QFileDialog::getOpenFileName(
this, tr("Load peaks file"), file_path,
tr("Peaks Files (*.peaks *.integrate *.nxs *.h5);; All files(*.*)"));
tr("Peaks Files (*.peaks *.integrate *.nxs *.h5);; All files(*)"));
if (Qfile_name.length() > 0) {
last_peaks_file = Qfile_name.toStdString();
......@@ -778,7 +778,7 @@ void MantidEV::getSavePeaksFileName() {
QString file_path = getFilePath(last_peaks_file);
QString Qfile_name = QFileDialog::getSaveFileName(
this, tr("Save peaks file"), file_path,
tr("Peaks Files (*.peaks *.integrate *.nxs *.h5);; All files(*.*)"), 0,
tr("Peaks Files (*.peaks *.integrate *.nxs *.h5);; All files(*)"), 0,
QFileDialog::DontConfirmOverwrite);
if (Qfile_name.length() > 0) {
......@@ -926,7 +926,7 @@ void MantidEV::getLoadUB_FileName_slot() {
QString file_path = getFilePath(last_UB_file);
QString Qfile_name =
QFileDialog::getOpenFileName(this, tr("Load matrix file"), file_path,
tr("Matrix Files (*.mat);; All files(*.*)"));
tr("Matrix Files (*.mat);; All files(*)"));
if (Qfile_name.length() > 0) {
last_UB_file = Qfile_name.toStdString();
m_uiForm.SelectUBFile_ledt->setText(Qfile_name);
......@@ -940,7 +940,7 @@ void MantidEV::getSaveUB_FileName() {
QString file_path = getFilePath(last_UB_file);
QString Qfile_name =
QFileDialog::getSaveFileName(this, tr("Save matrix file"), file_path,
tr("Matrix Files (*.mat);; All files(*.*)"));
tr("Matrix Files (*.mat);; All files(*)"));
if (Qfile_name.length() > 0) {
last_UB_file = Qfile_name.toStdString();
......@@ -1271,7 +1271,7 @@ void MantidEV::saveState_slot() {
QString file_path = getFilePath(last_ini_file);
QString Qfile_name = QFileDialog::getSaveFileName(
this, tr("Save Settings File(.ini)"), file_path,
tr("Settings Files (*.ini);; All files(*.*) "));
tr("Settings Files (*.ini);; All files(*) "));
if (Qfile_name.length() > 0) {
last_ini_file = Qfile_name.toStdString();
......@@ -1286,7 +1286,7 @@ void MantidEV::loadState_slot() {
QString file_path = getFilePath(last_ini_file);
QString Qfile_name = QFileDialog::getOpenFileName(
this, tr("Load Settings File(.ini)"), file_path,
tr("Settings Files (*.ini);; All files(*.*)"));
tr("Settings Files (*.ini);; All files(*)"));
if (Qfile_name.length() > 0) {
last_ini_file = Qfile_name.toStdString();
......
......@@ -564,7 +564,7 @@ void MuonAnalysis::runSaveGroupButton() {
QString filter;
filter.append("Files (*.xml *.XML)");
filter += ";;AllFiles (*.*)";
filter += ";;AllFiles (*)";
QString groupingFile = MantidQt::API::FileDialogHandler::getSaveFileName(
this, "Save Grouping file as", prevPath, filter);
......@@ -603,7 +603,7 @@ void MuonAnalysis::runLoadGroupButton() {
QString filter;
filter.append("Files (*.xml *.XML)");
filter += ";;AllFiles (*.*)";
filter += ";;AllFiles (*)";
QString groupingFile = QFileDialog::getOpenFileName(
this, "Load Grouping file", prevPath, filter);
if (groupingFile.isEmpty() || QFileInfo(groupingFile).isDir())
......
......@@ -1940,7 +1940,7 @@ void SANSRunWindow::saveFileBrowse() {
ConfigService::Instance().getString(
"defaultsave.directory"))).toString();
const QString filter = ";;AllFiles (*.*)";
const QString filter = ";;AllFiles (*)";
QString oFile = FileDialogHandler::getSaveFileName(
this, title, prevPath + "/" + m_uiForm.outfile_edit->text());
......@@ -1971,7 +1971,7 @@ bool SANSRunWindow::browseForFile(const QString &box_title,
if (box_text.isEmpty()) {
start_path = m_last_dir;
}
file_filter += ";;AllFiles (*.*)";
file_filter += ";;AllFiles (*)";
QString file_path =
QFileDialog::getOpenFileName(this, box_title, start_path, file_filter);
if (file_path.isEmpty() || QFileInfo(file_path).isDir())
......
......@@ -340,7 +340,7 @@ std::string ImageROIViewQtWidget::askImgOrStackPath() {
"(*.tif *.tiff);;"
"PNG, Portable Network Graphics "
"(*.png);;"
"Other extensions/all files (*.*)");
"Other extensions/all files (*)");
QString prevPath =
MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory();
QString path(QFileDialog::getExistingDirectory(
......@@ -364,7 +364,7 @@ std::string ImageROIViewQtWidget::askSingleImagePath() {
"(*.tif *.tiff);;"
"PNG, Portable Network Graphics "
"(*.png);;"
"Other extensions/all files (*.*)");
"Other extensions/all files (*)");
QString prevPath =
MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory();
QString filepath(
......
......@@ -355,7 +355,7 @@ std::string ImggFormatsConvertViewQtWidget::askImgOrStackPath() {
"(*.tif *.tiff);;"
"PNG, Portable Network Graphics "
"(*.png);;"
"Other extensions/all files (*.*)");
"Other extensions/all files (*)");
QString prevPath =
MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory();
QString path(QFileDialog::getExistingDirectory(
......
......@@ -242,7 +242,7 @@ void TomographyIfaceViewQtGUI::removeClicked() {
void TomographyIfaceViewQtGUI::menuOpenClicked() {
QString s =
QFileDialog::getOpenFileName(0, "Open file", QDir::currentPath(),
"NeXus files (*.nxs);;All files (*.*)",
"NeXus files (*.nxs);;All files (*)",
new QString("NeXus files (*.nxs)"));
std::string name = s.toStdString();
......@@ -301,7 +301,7 @@ void TomographyIfaceViewQtGUI::menuSaveClicked() {
void TomographyIfaceViewQtGUI::menuSaveAsClicked() {
QString s =
QFileDialog::getSaveFileName(0, "Save file", QDir::currentPath(),
"NeXus files (*.nxs);;All files (*.*)",
"NeXus files (*.nxs);;All files (*)",
new QString("NeXus files (*.nxs)"));
std::string name = s.toStdString();
if ("" == name)
......
......@@ -1319,7 +1319,7 @@ void TomographyIfaceViewQtGUI::browseImageClicked() {
"(*.tif *.tiff);;"
"PNG, Portable Network Graphics "
"(*.png);;"
"Other extensions/all files (*.*)");
"Other extensions/all files (*)");
// Note that this could be done using UserSubWindow::openFileDialog(),
// but that method doesn't give much control over the text used for the
// allowed extensions.
......
......@@ -186,7 +186,7 @@ std::string QDataProcessorWidget::requestNotebookPath() {
// causes problems on MacOS.
QString qfilename = API::FileDialogHandler::getSaveFileName(
this, "Save notebook file", QDir::currentPath(),
"IPython Notebook files (*.ipynb);;All files (*.*)",
"IPython Notebook files (*.ipynb);;All files (*)",
new QString("IPython Notebook files (*.ipynb)"));
// There is a Qt bug (QTBUG-27186) which means the filename returned
......
......@@ -678,7 +678,7 @@ void InstrumentWidget::saveImage(QString filename) {
QString InstrumentWidget::getSaveGroupingFilename() {
QString filename = MantidQt::API::FileDialogHandler::getSaveFileName(
this, "Save grouping file", m_savedialog_dir,
"Grouping (*.xml);;All files (*.*)");
"Grouping (*.xml);;All files (*)");
// If its empty, they cancelled the dialog
if (!filename.isEmpty()) {
......
......@@ -870,7 +870,7 @@ QString MWRunFiles::createFileFilter() {
}
}
QString allFiles("All Files (*.*)");
QString allFiles("All Files (*)");
if (!fileExts.isEmpty()) {
// The list may contain upper and lower cased versions, ensure these are on
......
......@@ -369,7 +369,7 @@ void SaveWorkspaces::saveFileBrowse() {
ConfigService::Instance().getString(
"defaultsave.directory"))).toString();
QString filter = ";;AllFiles (*.*)";
QString filter = ";;AllFiles (*)";
QFileDialog::Option userCon = m_append->isChecked()
? QFileDialog::DontConfirmOverwrite
: static_cast<QFileDialog::Option>(0);
......
......@@ -635,7 +635,7 @@ class MainWindow(QtGui.QMainWindow):
""" Open a file dialog to get file
"""
filename = QtGui.QFileDialog.getOpenFileName(self, 'Input File Dialog',
self._defaultdir, "Data (*.nxs *.dat);;All files (*.*)")
self._defaultdir, "Data (*.nxs *.dat);;All files (*)")
self.ui.lineEdit.setText(str(filename))
......
......@@ -453,7 +453,7 @@ class MainWindow(QtGui.QMainWindow):
Return :: None
"""
# Get file name
filefilter = "Text (*.txt);;Data (*.dat);;All files (*.*)"
filefilter = "Text (*.txt);;Data (*.dat);;All files (*)"
curDir = os.getcwd()
excldetfnames = QtGui.QFileDialog.getOpenFileNames(self, 'Open File(s)', curDir, filefilter)
try:
......@@ -736,7 +736,7 @@ class MainWindow(QtGui.QMainWindow):
# Apply detector efficiency correction
if vancorrfname is None:
# browse vanadium correction file
filefilter = "Text (*.txt);;Data (*.dat);;All files (*.*)"
filefilter = "Text (*.txt);;Data (*.dat);;All files (*)"
curDir = os.getcwd()
vancorrfnames = QtGui.QFileDialog.getOpenFileNames(self, 'Open File(s)', curDir, filefilter)
if len(vancorrfnames) > 0:
......@@ -1423,7 +1423,7 @@ class MainWindow(QtGui.QMainWindow):
else:
homedir = os.getcwd()
# launch a dialog to get data
filefilter = "All files (*.*);;Fullprof (*.dat);;GSAS (*.gsa)"
filefilter = "All files (*);;Fullprof (*.dat);;GSAS (*.gsa)"
sfilename = str(QtGui.QFileDialog.getSaveFileName(self, 'Save File', homedir, filefilter))
except NotImplementedError as e:
self._logError(str(e))
......
......@@ -1343,7 +1343,7 @@ class MainWindow(QtGui.QMainWindow):
num_rows = int(self.ui.lineEdit_numSurveyOutput.text())
# get the csv file
file_filter = 'CSV Files (*.csv);;All Files (*.*)'
file_filter = 'CSV Files (*.csv);;All Files (*)'
csv_file_name = str(QtGui.QFileDialog.getOpenFileName(self, 'Open Exp-Scan Survey File', self._homeDir,
file_filter))
if csv_file_name is None or len(csv_file_name) == 0:
......@@ -1932,7 +1932,7 @@ class MainWindow(QtGui.QMainWindow):
:return:
"""
# Get file name
file_filter = 'CSV Files (*.csv);;All Files (*.*)'
file_filter = 'CSV Files (*.csv);;All Files (*)'
out_file_name = str(QtGui.QFileDialog.getSaveFileName(self, 'Save scan survey result',
self._homeDir, file_filter))
......@@ -1946,7 +1946,7 @@ class MainWindow(QtGui.QMainWindow):
:return:
"""
# get file name
file_filter = 'Data Files (*.dat);;All Files (*.*)'
file_filter = 'Data Files (*.dat);;All Files (*)'
ub_file_name = str(QtGui.QFileDialog.getSaveFileName(self, 'ASCII File To Save UB Matrix', self._homeDir,
file_filter))
......@@ -2098,7 +2098,7 @@ class MainWindow(QtGui.QMainWindow):
""" Get UB matrix from an Ascii file
:return:
"""
file_filter = 'Data Files (*.dat);;Text Files (*.txt);;All Files (*.*)'
file_filter = 'Data Files (*.dat);;Text Files (*.txt);;All Files (*)'
file_name = QtGui.QFileDialog.getOpenFileName(self, 'Open UB ASCII File', self._homeDir,
file_filter)
# quit if cancelled
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment