[Kde-games-devel] replacing classic tileset?

Ian Wadham ianw2 at optusnet.com.au
Wed Mar 18 04:18:03 CET 2009


On Wed, 18 Mar 2009 1:28:00 pm Mauricio Piacentini wrote:
> Ian Wadham wrote:
> > So I am with Matthew.  I think the best way to set the default
> > theme is via the Config mechanism in each game.  For example,
> > KMahjongg and KShisen, use the same themes (from the lib) but
> > we are talking about KShisen defaulting to Classic or maybe
> > Matthew's new theme.  With Config, each game could have its
> > own default - the one that is considered nicest to use in that game.
>
> Yes, this solves a problem with libkmahjongg being used by multiple
> apps. The only problem is that currently we have a default to fallback
> to. Not sure how we could handle this, but maybe it is "good enough" to
> fallback to an existing tileset (anyone, or the first in the list) if
> the one requested by the app does not exist?
>
Some rebellious, nonconformist guy wrote the following snippet:

if ((currentThemeFilepath == filepath) ||       // If theme prev chosen
    ((currentThemeFilepath.isEmpty()) &&        // or it is the default
     (filepath.indexOf ("default") >= 0)) ||
    ((filepath == themeFilepaths.last()) &&
     (themeGroup->checkedAction() == 0))) {     // or last in the list,
          game->setInitialTheme (filepath);           // tell graphics init.
          newTheme->setChecked (true);                // and mark it as chosen
}

in lines 654-661 of file kgoldrunner.cpp ... :-)

Note that the literal "default" could easily be changed to "egypt" say.
So yes, you would have to "pick one" as a fallback, in case the
programmed default gets discontinued or renamed over the years.

> > BTW, I think it is high time we dropped the use of "Default" in
> > theme names.  Raquel's beautiful KMahjongg tileset deserves a
> > nicer name ...  So how about "Japanese" or "Raquel" or even
> > "Tabuleiro" ...  "Default" sounds too much like what too many
> > unfortunate people are doing at their banks right now ... :-(
>
> Interesting idea, let us talk about how to implement it then!
>
> In any event, we will have to handle at least the case of existing
> config files pointing to default.desktop, right? :)
>
I was talking about the "Name=" value in the file default.desktop.
Easy to change (with a slight ripple in translator-dom), so just
do it?  Changing all the default.desktop filenames might be
harder, but desirable.  Also, FWIW, I see that that "rebel" has
"Name=KGoldrunner Default" in KGr's default.desktop file.

All the best, Ian W.

P.S.  I see that "KGoldrunner Default" has been translated to
"KGoldrunner Standard" or similar in several Northern European
languages ... Yay!  And several Southern Eu. languages have
nicer words than "Default".

P.P.S. As you may have gathered, "Default" is on my all-time
list of least favourite user-interface words ... :-) ... along with
"Invalid", "Illegal" and "Configure" ...





More information about the kde-games-devel mailing list