Change ledger font

AC gnucash at acarver.net
Wed Sep 24 10:12:07 EDT 2014


On 2014-09-24 00:44, Geert Janssens wrote:
> On Tuesday 23 September 2014 13:39:55 AC wrote:
>> On 2014-09-23 09:18, Geert Janssens wrote:
>>>
>>> The only reasons I can imagine for not finding this in your home
>>> directory would be either:
>>> 1. either your folder preferences hide this file for you
>>> 2. or you have altered the value of the HOME environment variable to
>>> point somewhere else. Is such a line in
>>> \program files (x86)\gnucash\etc\gnucash\environment ?
>>
>> Files are not hidden from view in the explorer windows (I always turn
>> that off on any machine) and that setting does not affect the find
>> utility under Cygwin, a simple 'ls' can still see those files.
>>
> Ah, this is the first time you mention Cygwin. Are you running gnucash 
> and the theme selection tool from within cygwin as well ?
> 
> Where is cygwin installed ?
>
>> I have also not altered the environment variables, HOME is still
>> C:\users\
>>
> Ok
> 
>> There are no edited entries in the environment file:
>>
> Ok
>>
>>
>> Searching with multiple utilities does not reveal any .gtkrc-2.0 files
>> anywhere:
>>
>> $ find /cygdrive/c -name *.gtkrc* 2>/dev/null
>>
>> $
> I have no explanation for that currently...
>>
>> (I redirected stderr to trim errors caused by accessing some core
>> Windows files)
>>
>> Searching for plain gtkrc:
>>
>> $ find /cygdrive/c -name *gtkrc* 2>/dev/null
>> /cygdrive/c/Program Files
>> (x86)/GNU/GnuPG/share/themes/Default/gtk-2.0-key/gtkrc
>> /cygdrive/c/Program Files
>> (x86)/GNU/GnuPG/share/themes/Emacs/gtk-2.0-key/gtkrc
>> /cygdrive/c/Program Files
>> (x86)/GNU/GnuPG/share/themes/MS-Windows/gtk-2.0/gtkrc
>>
>> [ trimming additional share/themes entries]
>>
>> /cygdrive/c/Users/agcarver/AppData/Local/VirtualStore/Program Files
>> (x86)/gnucash/etc/gtk-2.0/gtkrc
>>
>>
>> Opening that last file:
>>
>> # Auto-written by gtk2_prefs. Do not edit.
>>
>> gtk-theme-name = "Bluecurve-Slate"
>> style "user-font"
>> {
>> 	font_name="Arial 10"
>> }
>> widget_class "*" style "user-font"
>>
>> So it looks like this is the mystery file which does not match the
>> documentation in the slightest.  The path is entirely wrong:
>>
> That is an interesting observation.
> 
> However I have another theory about the file you found, but I can't be 
> sure until we test.
> 
> The way to be sure this file is really written by the theme tool is 
> this:
> - make a copy of the file so you can revert back to it if needed
> - run the theme tool and choose another theme than is currently in the 
> gtkrc file
> [Note: on my test system the theme tool asks for confirmation to 
> overwrite my previous file, which still is
> c:\Documents and settings\<user>\.gtkrc-2.0
> as explained in the documentation]
> - reopen the gtkrc file you found and check if the theme has been 
> changed.
> 
> What is the result now ?

No, I'm not running it within Cygwin, I'm only mentioning Cygwin as one
of the tools I was using to help track down the file.  GnuCash is
installed as a Windows binary.



This is the file being written by the theme tool.  The theme name
changes if I use the theme selector to set another theme.  The dialog
box says that the file "c:\Documents and settings\<user>\.gtkrc-2.0"
will be changed however the file that does get written is:

C:\Users\<user>\AppData\Local\VirtualStore\Program Files
(x86)\gnucash\etc\gtk-2.0\gtkrc


This is ok, now that the mystery is solved for my particular system I
can edit this file to adjust my theme.  I don't understand why it writes
there but that's where it is deciding to write.

Is there a list of widgets in the source tarball that I can use to
identify the appropriate names for making style adjustments?  I can't
seem to figure out the name to use for things like the ledger header
font color.


More information about the gnucash-user mailing list