aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/MainUI.cpp
diff options
context:
space:
mode:
authorChristopher Roy Bratusek <nano@jpberlin.de>2015-01-23 23:38:33 +0100
committerChristopher Roy Bratusek <nano@jpberlin.de>2015-01-23 23:38:33 +0100
commit1c18c6b1b6e36f54bb3f24a84c196d5c5fc18750 (patch)
tree8426ac9c9468633c55d59aa5f314cee7a2fc6487 /lumina-fm/MainUI.cpp
parentfix device detection in generic LuminaOS-Linux (diff)
downloadlumina-1c18c6b1b6e36f54bb3f24a84c196d5c5fc18750.tar.gz
lumina-1c18c6b1b6e36f54bb3f24a84c196d5c5fc18750.tar.bz2
lumina-1c18c6b1b6e36f54bb3f24a84c196d5c5fc18750.zip
better device labeling in lumina-fm
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r--lumina-fm/MainUI.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index 289f2bb5..88ffb22f 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -306,6 +306,7 @@ void MainUI::RebuildDeviceMenu(){
ui->menuExternal_Devices->addSeparator();
//Scan for externally mounted devices
QStringList devs = LOS::ExternalDevicePaths();
+ QString label;
//Output Format: <type>::::<filesystem>::::<path> (6/24/14 - version 0.4.0 )
// <type> = [USB, HDRIVE, SDCARD, DVD, UNKNOWN]
@@ -314,8 +315,13 @@ void MainUI::RebuildDeviceMenu(){
//Skip hidden mount points (usually only for system usage - not user browsing)
if(devs[i].section("::::",2,2).section("/",-1).startsWith(".")){ continue; }
//Create entry for this device
- QAction *act = new QAction(devs[i].section("::::",2,2).section("/",-1),this);
- act->setWhatsThis(devs[i].section("::::",2,2)); //full path to mountpoint
+ if(devs[i].section("::::",2,2).section("/",-1).isEmpty()) {
+ label = "root";
+ } else {
+ label = devs[i].section("::::",2,2).section("/",-1);
+ }
+ label = label + " (type: " + devs[i].section("::::",1,1) + ")";
+ QAction *act = new QAction(label,this); act->setWhatsThis(devs[i].section("::::",2,2)); //full path to mountpoint
act->setToolTip( QString(tr("Filesystem: %1")).arg( devs[i].section("::::",1,1) ) );
//Now set the appropriate icon
QString type = devs[i].section("::::",0,0);
bgstack15