diff options
author | Ken Moore <ken@pcbsd.org> | 2015-04-27 16:28:58 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-04-27 16:28:58 -0400 |
commit | 70fff959f4cb8fe4b0aa4dcbbb674237120fc63c (patch) | |
tree | bc1b1e42701f254c48076b3b6cca080d8a170d84 /lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp | |
parent | have lumina-fm use the new favorites system for checking if a file is a favor... (diff) | |
download | lumina-70fff959f4cb8fe4b0aa4dcbbb674237120fc63c.tar.gz lumina-70fff959f4cb8fe4b0aa4dcbbb674237120fc63c.tar.bz2 lumina-70fff959f4cb8fe4b0aa4dcbbb674237120fc63c.zip |
Oops, forgot to change over the userbutton to use the new favorites system for creating/removing favorites.
Diffstat (limited to 'lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp | 6 |
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(); } } |