aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-11-14 00:04:49 +0000
committerWeblate <noreply@weblate.org>2017-11-14 00:04:49 +0000
commitdc40a01ae695b47f87daff7ee08f3519d79b12ae (patch)
tree6e1d58f23d4537f8f501ba7e531f9ed90f269dda /src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
parentTranslated using Weblate (German) (diff)
parentAdd a special rule for Ubuntu Linux: (diff)
downloadlumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.tar.gz
lumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.tar.bz2
lumina-dc40a01ae695b47f87daff7ee08f3519d79b12ae.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp')
-rw-r--r--src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
index b9346565..29a58ec9 100644
--- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
@@ -27,12 +27,12 @@ QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system
QString LOS::ControlPanelShortcut(){ return "/usr/local/share/applications/pccontrol.desktop"; } //system control panel
QString LOS::AppStoreShortcut(){ return "/usr/local/share/applications/appcafe.desktop"; } //graphical app/pkg manager
//OS-specific RSS feeds (Format: QStringList[ <name>::::<url> ]; )
-QStringList LOS::RSSFeeds(){
+QStringList LOS::RSSFeeds(){
QStringList feeds;
feeds << "FreeBSD News Feed::::https://www.freebsd.org/news/rss.xml";
feeds << "TrueOS News Feed::::http://www.trueos.org/?feed=rss2";
return feeds;
- }
+ }
// ==== ExternalDevicePaths() ====
QStringList LOS::ExternalDevicePaths(){
@@ -59,6 +59,25 @@ QStringList LOS::ExternalDevicePaths(){
i--;
}
}
+ //Also add info about anything in the "/media" directory
+ QDir media("/media");
+ QFileInfoList list = media.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot, QDir::Type | QDir::Name);
+ //qDebug() << "Media files found:" << list.length();
+ for(int i=0; i<list.length(); i++){
+ //qDebug() << "Found media entry:" << list[i].fileName();
+ if(list[i].isDir()){
+ devs << "UNKNOWN::::::::/media/"+list[i].fileName();
+ }else if(list[i].fileName().endsWith(".desktop")){
+ QString type = list[i].fileName().section(".desktop",0,-2);
+ //Determine the type of hardware device based on the dev node
+ if(type.startsWith("da")){ type = "USB"; }
+ else if(type.startsWith("ada")){ type = "HDRIVE"; }
+ else if(type.startsWith("mmsd")){ type = "SDCARD"; }
+ else if(type.startsWith("cd")||type.startsWith("acd")){ type="DVD"; }
+ else{ type = "UNKNOWN"; }
+ devs << type+"::::::::/media/"+list[i].fileName();
+ }
+ }
return devs;
}
bgstack15