diff options
author | rakuco <rakuco@FreeBSD.org> | 2015-04-21 19:58:32 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2015-04-21 19:58:32 +0800 |
commit | f1aeae1e4f148f3ed7e1e0dfe2b87cbb0e8a1941 (patch) | |
tree | 21d6f402c0f018fff4543e5ad3344261f377e027 /audio | |
parent | 050099a8c8c0f16a545294b855c5876ec4bbcedc (diff) | |
download | freebsd-ports-graphics-f1aeae1e4f148f3ed7e1e0dfe2b87cbb0e8a1941.tar.gz freebsd-ports-graphics-f1aeae1e4f148f3ed7e1e0dfe2b87cbb0e8a1941.tar.zst freebsd-ports-graphics-f1aeae1e4f148f3ed7e1e0dfe2b87cbb0e8a1941.zip |
Look for icons in places other than /usr/share/icons.
Incorporate upstream commit 5750:
- When checking for icon themes, also check in $PREFIX
- Also ensure path is in QIcon's theme path
This makes the port correctly find/show icons in the UI.
PR: 199549
Submitted by: Tobias Berner <tcberner@gmail.com>
MFH: 2015Q2
Diffstat (limited to 'audio')
-rw-r--r-- | audio/cantata/Makefile | 1 | ||||
-rw-r--r-- | audio/cantata/files/patch-svn-5739-gui__application_qt.cpp | 39 |
2 files changed, 40 insertions, 0 deletions
diff --git a/audio/cantata/Makefile b/audio/cantata/Makefile index ac251d22100..95e64da99bf 100644 --- a/audio/cantata/Makefile +++ b/audio/cantata/Makefile @@ -2,6 +2,7 @@ PORTNAME= cantata PORTVERSION= 1.5.1 +PORTREVISION= 1 CATEGORIES= audio kde MASTER_SITES= https://drive.google.com/uc?export=download&id=0Bzghs6gQWi60UktwaTRMTjRIUW8&dummy= diff --git a/audio/cantata/files/patch-svn-5739-gui__application_qt.cpp b/audio/cantata/files/patch-svn-5739-gui__application_qt.cpp new file mode 100644 index 00000000000..e484d62f814 --- /dev/null +++ b/audio/cantata/files/patch-svn-5739-gui__application_qt.cpp @@ -0,0 +1,39 @@ +Look for icons in more than just /usr/share -- upstream svn patch: +Log message + +- When checking for icon themes, also check in $PREFIX +- Also ensure path is in QIcon's theme path + +https://code.google.com/p/cantata/source/detail?r=5740 + + +Index: gui/application_qt.cpp +=================================================================== +--- gui/application_qt.cpp (revision 5739) ++++ gui/application_qt.cpp (working copy) +@@ -45,11 +45,21 @@ + // or gnome icon themes are installed, and set theme to one of those. + if (!QIcon::hasThemeIcon("document-save-as")) { + QStringList themes=QStringList() << QLatin1String("oxygen") << QLatin1String("gnome"); ++ QStringList prefixes=QStringList() << QLatin1String("/usr") << QLatin1String("/usr/local"); ++ if (!prefixes.contains(QLatin1String(INSTALL_PREFIX))) { ++ prefixes+=QLatin1String(INSTALL_PREFIX); ++ } + foreach (const QString &theme, themes) { +- QString dir(QLatin1String("/usr/share/icons/")+theme); +- if (QDir(dir).exists()) { +- QIcon::setThemeName(theme); +- return; ++ foreach (const QString &prefix, prefixes) { ++ QString dir(prefix+QLatin1String("/share/icons/")+theme); ++ if (QDir(dir).exists()) { ++ QIcon::setThemeName(theme); ++ // Add to theme search paths, if it is not there already... ++ if (!QIcon::themeSearchPaths().contains(prefix+QLatin1String("/share/icons"))) { ++ QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() << QString(prefix+QLatin1String("/share/icons"))); ++ } ++ return; ++ } + } + } + } |