[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeplasma-addons/applets/frame
From: Anne-Marie Mahfouf <annma () kde ! org>
Date: 2010-04-07 8:59:49
Message-ID: 20100407085949.3F7F9AC857 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1112069 by annma:
Patch from Etienne, thanks a lot! :-)
CCBUG=226230
M +1 -1 frame.cpp
M +5 -0 picture.cpp
M +1 -0 picture.h
M +4 -3 slideshow.cpp
--- trunk/KDE/kdeplasma-addons/applets/frame/frame.cpp #1112068:1112069
@@ -564,7 +564,6 @@
QDate mCurrentDate = QDate::currentDate();
const QString identifier = m_potdProvider + ':' + mCurrentDate.toString(Qt::ISODate);
engine->disconnectSource(identifier, m_mySlideShow);
- m_potd = false;
}
void Frame::initSlideShow()
@@ -624,6 +623,7 @@
}
stopPotd();
+ m_potd = false;
initSlideShow();
KConfigGroup cg = config();
--- trunk/KDE/kdeplasma-addons/applets/frame/picture.cpp #1112068:1112069
@@ -57,6 +57,11 @@
return m_message;
}
+void Picture::setMessage(const QString &message)
+{
+ m_message = message;
+}
+
QImage Picture::defaultPicture(const QString &message)
{
// Create a QImage with same axpect ratio of default svg and current pixelSize
--- trunk/KDE/kdeplasma-addons/applets/frame/picture.h #1112068:1112069
@@ -53,6 +53,7 @@
KIO::StoredTransferJob * m_job;
KUrl url();
QString message();
+ void setMessage(const QString &message);
Q_SIGNALS:
void pictureLoaded(QImage image);
--- trunk/KDE/kdeplasma-addons/applets/frame/slideshow.cpp #1112068:1112069
@@ -196,20 +196,21 @@
void SlideShow::dataUpdated(const QString &name, const Plasma::DataEngine::Data &data)
{
- Q_UNUSED(name)
if (data.isEmpty()) {
m_image = QImage();
+ m_picture->setMessage(i18n("No Picture fot this Provider."));
return;
}
- m_image = data[0].value<QImage>();
+ m_image = data[name].value<QImage>();
//Compatibility with old dataengines
if (m_image.isNull()){
- QPixmap tmpPixmap = data[0].value<QPixmap>();
+ QPixmap tmpPixmap = data[name].value<QPixmap>();
if (!tmpPixmap.isNull()){
m_image = tmpPixmap.toImage();
}
}
+ m_picture->setMessage(QString());
emit pictureUpdated();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic