[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.4/kdeplasma-addons/applets/frame
From:       Anne-Marie Mahfouf <annma () kde ! org>
Date:       2010-04-07 11:47:47
Message-ID: 20100407114747.081E8AC894 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1112110 by annma:

fix Picture of the Day display, thanks to Etienne!
BUG=226230



 M  +1 -1      frame.cpp  
 M  +5 -0      picture.cpp  
 M  +1 -0      picture.h  
 M  +3 -2      slideshow.cpp  


--- branches/KDE/4.4/kdeplasma-addons/applets/frame/frame.cpp #1112109:1112110
@@ -542,7 +542,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()
@@ -602,6 +601,7 @@
     }
 
     stopPotd();
+    m_potd = false;
     initSlideShow();
 
     KConfigGroup cg = config();
--- branches/KDE/4.4/kdeplasma-addons/applets/frame/picture.cpp #1112109:1112110
@@ -175,4 +175,9 @@
     emit pictureLoaded(correctRotation(image, path));
 }
 
+void Picture::setMessage(const QString &message)
+{
+    m_message = message;
+}
+
 #include "picture.moc"
--- branches/KDE/4.4/kdeplasma-addons/applets/frame/picture.h #1112109:1112110
@@ -54,6 +54,7 @@
     KIO::StoredTransferJob * m_job;
     KUrl url();
     QString message();
+    void setMessage(const QString &message);
 
 Q_SIGNALS:
     void pictureLoaded(QPixmap image);
--- branches/KDE/4.4/kdeplasma-addons/applets/frame/slideshow.cpp #1112109:1112110
@@ -196,13 +196,14 @@
 
 void SlideShow::dataUpdated(const QString &name, const Plasma::DataEngine::Data &data)
 {
-    Q_UNUSED(name)
     if (data.isEmpty()) {
         m_image = QPixmap();
+        m_picture->setMessage(i18n("No Picture from this Provider."));
         return;
     }
 
-    m_image = data[0].value<QPixmap>();
+    m_image = data[name].value<QPixmap>();
+    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