aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-07-19 13:28:02 -0400
committerKen Moore <moorekou@gmail.com>2016-07-19 13:28:02 -0400
commit83312d8fed3c1fb9163b0770783d5fd3b672046d (patch)
tree647e5c11d297a33c6271938e121353ffacc5f094 /src-qt5/core/lumina-desktop
parentAdd an "enableCompositing" flag to the sessionsettings.conf file which determ... (diff)
downloadlumina-83312d8fed3c1fb9163b0770783d5fd3b672046d.tar.gz
lumina-83312d8fed3c1fb9163b0770783d5fd3b672046d.tar.bz2
lumina-83312d8fed3c1fb9163b0770783d5fd3b672046d.zip
Ensure that Desktop files which are symlinks to known favorites do not show up as duplicates within the "favorites" tab in the user menu.
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp
index c3cdc50d..32193643 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp
@@ -235,14 +235,14 @@ void UserWidget::updateFavItems(bool newfilter){
if(ui->tool_fav_apps->isChecked()){
favitems = favs.filter("::::app::::");
for(int i=0; i<homefiles.length(); i++){
- if(homefiles[i].fileName().endsWith(".desktop")){
+ if(homefiles[i].fileName().endsWith(".desktop") && favitems.filter(homefiles[i].canonicalFilePath()).isEmpty() ){
favitems << homefiles[i].fileName()+"::::app-home::::"+homefiles[i].absoluteFilePath();
}
}
}else if(ui->tool_fav_dirs->isChecked()){
favitems = favs.filter("::::dir::::");
for(int i=0; i<homefiles.length(); i++){
- if(homefiles[i].isDir()){
+ if(homefiles[i].isDir() && favitems.filter(homefiles[i].canonicalFilePath()).isEmpty() ){
favitems << homefiles[i].fileName()+"::::dir-home::::"+homefiles[i].absoluteFilePath();
}
}
@@ -255,7 +255,7 @@ void UserWidget::updateFavItems(bool newfilter){
}
}
for(int i=0; i<homefiles.length(); i++){
- if(!homefiles[i].isDir() && !homefiles[i].fileName().endsWith(".desktop") ){
+ if(!homefiles[i].isDir() && !homefiles[i].fileName().endsWith(".desktop") && favitems.filter(homefiles[i].canonicalFilePath()).isEmpty() ){
favitems << homefiles[i].fileName()+"::::"+LXDG::findAppMimeForFile(homefiles[i].fileName())+"-home::::"+homefiles[i].absoluteFilePath();
}
}
bgstack15