Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Apr 2015 11:58:33 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r384421 - in head/audio/cantata: . files
Message-ID:  <201504211158.t3LBwXU5068588@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Tue Apr 21 11:58:32 2015
New Revision: 384421
URL: https://svnweb.freebsd.org/changeset/ports/384421

Log:
  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

Added:
  head/audio/cantata/files/patch-svn-5739-gui__application_qt.cpp   (contents, props changed)
Modified:
  head/audio/cantata/Makefile

Modified: head/audio/cantata/Makefile
==============================================================================
--- head/audio/cantata/Makefile	Tue Apr 21 10:42:08 2015	(r384420)
+++ head/audio/cantata/Makefile	Tue Apr 21 11:58:32 2015	(r384421)
@@ -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=
 

Added: head/audio/cantata/files/patch-svn-5739-gui__application_qt.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/cantata/files/patch-svn-5739-gui__application_qt.cpp	Tue Apr 21 11:58:32 2015	(r384421)
@@ -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;
++                }
+             }
+         }
+     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504211158.t3LBwXU5068588>