[pygtk] style (theme font) and GenericCellRenderer ?

Danny Milosavljevic danny.milo at gmx.net
Fri Apr 7 05:15:03 WST 2006


Hi,

I'm trying to make one of my cell renderers adhere to the theme font
selected.

I have something like

-----------------------------
style "myentry"  {
        font_name = "Courier New 12"
}
widget_class "*TCellRendererEditLine*" style "myentry"
widget_class "*CellRendererText*" style "myentry"
----------------------------

in my gtkrc (for testing), and then I try to use attached program.

To test it, create a file "verne.txt" with a few lines of text in the
current directory.

Note how "TCellRendererEditLine.do_style_set" is never entered, and how
TCellRendererEditLine.get_style() doesn't exist...

How do I get my Cell Renderer to
1) use the theme font and
2) switch the font on theme changes
?

(In the ideal case I don't want to special-case stuff on the TreeView,
that is, I want the TCellRendererEditLine to be an independent
compontent)

Any clues?

cheers.
  Danny

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : dannym-cell-renderer.py
Dateityp    : text/x-python
Dateigröße  : 10120 bytes
Beschreibung: nicht verfügbar
URL         : http://www.daa.com.au/pipermail/pygtk/attachments/20060406/7ede3bbe/dannym-cell-renderer-0001.py


More information about the pygtk mailing list