mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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
This commit is contained in:
parent
39f7968bf5
commit
94bc289cd0
1 changed files with 11 additions and 5 deletions
|
|
@ -370,19 +370,25 @@ void RbUtilQt::updateDevice()
|
||||||
// displayed device info
|
// displayed device info
|
||||||
QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
|
QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
|
||||||
QString brand = SystemInfo::value(SystemInfo::CurBrand).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() + ")";
|
" (" + 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(name.isEmpty()) name = "<none>";
|
||||||
if(mountpoint.isEmpty()) mountpoint = "<invalid>";
|
if(mountpoint.isEmpty())
|
||||||
|
mountpoint = "<invalid>";
|
||||||
ui.labelDevice->setText(tr("<b>%1 %2</b> at <b>%3</b>")
|
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
|
// hide quickstart buttons if no release available
|
||||||
bool installable = !ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty();
|
bool installable = !ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty();
|
||||||
ui.buttonSmall->setEnabled(installable);
|
ui.buttonSmall->setEnabled(installable);
|
||||||
ui.buttonComplete->setEnabled(installable);
|
ui.buttonComplete->setEnabled(installable);
|
||||||
ui.actionSmall_Installation->setEnabled(installable);
|
ui.actionSmall_Installation->setEnabled(installable);
|
||||||
ui.actionComplete_Installation->setEnabled(installable);
|
ui.actionComplete_Installation->setEnabled(installable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue