After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 307446 - Gnect needs to have user-defined themes support again.
Gnect needs to have user-defined themes support again.
Status: RESOLVED OBSOLETE
Product: four-in-a-row
Classification: Applications
Component: general
git master
Other All
: Normal enhancement
: ---
Assigned To: four-in-a-row-maint
four-in-a-row-maint
Depends on:
Blocks:
 
 
Reported: 2005-06-13 01:40 UTC by Callum McKenzie
Modified: 2018-05-22 12:17 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to allow custom themes through a config file. (5.07 KB, patch)
2008-04-29 08:55 UTC, Trevor Creech
needs-work Details | Review
The default config file to go with my patch (1.10 KB, text/plain)
2008-04-29 08:59 UTC, Trevor Creech
  Details

Description Callum McKenzie 2005-06-13 01:40:26 UTC
Currently the list of themes is hard-coded into the game. The game should be
more flexible.

Also, the documentation is wrong.
Comment 1 Alan Horkan 2005-06-13 10:37:23 UTC
the mailing list thread where I brought up this issue.  
http://mail.gnome.org/archives/games-list/2005-June/msg00014.html
Comment 2 Alan Horkan 2005-06-15 01:28:13 UTC
Any idea why this functionality was removed, and if there is any possibility the
changes could be reverted?  
The current themes.c file is a whole lot simpler and less likely to cause any
problems than it used to be but I dont see any clear indication in the logs as
to why it was done (later will look again and do more than skim read it).  A
quick look at the list of closed bugs for gnect didn't look promising either.  
Comment 3 Callum McKenzie 2005-06-15 01:41:13 UTC
No real idea. It was a side-effect of Tim cleaning up the theme engine.
Comment 4 Trevor Creech 2008-04-29 08:55:45 UTC
Created attachment 110097 [details] [review]
Patch to allow custom themes through a config file.

So, I was interested in creating a new theme for gnect, but it seems the support for custom themes has been removed from the code.  I've added a patch to use a config file to manage the themes.  This introduced an install dependency on libconfuse0 and a build dependency on libconfuse-dev.  This is my first patch, so let me know if there is anything I can do better.

Thanks!
Comment 5 Trevor Creech 2008-04-29 08:59:01 UTC
Created attachment 110098 [details]
The default config file to go with my patch

This is the default config file, which will provide the same themes as the previous versions of gnect, without being hardcoded if you use my patch (#110097).  It will allow you to easily add new themes.
Comment 6 Andreas Røsdal 2008-04-29 20:31:37 UTC
Why the new dependency upon libconfuse0 ?

If you're adding a new dependency to GNOME, it has to be accepted
as a new external dependency: http://live.gnome.org/TwoPointTwentythree/ExternalDependencies
Comment 7 Trevor Creech 2008-04-30 00:44:31 UTC
Hi Andreas,
I used libconfuse to parse the config file.  I've done some looking around, and couldn't find any standard way of doing config files in gnome or linux.  Would it make more sense to write my own parser in gnect, or propose the new dependency?
Comment 8 Jason Clinton 2008-04-30 17:54:55 UTC
The official way is to use gconf which gnect already has access to (see /apps/gnect); we could have a gconf key with a comma-separated list of themes. Or a comma-separated list of pairs of names and paths.
Comment 9 Trevor Creech 2008-05-30 13:56:56 UTC
Currently each theme contains the following metadata:
Name
Sprite image
Optional background image
Line color
Grid Style
Pair of color names (Like Light,Dark or Orange,Blue)

Currently these are stored in an array of structs, hardcoded in theme.c.
What would be the best way to store these in a distributable, modifiable way?
Right now I'm thinking it would make sense to include a small config file with each theme, which would contain that data.  Should that data then be put in gconf?

Any suggestions?
Comment 10 Gabriel Rauter 2009-02-28 14:34:13 UTC
Any news on this bug?
I'm trynng to create some tango themes for some of the gnome games, and as how it works at the moment, it's hard to distribute the theme using gnome-look.org, only overwriting existing themes, seems to work...
Comment 11 GNOME Infrastructure Team 2018-05-22 12:17:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/four-in-a-row/issues/1.