aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-11-07 13:52:20 -0500
committerKen Moore <ken@ixsystems.com>2016-11-07 13:52:20 -0500
commit7ab900e41f5f15adccd573d459a80fe60cf6a044 (patch)
tree6effe3593f7b9f942fe7aaf5626ebe039262af3b /src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
parentConvert the ResizeMenu class into it's own files: (diff)
downloadlumina-7ab900e41f5f15adccd573d459a80fe60cf6a044.tar.gz
lumina-7ab900e41f5f15adccd573d459a80fe60cf6a044.tar.bz2
lumina-7ab900e41f5f15adccd573d459a80fe60cf6a044.zip
LARGE UPDATE:
1) Dismantle the Lumina library completely. 2) Setup lots of small subproject files (.pri) for the individual classes within the old library. 3) Move all the Lumina binaries to use the new subproject files 4) Split up the LuminaUtils class/files into LUtils and LDesktopUtils (generic utilities, and desktop-specific utilities)
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
index a1dfe956..8d7dab7a 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserItemWidget.cpp
@@ -5,7 +5,8 @@
// See the LICENSE file for full details
//===========================================
#include "UserItemWidget.h"
-#include <LuminaUtils.h>
+#include <LUtils.h>
+#include <LDesktopUtils.h>
#include <QMenu>
#define TEXTCUTOFF 165
@@ -50,7 +51,7 @@ UserItemWidget::UserItemWidget(QWidget *parent, QString itemPath, QString type,
icon->setWhatsThis(itemPath);
if(!goback){ this->setWhatsThis(name->text()); }
isDirectory = (type=="dir"); //save this for later
- if(LUtils::isFavorite(itemPath)){
+ if(LDesktopUtils::isFavorite(itemPath)){
linkPath = itemPath;
isShortcut=true;
}else if( inHome ){//|| itemPath.section("/",0,-2)==QDir::homePath()+"/Desktop" ){
@@ -66,7 +67,7 @@ UserItemWidget::UserItemWidget(QWidget *parent, XDGDesktop *item) : QFrame(paren
if(item==0){ return; }
createWidget();
isDirectory = false;
- if(LUtils::isFavorite(item->filePath)){
+ if(LDesktopUtils::isFavorite(item->filePath)){
linkPath = item->filePath;
isShortcut=true;
}else if( item->filePath.section("/",0,-2)==QDir::homePath()+"/Desktop" ){
@@ -171,7 +172,7 @@ void UserItemWidget::setupActions(XDGDesktop *app){
void UserItemWidget::buttonClicked(){
button->setVisible(false);
if(button->whatsThis()=="add"){
- LUtils::addFavorite(icon->whatsThis());
+ LDesktopUtils::addFavorite(icon->whatsThis());
//QFile::link(icon->whatsThis(), QDir::homePath()+"/.lumina/favorites/"+icon->whatsThis().section("/",-1) );
emit NewShortcut();
}else if(button->whatsThis()=="remove"){
@@ -184,7 +185,7 @@ void UserItemWidget::buttonClicked(){
}
//Don't emit the RemovedShortcut signal here - the automatic ~/Desktop watcher will see the change when finished
}else{
- LUtils::removeFavorite(icon->whatsThis()); //This is a favorite
+ LDesktopUtils::removeFavorite(icon->whatsThis()); //This is a favorite
emit RemovedShortcut();
}
}
bgstack15