[Kde-games-devel] Review Request: KPat: Add command line option to skip directly to a particular game

Parker Coates parker.coates at gmail.com
Tue Feb 10 21:29:09 CET 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/50/
-----------------------------------------------------------

Review request for KDE Games.


Summary
-------

Bug 182718 requests a way to skip the new starting screen that was added to KPat in 4.2. While I love the start screen, I think it makes sense allow the user the possibility to skip directly to a particular game if they so desire. One of the reporters suggestions was a command line switch. I liked this suggestion as it would allow one to create separate icons for launching different games.

This patch adds a command line option "--gametype" to which one passes the index of the game type one would like to play. The welcome screen is skipped and the game loads immediately.

The problem lies with the game indices. KPat internally keeps track of its different game types using integer indexes. Unfortunately, for backwards compatibility (I assume) the game indexes are not sequential and some game types have multiple indices. Seemingly random indices aren't a very userfriendly way of referencing the games either.

This initial version of the patch adds a game to index mapping to the "--help" text, but it does so in a fairly hideous and non-i18n-friendly way. I had considered using string constants like "--gametype=simple_simon", but I'm not sure if that makes sense in a translated environment.

So essentially, I'm looking for suggestions for a saner implementation that takes ease of use and ease of translation into account.


This addresses bug 182718.
    https://bugs.kde.org/show_bug.cgi?id=182718


Diffs
-----

  trunk/KDE/kdegames/kpat/main.cpp 923927 
  trunk/KDE/kdegames/kpat/pwidget.cpp 923927 

Diff: http://reviewboard.kde.org/r/50/diff


Testing
-------

minimal


Thanks,

Parker



More information about the kde-games-devel mailing list