Re: [gnome-love] GTK customisation (OT?)



On Thu, May 19, 2005 at 11:31:22AM +0100, Jon Dowland wrote:
On Thu, May 19, 2005 at 12:29:01AM +0100, Magnus Therning wrote:
How can I make user-specific modifications to a GTK2 theme?

I assume the file ~/.gtkrc-1.2-gnome2 is loaded for GTK1 apps in
GNOME, and then I can create the file ~/.gtkrc.mine and put stuff in
there to customise GTK1 (I haven't actually tested this though).
However, I can't find any pointers for doing the same with GTK2.

I used,
$ strace ./scroll.exe 2>&1| grep gtkrc

Ah, of course, I should have thought of that :-)

(scroll.exe being a trivial GTK2 program, basically anything which
calls gtk_init I believe is sufficient) to determine the following
gtkrc order:

/etc/gtk-2.0/gtkrc
/etc/gtk-2.0/gtkrc.en_GB
/etc/gtk-2.0/gtkrc.en
/home/jon/.gtkrc-2.0
/home/jon/.gtkrc-2.0.en_GB
/home/jon/.gtkrc-2.0.en
/home/jon/.themes/DebianRed-jmtd/gtk-2.0/gtkrc
/usr/share/themes/DebianRed-jmtd/gtk-2.0/gtkrc
/usr/share/themes/DebianRed-jmtd/gtk-2.0/gtkrc
/usr/share/themes/DebianRed-jmtd/gtk-2.0/gtkrc
/usr/share/themes/DebianRed-jmtd/gtk-2.0/gtkrc.en_GB
/usr/share/themes/DebianRed-jmtd/gtk-2.0/gtkrc.en
/home/jon/.themes/Default/gtk-2.0-key/gtkrc
/usr/share/themes/Default/gtk-2.0-key/gtkrc
/usr/share/themes/Default/gtk-2.0-key/gtkrc
/usr/share/themes/Default/gtk-2.0-key/gtkrc
/usr/share/themes/Default/gtk-2.0-key/gtkrc.en_GB
/usr/share/themes/Default/gtk-2.0-key/gtkrc.en

Hmm, it looks like the loading order is a bit strange. Defaults are
loaded after the theme specifics, and the user's settings are loaded
very early. I would have wanted my own things to be loaded last, thereby
overriding whatever the defaults and theme says.

I tried putting the following in ~/.gtkrc-2.0:

  style "default"
  {
    GtkScrollbar::has_backward_stepper = 1
    GtkScrollbar::has_secondary_forward_stepper = 0
  
    GtkScrollbar::has_forward_stepper = 1
    GtkScrollbar::has_secondary_backward_stepper = 1
  }

It worked since I'm using a theme that doesn't specify those values
itself (simple). When changing to a theme that does (Lush) it doesn't
work... good enough for me at the moment, but a little silly anyway.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus therning org
http://magnus.therning.org/

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Due to the suspicious nature of crypto users I have a feeling DES will
be with us forever, we will just keep adding keys and cycles... There
is a parallel between designing electronic commerce infrastructure
today that uses weak cryptography (i.e. 40 or 56 bit keys) and, say,
designing air traffic control systems in the '60s using two digit year
fields. ... Just because you can retire before it all blows up doesn't
make it any less irresponsible.
      -- Arnold G. Reinhold

Attachment: pgpdeVBUfhHlf.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]