Bug 1322 : The theme.txt file is only searched in the install dir
Last modified: 2009-09-14 09:35

DUPLICATE of bug 1320


Assigned To:

Attachment Type Created Size Actions

Description:   Opened: 2009-09-08 02:48
See "Processing backgrnd white; preferences.txt change?"
<http://processing.org/discourse/yabb2/YaBB.pl?num=1252363144> thread for
the starting point.

In short, the color (and font) preferences have been moved to <Processing
install dir>/lib/theme/theme.txt which is a good thing (preferences.txt is
shorter and clearer).

BUT, I think the app should first try and read a theme.txt in the same
directory as preferences.txt (or first read the standard one then this one,
overwriting values found there): this would allow people to do
customizations that survives upgrades (or that are kept whatever the number
of versions we keep).

Observed with Processing 1.0.5 on French Windows XP Pro SP3.
Additional Comment #1 From fry 2009-09-08 07:17
Not sure I completely follow, but perhaps this is just a dupe of bug #1320,
that some preferences in a user's preferences.txt file are being ignored?
Additional Comment #2 From PhiLhoČ 2009-09-09 12:56

In short, I would like to have the theme.txt file from installation dir to
be used only if not found in the Processing preferences dir (where the
user's preferences.txt is read).
Thus we can make customizations without risking to loose it when upgrading.

That's not really a bug report, more like an improvement request.
Additional Comment #3 From fry 2009-09-10 05:25
Right, that's the way it should be behaving. The sequence is:

Read lib/preferences.txt
Read lib/theme/preferences.txt
Read user's preferences.txt

With each successive read replacing anything that's already been set. As
it's read, all of this data goes into the same pile, and is used to replace
the user's preferences.txt file when they quit. So any theme-related
changes to the user prefs file should be maintained between releases
(unless in the rare case of when the name of a pref gets changed).

Bug #1320 is that for some reason, the replacement isn't happening properly
in recent releases (due to a regression when I tried to update some of the
prefs code). Is that the same issue?
Additional Comment #4 From PhiLhoČ 2009-09-12 01:02
Aha, so it is a bug report after all!
Observed behavior (still with 1.0.5):
- If I run PDE with no preferences.txt in my user dir, it creates on by
default. There are no properties from theme (colors...).
- It does load properties from lib/theme/theme.txt (not preferences.txt,
right? Haven't tried)
- If I put a property from theme.txt to properties.txt, eg.
editor.bgcolor=#FF0000, it is ignored, and removed when closing PDE.
So currently we have to edit the original theme.txt to get effective changes.

I thought the theme preferences would go in a separate theme.txt file in
the user dir too, but if you say they should go to preferences.txt too, you
are right, that's probably a dupe.
Additional Comment #5 From fry 2009-09-14 09:29

*** This bug has been marked as a duplicate of 1320 ***
Additional Comment #6 From fry 2009-09-14 09:35
Yeah, it was just some sloppy work when moving from Hashtable to HashMap in
the prefs code, so things aren't loading properly.