From 94bc289cd05ad3dccd8fafeeb3b725ef9a8c1446 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 16 Jul 2011 22:07:52 +0000 Subject: [PATCH] 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 --- rbutil/rbutilqt/rbutilqt.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 835fb0d0a2..ee77505e06 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 = "<none>"; - if(mountpoint.isEmpty()) mountpoint = "<invalid>"; + if(mountpoint.isEmpty()) + mountpoint = "<invalid>"; ui.labelDevice->setText(tr("%1 %2 at %3") - .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); }