From d23dde2b350c5d445f4262182fab97d63d66b968 Mon Sep 17 00:00:00 2001 From: william Date: Fri, 13 Mar 2015 22:12:57 +0100 Subject: add checksum for OpenBSD (this is in fact a copy of the code from freeBSD) --- libLumina/LuminaOS-OpenBSD.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'libLumina') diff --git a/libLumina/LuminaOS-OpenBSD.cpp b/libLumina/LuminaOS-OpenBSD.cpp index 7cf6c571..b6996795 100644 --- a/libLumina/LuminaOS-OpenBSD.cpp +++ b/libLumina/LuminaOS-OpenBSD.cpp @@ -192,6 +192,19 @@ int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining //File Checksums QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the input file - return QStringList(); + //on OpenBSD md5 has the following layout + //>md5 LuminaThemes.o LuminaUtils.o + //MD5 (LuminaThemes.o) = 50006505d9d7e54e5154eeb095555055 + //MD5 (LuminaUtils.o) = d490878ee8866e55e5af571b98b4d448 + + QStringList info = LUtils::getCmdOutput("md5 \""+filepaths.join("\" \"")+"\""); + for(int i=0; i Date: Sat, 14 Mar 2015 09:11:34 -0400 Subject: Add a new favoriting system to the Lumina Utils library. This should make things easier to add/change as necessary in the future (not tied into any of the display classes yet). --- libLumina/LuminaUtils.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ libLumina/LuminaUtils.h | 10 ++++++++++ 2 files changed, 54 insertions(+) (limited to 'libLumina') diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp index 9b8a1860..f7f5db74 100644 --- a/libLumina/LuminaUtils.cpp +++ b/libLumina/LuminaUtils.cpp @@ -144,6 +144,50 @@ void LUtils::LoadTranslation(QApplication *app, QString appname){ QTextCodec::setCodecForLocale( QTextCodec::codecForName(langEnc.toUtf8()) ); } +QStringList LUtils::listFavorites(){ + QStringList fav = LUtils::readFile(QDir::homePath()+"/.lumina/favorites/fav.list"); + return fav; +} + +bool LUtils::saveFavorites(QStringList list){ + return LUtils::writeFile(QDir::homePath()+"/.lumina/favorites/fav.list", list, true); +} + +bool LUtils::isFavorite(QString path){ + QStringList fav = LUtils::listFavorites(); + for(int i=0; i::::[dir/file/app]::::" + // the field might not be used for "app" flagged entries + static QStringList listFavorites(); + static bool saveFavorites(QStringList); + static bool isFavorite(QString path); + static bool addFavorite(QString path, QString name = ""); + static void removeFavorite(QString path); + //Load the default setup for the system static void LoadSystemDefaults(bool skipOS = false); -- cgit