diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-05-22 09:26:03 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-05-22 09:26:03 +0000 |
| commit | a2dcaad375ae8604e60af231532596b30cea746d (patch) | |
| tree | 2ee12e4f750e3e237d9f013e8c7a2cfb3f819968 /src/app | |
| parent | 69af8f03c207149a26a2785c49c50ee62512faa8 (diff) | |
| download | qmmp-a2dcaad375ae8604e60af231532596b30cea746d.tar.gz qmmp-a2dcaad375ae8604e60af231532596b30cea746d.tar.bz2 qmmp-a2dcaad375ae8604e60af231532596b30cea746d.zip | |
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
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/qmmpstarter.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
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 |
