summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-05-01 10:46:10 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-05-01 10:49:48 +0200
commit9b363c6cedc31f135e831a1b57dcf08578d34ee7 (patch)
treeb44848b9a47d8a46d9b587866e292f97d67e6e97 /rbutil/rbutilqt/rbutilqt.cpp
parent92ef7bd3289a5c4d15bd0de6fb8950af4036891b (diff)
downloadrockbox-9b363c6cedc31f135e831a1b57dcf08578d34ee7.tar.gz
rockbox-9b363c6cedc31f135e831a1b57dcf08578d34ee7.tar.bz2
rockbox-9b363c6cedc31f135e831a1b57dcf08578d34ee7.zip
Bootloader installation: set file filter.
When requesting an original firmware file from the user set the filter for the file chooser dialog to only show files with matching file extension to simplify selection. Allow the user to select "all files" in case the file for whatever reason has the wrong extension. Change-Id: Ic3643c3601f6d849e6563f8753ae80a168ec0a45
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 683f17c0af..5c496585ec 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -760,8 +760,14 @@ void RbUtilQt::installBootloader()
}
// open dialog to browse to of file
QString offile;
+ QString filter
+ = SystemInfo::value(SystemInfo::CurBootloaderFilter).toString();
+ if(!filter.isEmpty()) {
+ filter = tr("Bootloader files (%1)").arg(filter) + ";;";
+ }
+ filter += tr("All files (*)");
offile = QFileDialog::getOpenFileName(this,
- tr("Select firmware file"), QDir::homePath());
+ tr("Select firmware file"), QDir::homePath(), filter);
if(!QFileInfo(offile).isReadable()) {
logger->addItem(tr("Error opening firmware file"), LOGERROR);
logger->setFinished();