aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/LSession.cpp12
-rw-r--r--src-qt5/core/lumina-desktop/LSession.h31
-rw-r--r--src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf2
-rw-r--r--src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf2
-rw-r--r--src-qt5/core/lumina-desktop/main.cpp1
5 files changed, 27 insertions, 21 deletions
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp
index 2a1ec783..d1d6588e 100644
--- a/src-qt5/core/lumina-desktop/LSession.cpp
+++ b/src-qt5/core/lumina-desktop/LSession.cpp
@@ -120,7 +120,7 @@ void LSession::setupSession(){
//Setup the user's lumina settings directory as necessary
splash.showScreen("user");
if(DEBUG){ qDebug() << " - Init User Files:" << timer->elapsed();}
- checkUserFiles(); //adds these files to the watcher as well
+ //checkUserFiles(); //adds these files to the watcher as well
//Initialize the internal variables
DESKTOPS.clear();
@@ -387,11 +387,15 @@ void LSession::checkWindowGeoms(){
void LSession::checkUserFiles(){
//internal version conversion examples:
// [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001]
- QString OVS = sessionsettings->value("DesktopVersion","0").toString(); //Old Version String
- bool changed = LDesktopUtils::checkUserFiles(OVS);
+ QSettings sset("lumina-desktop", "sessionsettings");
+ QString OVS = sset.value("DesktopVersion","0").toString(); //Old Version String
+ char *tmp;
+ int tmpN = 0;
+ QApplication A(tmpN, &tmp);
+ bool changed = LDesktopUtils::checkUserFiles(OVS, LDesktopUtils::LuminaDesktopVersion());
if(changed){
//Save the current version of the session to the settings file (for next time)
- sessionsettings->setValue("DesktopVersion", this->applicationVersion());
+ sset.setValue("DesktopVersion", LDesktopUtils::LuminaDesktopVersion());
}
}
diff --git a/src-qt5/core/lumina-desktop/LSession.h b/src-qt5/core/lumina-desktop/LSession.h
index 0d69df84..43cddac7 100644
--- a/src-qt5/core/lumina-desktop/LSession.h
+++ b/src-qt5/core/lumina-desktop/LSession.h
@@ -39,7 +39,7 @@
#define SYSTEM_TRAY_CANCEL_MESSAGE 2
/*class MenuProxyStyle : public QProxyStyle{
-public:
+public:
int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const{
if(metric==PM_SmallIconSize){ return 22; } //override QMenu icon size (make it larger)
else{ return QProxyStyle::pixelMetric(metric, option, widget); } //use the current style for everything else
@@ -51,6 +51,8 @@ class LSession : public LSingleApplication{
public:
LSession(int &argc, char **argv);
~LSession();
+
+ static void checkUserFiles();
//Functions to be called during startup
void setupSession();
@@ -63,7 +65,7 @@ public:
bool registerStartButton(QString ID);
void unregisterStartButton(QString ID);
- //Special functions for XCB event filter parsing only
+ //Special functions for XCB event filter parsing only
// (DO NOT USE MANUALLY)
void RootSizeChange();
void WindowPropertyEvent();
@@ -73,37 +75,37 @@ public:
void WindowConfigureEvent(WId);
void WindowDamageEvent(WId);
void WindowSelectionClearEvent(WId);
-
+
//System Access
//Return a pointer to the current session
static LSession* handle(){
return static_cast<LSession*>(LSession::instance());
}
-
+
static void LaunchApplication(QString cmd);
QFileInfoList DesktopFiles();
-
+
QRect screenGeom(int num);
-
+
AppMenu* applicationMenu();
void systemWindow();
SettingsMenu* settingsMenu();
LXCB *XCB; //class for XCB usage
-
+
QSettings* sessionSettings();
QSettings* DesktopPluginSettings();
-
+
//Keep track of which non-desktop window should be treated as active
WId activeWindow(); //This will return the last active window if a desktop element is currently active
-
+
//Temporarily change the session locale (nothing saved between sessions)
void switchLocale(QString localeCode);
-
+
//Play System Audio
void playAudioFile(QString filepath);
//Window Adjustment Routine (due to Fluxbox not respecting _NET_WM_STRUT)
void adjustWindowGeom(WId win, bool maximize = false);
-
+
private:
//WMProcess *WM;
QList<LDesktop*> DESKTOPS;
@@ -136,9 +138,9 @@ private:
QFileInfoList desktopFiles;
void CleanupSession();
-
+
int VersionStringToNumber(QString version);
-
+
public slots:
void StartLogout();
void StartShutdown(bool skipupdates = false);
@@ -161,7 +163,6 @@ private slots:
void removeTrayWindow(WId);
//Internal simplification functions
- void checkUserFiles();
void refreshWindowManager();
void updateDesktops();
void registerDesktopWindows();
@@ -189,7 +190,7 @@ signals:
void DesktopFilesChanged();
void MediaFilesChanged();
void WorkspaceChanged();
-
+
};
#endif
diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf
index e453c0b8..e9520a3c 100644
--- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf
+++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf
@@ -53,7 +53,7 @@ mime_default_application/x-tar_ifexists=lumina-archiver.desktop
#THEME SETTINGS
theme_themefile=DarkGlass #Name of the theme to use (disable for Lumina-Default)
-theme_colorfile=Black #Name of the color spec file to use for theming
+theme_colorfile=darker #Name of the color spec file to use for theming
theme_iconset=material-design-dark #Name of the icon theme to use
theme_font=Noto Sans #Name of the font family to use
theme_fontsize=10pt #Default size of the fonts to use on the desktop (can also use a percentage of the screen height (<number>%) )
diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
index 1327f148..40ece4f0 100644
--- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
+++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
@@ -51,7 +51,7 @@ mime_default_application/x-shellscript=lumina-textedit.desktop
#THEME SETTINGS
theme_themefile=DarkGlass #Name of the theme to use (disable for Lumina-Default)
-theme_colorfile=Black #Name of the color spec file to use for theming
+theme_colorfile=darker #Name of the color spec file to use for theming
theme_iconset=material-design-dark #Name of the icon theme to use
theme_font=Arial #Name of the font family to use
theme_fontsize=10pt #Default size of the fonts to use on the desktop (can also use a percentage of the screen height (<number>%) )
diff --git a/src-qt5/core/lumina-desktop/main.cpp b/src-qt5/core/lumina-desktop/main.cpp
index b2bfa9be..c272f263 100644
--- a/src-qt5/core/lumina-desktop/main.cpp
+++ b/src-qt5/core/lumina-desktop/main.cpp
@@ -76,6 +76,7 @@ int main(int argc, char ** argv)
setenv("QT_QPA_PLATFORMTHEME", "lthemeengine", 1);
unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR"); //causes pixel-specific scaling issues with the desktop - turn this on after-the-fact for other apps
//Startup the session
+ LSession::checkUserFiles(); //make sure to create any config files before creating the QApplication
LSession a(argc, argv);
if(!a.isPrimaryProcess()){ return 0; }
//Setup the log file
bgstack15