aboutsummaryrefslogtreecommitdiff
path: root/libLumina
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-01-28 11:07:02 -0500
committerKen Moore <ken@pcbsd.org>2015-01-28 11:07:02 -0500
commite358495c0790a23ff133b24591587af30b1d03b8 (patch)
treeda44ea3c69ae963c451f19ff3c6f5b23cb96c4c7 /libLumina
parentMake sure to convert any tab characters into spaces before parsing the output... (diff)
downloadlumina-e358495c0790a23ff133b24591587af30b1d03b8.tar.gz
lumina-e358495c0790a23ff133b24591587af30b1d03b8.tar.bz2
lumina-e358495c0790a23ff133b24591587af30b1d03b8.zip
Add a new function to all LuminaOS files: OSName()
This just returns the name of the OS template used within the library. (No action required for OS-specific maintainers, already handled for all templates).
Diffstat (limited to 'libLumina')
-rw-r--r--libLumina/LuminaOS-Debian.cpp2
-rw-r--r--libLumina/LuminaOS-DragonFly.cpp2
-rw-r--r--libLumina/LuminaOS-FreeBSD.cpp1
-rw-r--r--libLumina/LuminaOS-Linux.cpp2
-rw-r--r--libLumina/LuminaOS-OpenBSD.cpp1
-rw-r--r--libLumina/LuminaOS-kFreeBSD.cpp2
-rw-r--r--libLumina/LuminaOS-template.cpp2
-rw-r--r--libLumina/LuminaOS.h3
8 files changed, 15 insertions, 0 deletions
diff --git a/libLumina/LuminaOS-Debian.cpp b/libLumina/LuminaOS-Debian.cpp
index 0ba367e2..53461022 100644
--- a/libLumina/LuminaOS-Debian.cpp
+++ b/libLumina/LuminaOS-Debian.cpp
@@ -13,6 +13,8 @@
//can't read xbrightness settings - assume invalid until set
static int screenbrightness = -1;
+QString LOS::OSName(){ return "Debian"; }
+
//OS-specific prefix(s)
QString LOS::AppPrefix(){ return "/usr/"; } //Prefix for applications
QString LOS::SysPrefix(){ return "/"; } //Prefix for system
diff --git a/libLumina/LuminaOS-DragonFly.cpp b/libLumina/LuminaOS-DragonFly.cpp
index 6d59f0d7..dd9320fc 100644
--- a/libLumina/LuminaOS-DragonFly.cpp
+++ b/libLumina/LuminaOS-DragonFly.cpp
@@ -11,6 +11,8 @@
//can't read xbrightness settings - assume invalid until set
static int screenbrightness = -1;
+QString LOS::OSName(){ return "DragonFly BSD"; }
+
//OS-specific prefix(s)
QString LOS::AppPrefix(){ return "/usr/local/"; } //Prefix for applications
QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system
diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp
index 03fd2630..8b395026 100644
--- a/libLumina/LuminaOS-FreeBSD.cpp
+++ b/libLumina/LuminaOS-FreeBSD.cpp
@@ -11,6 +11,7 @@
//can't read xbrightness settings - assume invalid until set
static int screenbrightness = -1;
+QString LOS::OSName(){ return "FreeBSD"; }
//OS-specific prefix(s)
QString LOS::AppPrefix(){ return "/usr/local/"; } //Prefix for applications
diff --git a/libLumina/LuminaOS-Linux.cpp b/libLumina/LuminaOS-Linux.cpp
index aaf781fb..f0f427f4 100644
--- a/libLumina/LuminaOS-Linux.cpp
+++ b/libLumina/LuminaOS-Linux.cpp
@@ -13,6 +13,8 @@
//can't read xbrightness settings - assume invalid until set
static int screenbrightness = -1;
+QString LOS::OSName(){ return "Linux"; }
+
//OS-specific prefix(s)
QString LOS::AppPrefix(){ return "/usr/"; } //Prefix for applications
QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system
diff --git a/libLumina/LuminaOS-OpenBSD.cpp b/libLumina/LuminaOS-OpenBSD.cpp
index a4d3a64b..ffc21fa4 100644
--- a/libLumina/LuminaOS-OpenBSD.cpp
+++ b/libLumina/LuminaOS-OpenBSD.cpp
@@ -12,6 +12,7 @@
//can't read xbrightness settings - assume invalid until set
static int screenbrightness = -1;
+QString LOS::OSName(){ return "OpenBSD"; }
//OS-specific prefix(s)
QString LOS::AppPrefix(){ return "/usr/local/"; } //Prefix for applications
diff --git a/libLumina/LuminaOS-kFreeBSD.cpp b/libLumina/LuminaOS-kFreeBSD.cpp
index 7a5f783e..ab9f9827 100644
--- a/libLumina/LuminaOS-kFreeBSD.cpp
+++ b/libLumina/LuminaOS-kFreeBSD.cpp
@@ -17,6 +17,8 @@
//can't read xbrightness settings - assume invalid until set
static int screenbrightness = -1;
+QString LOS::OSName(){ return "Debian GNU/kFreeBSD"; }
+
//OS-specific prefix(s)
QString LOS::AppPrefix(){ return "/usr/"; } //Prefix for applications
QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system
diff --git a/libLumina/LuminaOS-template.cpp b/libLumina/LuminaOS-template.cpp
index b975d5a1..d481984f 100644
--- a/libLumina/LuminaOS-template.cpp
+++ b/libLumina/LuminaOS-template.cpp
@@ -9,6 +9,8 @@
#include <unistd.h>
#include <stdio.h> // Needed for BUFSIZ
+QString LOS::OSName(){ return "Sample"; }
+
//OS-specific prefix(s)
QString LOS::AppPrefix(){ return "/usr/local/"; } //Prefix for applications
QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system
diff --git a/libLumina/LuminaOS.h b/libLumina/LuminaOS.h
index 7bf0e923..e0eb2895 100644
--- a/libLumina/LuminaOS.h
+++ b/libLumina/LuminaOS.h
@@ -31,6 +31,9 @@
class LOS{
public:
+ //Return the name of the OS being used
+ static QString OSName();
+
//OS-specific prefix(s)
static QString LuminaShare(){ return (PREFIX+"/share/Lumina-DE/"); } //Install dir for Lumina share files
static QString AppPrefix(); //Prefix for applications (/usr/local/ on FreeBSD)
bgstack15