aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-07 19:00:48 -0400
committerKen Moore <moorekou@gmail.com>2015-10-07 19:00:48 -0400
commitea4b9a926e3772eccddcee0c937120c15744967e (patch)
tree800fb36fa796bb3ffbffd4dbfd8561139c0cffe5
parentAnother batch of small fixes: (diff)
downloadlumina-ea4b9a926e3772eccddcee0c937120c15744967e.tar.gz
lumina-ea4b9a926e3772eccddcee0c937120c15744967e.tar.bz2
lumina-ea4b9a926e3772eccddcee0c937120c15744967e.zip
Make sure that the user's local icon heirarchy is added to the fallback icon search paths (needed for wine apps in particular - since they are installed as user).
-rw-r--r--libLumina/LuminaXDG.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp
index 3fe533a5..f4eeb681 100644
--- a/libLumina/LuminaXDG.cpp
+++ b/libLumina/LuminaXDG.cpp
@@ -573,7 +573,10 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
if(DEBUG){ qDebug() << "[LXDG] Icon search paths:" << paths; }
//Finding an icon from the current theme is already built into Qt, just use it
QString cTheme = QIcon::themeName();
- if(cTheme.isEmpty()){ QIcon::setThemeName("oxygen"); } //set the XDG default theme
+ if(cTheme.isEmpty()){
+ QIcon::setThemeName("oxygen");
+ cTheme = "oxygen";
+ }
if(DEBUG){ qDebug() << "[LXDG] Current theme:" << cTheme; }
//Try to load the icon from the current theme
QIcon ico = QIcon::fromTheme(iconName);
@@ -588,8 +591,9 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
//Fallback on a manual search over the default theme directories (hicolor, then oxygen)
if( QDir::searchPaths("fallbackicons").isEmpty() ){
//Set the fallback search paths
- QString localbase = LOS::AppPrefix()+"share/icons/";
- QDir::setSearchPaths("fallbackicons", QStringList() << getChildIconDirs(localbase+"hicolor") << getChildIconDirs(localbase+"oxygen") );
+ QString sysbase = LOS::AppPrefix()+"share/icons/";
+ QString localbase = QDir::homePath()+"/.local/share/icons/";
+ QDir::setSearchPaths("fallbackicons", QStringList() << getChildIconDirs(localbase+"hicolor") << getChildIconDirs(localbase+"oxygen") << getChildIconDirs(sysbase+"hicolor") << getChildIconDirs(sysbase+"oxygen") );
}
if(QFile::exists("fallbackicons:"+iconName+".png")){
ico = QIcon("fallbackicons:"+iconName+".png");
bgstack15