Bug 226230 - Picture of the day does not work
Summary: Picture of the day does not work
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-frame (show other bugs)
Version: unspecified
Platform: Arch Linux Unspecified
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-11 01:06 UTC by Médéric Boquien
Modified: 2010-05-07 15:55 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch that makes potd work again. (1.25 KB, patch)
2010-04-06 00:14 UTC, Etienne
Details
Picture of the Day Patch (2.14 KB, patch)
2010-04-06 19:49 UTC, Etienne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Médéric Boquien 2010-02-11 01:06:17 UTC
Version:            (using KDE 4.4.0)
Installed from:    Archlinux Packages

Hello,

The "picture of the day" in the Frame widget does not work.

Steps to reproduce:
* add Frame widget
* configure to "picture of the day" and set any source

The result is that the picture of the day is not displayed. When trying to configure again, the setting is back to "Image", as if the configuration had not been recorded.

I have this problem in 4.3 and 4.4. I think it worked in 4.2.

Thanks!
Comment 1 Etienne 2010-03-05 23:32:23 UTC
I can confim this. I found the source oft the setting bug. The Frame::stopPotd() is caled befor the setting is saved. In that function the "picture of the day" setting is removed.

But the image will still not load...
Comment 2 Alexander 2010-03-06 17:46:29 UTC
not working too
Comment 3 Mirza 2010-03-11 12:46:52 UTC
Not working for me too :(
Comment 4 Etienne 2010-04-06 00:14:12 UTC
Created attachment 42517 [details]
Patch that makes potd work again.

Two little things where wrong. 
- The potd Setting was not handlet correctly. (See Comment 1)
- The datahash from the dataengine was always taken form the first position, where it obviusly not was. When it is adressed with the name, it works.

Some data engine sources dont't seem to work anymore, but that's an other story.
Comment 5 Etienne 2010-04-06 19:49:46 UTC
Created attachment 42548 [details]
Picture of the Day Patch

Didn't test it with a fresh picture frame...
The default text is now removed when a potd is loaded. I had to add a setMessage function in the picture class. 
Sorry for my spam :/
Comment 6 Anne-Marie Mahfouf 2010-04-07 10:57:30 UTC
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  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1112069
Comment 7 Anne-Marie Mahfouf 2010-04-07 13:45:31 UTC
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  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1112110
Comment 8 Magnus Bergmark 2010-05-06 19:20:20 UTC
(In reply to comment #6)
> SVN commit 1112069 by annma:
> [...]
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1112069

Sorry to nitpick, but there's a spelling error in the diff for slideshow.cpp:
"No Picture fot this Provider."

Note "fot" instead of "for".

It's still present in trunk as of this posting.
Comment 9 Etienne 2010-05-07 01:38:31 UTC
Thanks. Yes, i never see typos.
But, it was alredy corrected by annma.
It says "No Picture from this Provider" which sounds good to me.
Comment 10 Magnus Bergmark 2010-05-07 08:28:38 UTC
(In reply to comment #9)
> Thanks. Yes, i never see typos.
> But, it was alredy corrected by annma.
> It says "No Picture from this Provider" which sounds good to me.

Maybe I misread it, but to me it looked like the correct spelling was in the 4.4 branch only, while the improperly spelt one was in trunk. Maybe I'm not understanding the repo structure here, but wouldn't that mean that the spelling error will be reintroduced in 4.5 and above?
Comment 11 Anne-Marie Mahfouf 2010-05-07 10:09:21 UTC
Magnus, what is your revision number for trunk?
For me rev 1123638 I have
        m_picture->setMessage(i18n("No Picture from this Provider."));
line 203 slideshow.cpp in trunk

Find out with 'svn info' in your kdeplasma-addons trunk source please.

Also in the same dir please do:
grep -ri 'fot this ' ./
Comment 12 Magnus Bergmark 2010-05-07 12:56:26 UTC
(In reply to comment #11)
> Magnus, what is your revision number for trunk?

Oh, I don't have it checked out or anything. I just looked at the above websvn link. One of them were for trunk and the other for branch 4.4, and the spelling error were only present in the trunk one.

> For me rev 1123638 I have
>         m_picture->setMessage(i18n("No Picture from this Provider."));
> line 203 slideshow.cpp in trunk

Then I trust that is correct. :-)
Comment 13 Anne-Marie Mahfouf 2010-05-07 13:20:11 UTC
Actually looking at websvn would have told you
http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/frame/slideshow.cpp?r1=1112069&r2=1112105
Comment 14 Magnus Bergmark 2010-05-07 15:55:18 UTC
(In reply to comment #13)
> Actually looking at websvn would have told you
> http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/frame/slideshow.cpp?r1=1112069&r2=1112105

I guess so. That diff was not linked to from here, and I'm just a user trying to help.