aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/panel-plugins')
-rw-r--r--lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
index 5a6a9f09..ad1c2fd6 100644
--- a/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
+++ b/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
@@ -123,10 +123,12 @@ void UserItemWidget::setupButton(bool disable){
void UserItemWidget::buttonClicked(){
button->setVisible(false);
if(button->whatsThis()=="add"){
- QFile::link(icon->whatsThis(), QDir::homePath()+"/.lumina/favorites/"+icon->whatsThis().section("/",-1) );
+ LUtils::addFavorite(icon->whatsThis());
+ //QFile::link(icon->whatsThis(), QDir::homePath()+"/.lumina/favorites/"+icon->whatsThis().section("/",-1) );
emit NewShortcut();
}else if(button->whatsThis()=="remove"){
- QFile::remove(icon->whatsThis()); //never remove the linkPath - since that is the actual file/dir
+ if(linkPath.isEmpty()){ QFile::remove(icon->whatsThis()); } //This is a desktop file
+ else{ LUtils::removeFavorite(icon->whatsThis()); } //This is a favorite
emit RemovedShortcut();
}
}
bgstack15