[Kde-games-devel] KScoreDialog

Matt Williams matt at milliams.com
Mon Apr 28 17:31:12 CEST 2008


On Monday 28 April 2008 15:40:37 Fela Winkelmolen wrote:
> It's quite some time I wanted to write this mail.. :) So here I am,
> finally..
>
> Mostly it is a list of shortcomings and bugs of KScoreDialog:
>
> 1. There are internationalization issues of which I think Milliams is
> taking care of..

I'm doing my best, yes :)

> 2. If the same instance of KScoreDialog is used (I create a new instance
> every time the dialog is showed as that seems to work better) the caption
> comment in the dialog isn't shown correctly. For example in KMines, the
> capiton "Well Done...." will remain if press Show Highscore after having
> won the game.

I can see that using the same instance of KScoreDialog would cause this but I 
don't see how that would happen? Clicking "Show Highscore" will surely call a 
function which will create it's own KScoreDialog and then show it?

Ah, sorry. Now I look at the KMines code I see that the dialog is saved as a 
member object of the mainwindow class. I hadn't really expected people to use 
it like that.

> 3. Again when using always the same instance of KScoreDialog, there are
> problems with the size of the dialog. To reproduce this try to show the
> highscore list in KMines as soon as the app is running, and then win a
> game. You will notice that the input area to enter the name will be too
> small.

Yes I can see that that could be a bug but again, the code had never accounted 
for people using the same KScoreDialog object.

> 4. The last username used doesn't seem to be remembered at all..
> (contrarily as to what the apidox says).

Would it be possible for you to file a bug report for this issue? Particularly 
which application you see this in. Also if it still occurs after gnushi's 
patch yesterday.

> 5. KScoreDialog::setComment() doen't seem to work... I added a comment "You
> did not make it to the highscore list.. " when not making it in the
> highscore list in KNetWalk, but it's never shown..

Does it display nothing or one of the default messages?

> 6. It looks like scores <= 0 aren't supported.

Possibly not, I'll look into it.

> 7. Clicking on close while entering the user name discarts what is written
> so far.. maybe there could be two buttons: Ok and Cancel.

There's a bug report on this and I agree, I plan to add an 'Ok' button.

> On a slightly unrelated note, the way KNetWalk calculate it's score changed
> radically from the previous version, what could I do to make the new
> highscore entries not clash with the old ones? Does anybody by any chance
> have a knetwalkrc from kde 4.0 containing some highscore entries so I can
> do some tests??
>
> Cheers,
>
> - fela

Thankyou for the feedback Fela, many of these issues I am aware of already but 
the only real way to fix them effectively while still keeping the code 
maintainable is to rewrite the internals. That is what I am currently working 
on but the one thing standing in my way is keeping the whole thing 
translatable. It's essentially a case of not being able to work out where the 
translations for the highscore groups should be kept. When reading the group 
names from the <appname>rc file there's no way to find out what the 
translated strings are. Once the i18n issue is sorted it should be fairly 
trivial to rewrite KScoreDialog around it. If anyone's got any ideas I'd be 
glad to hear them.

Regards,
Matt Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20080428/b14768ec/attachment.pgp 


More information about the kde-games-devel mailing list