summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-07-16 22:07:52 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-07-16 22:07:52 +0000
commit94bc289cd05ad3dccd8fafeeb3b725ef9a8c1446 (patch)
tree197cb98c0917e2b0f510925c9ca208007b769ecd
parent39f7968bf5c7135c0209b43e0310aa8eef74557a (diff)
downloadrockbox-94bc289cd05ad3dccd8fafeeb3b725ef9a8c1446.zip
rockbox-94bc289cd05ad3dccd8fafeeb3b725ef9a8c1446.tar.gz
rockbox-94bc289cd05ad3dccd8fafeeb3b725ef9a8c1446.tar.bz2
rockbox-94bc289cd05ad3dccd8fafeeb3b725ef9a8c1446.tar.xz
Show drive label in main dialog.
When its possible to retrieve the label of the selected mountpoint display it in the main window too. Right now this only affects Windows. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30143 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 835fb0d..ee77505 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -370,19 +370,25 @@ void RbUtilQt::updateDevice()
// displayed device info
QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
QString brand = SystemInfo::value(SystemInfo::CurBrand).toString();
- QString name = SystemInfo::value(SystemInfo::CurName).toString() +
+ QString name = SystemInfo::value(SystemInfo::CurName).toString() +
" (" + ServerInfo::value(ServerInfo::CurStatus).toString() + ")";
+ QString mountdisplay = QDir::toNativeSeparators(mountpoint);
+ QString label = Utils::filesystemName(mountpoint);
+ if(!label.isEmpty())
+ mountdisplay += " (" + label + ")";
+
if(name.isEmpty()) name = "&lt;none&gt;";
- if(mountpoint.isEmpty()) mountpoint = "&lt;invalid&gt;";
+ if(mountpoint.isEmpty())
+ mountpoint = "&lt;invalid&gt;";
ui.labelDevice->setText(tr("<b>%1 %2</b> at <b>%3</b>")
- .arg(brand, name, QDir::toNativeSeparators(mountpoint)));
-
+ .arg(brand, name, mountdisplay));
+
// hide quickstart buttons if no release available
bool installable = !ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty();
ui.buttonSmall->setEnabled(installable);
ui.buttonComplete->setEnabled(installable);
ui.actionSmall_Installation->setEnabled(installable);
- ui.actionComplete_Installation->setEnabled(installable);
+ ui.actionComplete_Installation->setEnabled(installable);
}