From b25e5fab02cebed362c74c01e649e9c165641fe1 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 3 Feb 2013 10:07:52 +0000 Subject: added lubuntu support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3199 90c681e8-e032-0410-971d-27865f9a5e38 --- src/app/lxdesupport.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/app/lxdesupport.cpp') 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); -- cgit v1.2.3-13-gbd6f