Re: [pygtk] A few questions/comments

2007-01-10 Thread Florian Diesch
[EMAIL PROTECTED] wrote:

 > The documentation for TreeModel.get_iter_from_string(string_path) does
> not define the format for 'string_path' This got me a couple of months
> ago, and then again yesterday.  

It is defined in the description of TreeModel:


"A path is essentially a potential node. It is a location on a model
 that may or may not actually correspond to a node on a specific model. A
 path can be converted into either an array of unsigned integers or a
 string. The string form is a list of numbers separated by a colon. Each
 number refers to the offset at that level. Thus, the path "0" refers to
 the root node and the path "2:4" refers to the fifth child of the third
 node."


Maybe there should be a reference in the docs of get_iter_from_string

> How do I put in a request to get the documentation fixed?

Send an email at <[EMAIL PROTECTED]> or file a bug report at
bugzilla.gnome.org  as said in "Introduction".



> For 'button-press-event' handlers:
>
> def mouseClick(self, widget, event):
> #
> x,y = event.get_coords()
>  
> Is there a reason that x,y are floating point values?  

I don't know. It's the way it is done in GDK and PyGtk just wrapps it.

> When I turn
> around and call TreeView function get_path_at_pos(x,y) I get a warning
> because of the floating point values (I'm casting them so I'm not
> seeing the warning at the moment).

That's what I'm doing too.


   Florian
-- 

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] how to set pygtk global font?

2007-01-10 Thread Thomas Mills Hinkle

On 1/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


 Hi all:

 Can anyone tell me how to set pygtk global font with code instead of
editing gtkrc file?



You can use gtk.rc_parse_string.

That takes as its argument whatever you would put in the rc file.

e.g.
gtk.rc_parse_string('''

style
"default"
{

  font_name = "arial 17"
}
''')

Tom
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/