From a2dcaad375ae8604e60af231532596b30cea746d Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 22 May 2015 09:26:03 +0000 Subject: added XDG_DATA_HOME support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4985 90c681e8-e032-0410-971d-27865f9a5e38 --- src/app/qmmpstarter.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/app') diff --git a/src/app/qmmpstarter.cpp b/src/app/qmmpstarter.cpp index 0fc8a7dc0..0b9a51b8d 100644 --- a/src/app/qmmpstarter.cpp +++ b/src/app/qmmpstarter.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2014 by Ilya Kotov * + * Copyright (C) 2006-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -167,11 +167,21 @@ void QMMPStarter::startPlayer() connect(m_server, SIGNAL(newConnection()), SLOT(readCommand())); QStringList args = argString.split("\n", QString::SkipEmptyParts); - //load lxde icons - LXDESupport::load(); #ifdef Q_OS_WIN QIcon::setThemeSearchPaths(QStringList() << qApp->applicationDirPath() + "/themes/"); QIcon::setThemeName("oxygen"); +#else + //add extra theme path; + QStringList theme_paths = QIcon::themeSearchPaths(); + QString share_path = qgetenv("XDG_DATA_HOME"); + if(share_path.isEmpty()) + share_path = QDir::homePath() + "/.local/share"; + theme_paths << share_path + "/icons"; + theme_paths.removeDuplicates(); + QIcon::setThemeSearchPaths(theme_paths); + + //load lxde icons + LXDESupport::load(); #endif //prepare libqmmp and libqmmpui libraries for usage -- cgit v1.2.3-13-gbd6f