I did a bit of research on this for my own PyGTK project for Windows. Finally, I just spent a few hours trying to follow the GTK source. Here is what I came up with (this is just for the 2.x version):

- The standard location for themes is <GTK Folder>/2.0/share/themes. You can drop any theme you want in there.

- Theme engines go into <GTK Folder>/lib/gtk-2.0/2.2.0/engines. The only one included in the standard package is libwimp.dll. I have successfully built and used cleanice and xfce - it was quite straightforward if you have the GTK Dev package installed (I used Visual C++ 6).

The tricky bit is how to tell GTK on Windows which theme to use. There are at least 3 ways to do this (though I have only tested 2):

- Rename the theme folder in share/themes to 'Default'. This will then be the one used on the next execution of your GTK app.
- Copy the gtkrc from the theme directory you want into <GTK Folder>/etc/gtk-2.0. (I also tried putting a shortcut in there instead, to no effect - would have been nice though).
- (From the source) Put a .gtk-2.0rc (not sure of exact name at the moment) in your 'HOME' folder. The issue here is that every version of Windows gives you a different 'HOME' location. On my XP box, it is <SYSTEM DRIVE>/Documents and Settings/<USERNAME>.


I personally prefer the second choice, since there is less room for error since you do not have to rename folders, you simply copy one file into a different location. And to get back to the original settings you just delete that gtkrc from the etc/gtk-2.0 folder.

I was hoping to build a little theme-switcher in PyGTK, but have not found the proper incantations to tell an application to redraw itself (I am new at this PyGTK thing).

Later,
Tyler

Somesh Bartakke wrote:

i want to use own - Themes or skins in my pygtk application
can anybody suggest exact place for it ?
Somesh Bartakke
--
Truth does not pay homage to society, ancient or modern but society has to pay homage to Truth or ..Die !
-- Swami Vivekanand


------------------------------------------------------------------------

_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to