From 70fff959f4cb8fe4b0aa4dcbbb674237120fc63c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 27 Apr 2015 16:28:58 -0400 Subject: Oops, forgot to change over the userbutton to use the new favorites system for creating/removing favorites. --- lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp | 6 ++++-- 1 file 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(); } } -- cgit