[PATCH] Fifteen puzzle config revamp

Aaron J. Seigo aseigo at kde.org
Tue Jan 22 23:51:30 CET 2008


On Tuesday 22 January 2008, Chani wrote:
> +    while (m_pieces.at(rand) != NULL) {
> +      rand = qrand() % 16;
> +    }
>
> this... looks... Bad.

i've fixed this locally. but there are other issues in the code.

a big one is the use of animations. Fifteen::piecePressed uses its own timer 
for the animation. this is Not Plasma(tm). it should be using Phase::MoveItem 
instead. i've fixed that as well. now instead of 7 LOC there's only 1.

as for the context menu problem, that's from not using Plasma::Widget. gah.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080122/da22426e/attachment.pgp 


More information about the Panel-devel mailing list