[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/icon
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2008-01-11 18:16:29
Message-ID: 1200075389.666543.19386.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 760001 by aseigo:
* pass on the shape of the icon widget
* ensure we have a value in our config no matter what, fixes icons not being removed \
from desktop after turning them on then off at runtime
M +15 -0 icon.cpp
M +1 -0 icon.h
--- trunk/KDE/kdebase/workspace/plasma/applets/icon/icon.cpp #760000:760001
@@ -70,6 +70,16 @@
m_icon->installSceneEventFilter(this);
m_icon->resize(contentSize());
+
+ // we do this right away since we may have our config
+ // read shortly by the containment. usually applets don't need
+ // this, but desktop icons requires some hacks.
+ //
+ // in particular, if we were created with a url passed into via
+ // the args parameter in the ctor, then there won't be an entry
+ // in our config, and desktop icons support banks on the fact
+ // that there will be
+ cg.writeEntry("Url", m_url);
}
IconApplet::~IconApplet()
@@ -262,6 +272,11 @@
return 0;
}
+QPainterPath IconApplet::shape() const
+{
+ return m_icon->shape();
+}
+
bool IconApplet::sceneEventFilter( QGraphicsItem * watched, QEvent * event )
{
switch (event->type()) {
--- trunk/KDE/kdebase/workspace/plasma/applets/icon/icon.h #760000:760001
@@ -50,6 +50,7 @@
int displayLines();
QSizeF sizeHint() const;
Qt::Orientations expandingDirections() const;
+ QPainterPath shape() const;
public slots:
void openUrl();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic