aboutsummaryrefslogtreecommitdiff
path: root/src/app/lxdesupport.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-02-03 10:07:52 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-02-03 10:07:52 +0000
commitb25e5fab02cebed362c74c01e649e9c165641fe1 (patch)
treed7c4a2e35a43537b898e673beb286c5e23a8fa0d /src/app/lxdesupport.cpp
parent1b8b79f7e6fe7d4ab88837001baaa48fe95e0cfe (diff)
downloadqmmp-b25e5fab02cebed362c74c01e649e9c165641fe1.tar.gz
qmmp-b25e5fab02cebed362c74c01e649e9c165641fe1.tar.bz2
qmmp-b25e5fab02cebed362c74c01e649e9c165641fe1.zip
added lubuntu support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3199 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/app/lxdesupport.cpp')
-rw-r--r--src/app/lxdesupport.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/app/lxdesupport.cpp b/src/app/lxdesupport.cpp
index f1e9f318f..b1cc692ca 100644
--- a/src/app/lxdesupport.cpp
+++ b/src/app/lxdesupport.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010 by Ilya Kotov *
+ * Copyright (C) 2010-2013 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -28,13 +28,18 @@ void LXDESupport::load()
if(qgetenv("XDG_CURRENT_DESKTOP") != "LXDE")
return;
- QString conf_path = qgetenv("XDG_CONFIG_HOME");
- if(conf_path.isEmpty())
- conf_path = QDir::homePath() + "/.config";
- //conf_path.append("/lxsession/LXDE/desktop.conf");
- conf_path.append("/lxsession/Lubuntu/desktop.conf");
+ QString config_dir = qgetenv("XDG_CONFIG_HOME");
+ if(config_dir.isEmpty())
+ config_dir = QDir::homePath() + "/.config/";
- QSettings lxde_settings(conf_path, QSettings::IniFormat);
+ QString config_file = config_dir + "/lxsession/LXDE/desktop.conf";
+ if(qgetenv("DESKTOP_SESSION") == "Lubuntu")
+ {
+ qDebug("LXDESupport: using Lubuntu configuration");
+ config_file = config_dir + "/lxsession/Lubuntu/desktop.conf";
+ }
+
+ QSettings lxde_settings(config_file, QSettings::IniFormat);
QString themeName = lxde_settings.value("GTK/sNet/IconThemeName").toString();
if(!themeName.isEmpty())
QIcon::setThemeName(themeName);