Re: [gedit-list] API question: How to get the list of items in a panel?



Il giorno ven, 29/05/2009 alle 10.17 -0400, kaleb moreland ha scritto:
> Hi all,
> 
> I am relatively new to gedit and have just subscribed to the list.
> Before anything else, thanks for a terrific piece of software.
> 
> I am trying to manipulate programatically the items (bottom tabs) in
> the side panel, for instance, to activate a given item in response to
> a key press.  After some experimentation/introspection with the API in
> the Python console, I believe the call that will do the trick is:
> 
> window.get_side_panel().activate_item(<item>)
> 
> What I couldn't find, however, is a way to grab the <item> object.  I
> suppose there must be a method that enumerates the items in a panel.
> Can anyone point me in the right direction?
> 

Hi Kaleb,

	well since the panel is a GtkCoontainer you can get the list of
children with gtk.Container.get_children(). However at that point you
will probably need a way to check the child you are interested in and
that may a bit painful unless you know that is a particular kind of
widget or something like that.

The api at the moment is not very helpful, maybe we should add a way to
enumerate the panel items by name...

Ciao
	Paolo


> thanks,
> --Kaleb
> 
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list



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