aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/LDesktop.cpp2
-rw-r--r--lumina-desktop/LDesktopPluginSpace.cpp2
-rw-r--r--lumina-desktop/LDesktopPluginSpace.h12
-rw-r--r--lumina-desktop/LPanel.cpp16
-rw-r--r--lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp1
5 files changed, 21 insertions, 12 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp
index a1aaac67..8204de29 100644
--- a/lumina-desktop/LDesktop.cpp
+++ b/lumina-desktop/LDesktop.cpp
@@ -224,7 +224,7 @@ void LDesktop::InitDesktop(){
connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu(const QPoint&)) );
if(DEBUG){ qDebug() << "Create bgDesktop"; }
bgDesktop = new LDesktopPluginSpace(bgWindow); //new QMdiArea(bgWindow);
- bgDesktop->SetIconSize(qRound(bgDesktop->height()/14.0)); // (For 1600x900 screens - this comes out to 64 pixel icons)
+ bgDesktop->SetIconSize(qRound(bgWindow->height()/14.0)); // (For 1600x900 screens - this comes out to 64 pixel icons)
connect(bgDesktop, SIGNAL(PluginRemovedByUser(QString)), this, SLOT(RemoveDeskPlugin(QString)) );
if(DEBUG){ qDebug() << " - Desktop Init Done:" << desktopnumber; }
//Start the update processes
diff --git a/lumina-desktop/LDesktopPluginSpace.cpp b/lumina-desktop/LDesktopPluginSpace.cpp
index 116c4207..21ed3f46 100644
--- a/lumina-desktop/LDesktopPluginSpace.cpp
+++ b/lumina-desktop/LDesktopPluginSpace.cpp
@@ -193,7 +193,7 @@ void LDesktopPluginSpace::reloadPlugins(){
else if(ITEMS[i]->whatsThis().contains("---dlink") && items.contains(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50)) ){
//Account for the variation in the Plugin ID for desktop files
items.removeAll(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50));
- }else{ ITEMS[i]->Cleanup(); delete ITEMS.takeAt(i); i--; }
+ }else{ ITEMS[i]->removeSettings(true); delete ITEMS.takeAt(i); i--; } //this is considered a permanent removal (cleans settings)
}
//Now create any new items
diff --git a/lumina-desktop/LDesktopPluginSpace.h b/lumina-desktop/LDesktopPluginSpace.h
index 353543d9..bf623b68 100644
--- a/lumina-desktop/LDesktopPluginSpace.h
+++ b/lumina-desktop/LDesktopPluginSpace.h
@@ -14,6 +14,8 @@
#include <QMimeData>
#include <QSettings>
#include <QDebug>
+#include <QFile>
+#include <QDir>
#include "desktop-plugins/LDPlugin.h"
@@ -217,7 +219,15 @@ protected:
qDebug() << "Desktop Drop Event:" << urls;
for(int i=0; i<urls.length(); i++){
//If this file is not in the desktop folder, move/copy it here
- // -- TO-DO
+ if(urls[i].isLocalFile()){
+ QFileInfo info(urls[i].toLocalFile());
+ if(info.exists() && !QFile::exists(QDir::homePath()+"/Desktop/"+info.fileName())){
+ //Make a link to the file here
+ QFile::link(info.absoluteFilePath(), QDir::homePath()+"/Desktop/"+info.fileName());
+ }else{
+ qWarning() << "Invalid desktop file drop (ignored):" << urls[i].toString();
+ }
+ }
}
}else{
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index 53eb1801..57eff210 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -299,7 +299,7 @@ void LPanel::UpdateTheme(){
void LPanel::checkPanelFocus(){
if( !this->geometry().contains(QCursor::pos()) ){
//Move the panel back to it's "hiding" spot
- if(hidden){ this->move(hidepoint); }
+ if(hidden){ this->move(hidepoint); this->update(); }
//Re-active the old window
if(LSession::handle()->activeWindow()!=0){
LSession::handle()->XCB->ActivateWindow(LSession::handle()->activeWindow());
@@ -313,17 +313,14 @@ void LPanel::checkPanelFocus(){
//===========
void LPanel::paintEvent(QPaintEvent *event){
QPainter *painter = new QPainter(this);
+ qDebug() << "Paint Tray:";
//Make sure the base background of the event rectangle is the associated rectangle from the BGWindow
- QRect rec(event->rect().x(), event->rect().y(), event->rect().width(), event->rect().height()); //already in global coords? (translating to bgWindow coords crashes Lumina)
+ QRect rec = this->geometry(); //start with the global geometry of the panel
//Need to translate that rectangle to the background image coordinates
- //qDebug() << "Rec:" << rec.x() << rec.y();
- //Need to change to global coords for the main window
- if(hidden && (this->pos()==hidepoint) ){ rec.moveTo( this->mapToGlobal(rec.topLeft()-hidepoint+showpoint) ); }
- else{ rec.moveTo( this->mapToGlobal(rec.topLeft()) ); }
- //qDebug() << "Global Rec:" << rec.x() << rec.y() << screennum;
+ //qDebug() << " - Rec:" << rec << hidden << this->geometry();
rec.moveTo( rec.x()-LSession::handle()->screenGeom(screennum).x(), rec.y() );
- //qDebug() << "Adjusted Global Rec:" << rec.x() << rec.y();
- painter->drawPixmap(event->rect(), bgWindow->grab(rec) );
+ //qDebug() << " - Adjusted Global Rec:" << rec;
+ painter->drawPixmap(QRect(0,0,this->width(), this->height()), bgWindow->grab(rec) );
QWidget::paintEvent(event); //now pass the event along to the normal painting event
}
@@ -332,6 +329,7 @@ void LPanel::enterEvent(QEvent *event){
if(hidden){
//Move the panel out so it is fully available
this->move(showpoint);
+ this->update();
}
this->activateWindow();
event->accept(); //just to quiet the compile warning
diff --git a/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp b/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp
index 5bd7fa96..321970ed 100644
--- a/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp
+++ b/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp
@@ -8,6 +8,7 @@
#include "../../LSession.h"
#include <LuminaXDG.h>
+#include <QInputDialog>
AppLaunchButtonPlugin::AppLaunchButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){
button = new QToolButton(this);
bgstack15