Re: dogtail Switching tabs and setting combo box values



On Sat, 2005-11-05 at 10:18 -0800, David Hoover wrote:
> > say : switching between Gedit -> preferences tabs
> I don't believe there's any way to do these yet (if you use sniff to
> poke through and find the tabs, there are no known actions for them)

Thanks.  IIRC I recently committed the beginnings of tab support to CVS,
you may want to have a look at that.

If that doesn't help, it sounds like this ought to be in bugzilla; tabs
are fairly important! (and patches gratefully accepted...)

> 
> > setting "Tabs width" combo box value in gedit prefernces.
> An inelegant approach, but the one I'm using for the moment:
> combobox.text = 42
> combobox.activate()
> 
> The activate() is needed to make the value actually stick/let the
> spinbutton do its bounds/precision checking on the number

Ah - that's useful.   Maybe we need to have Node subclasses for those
widgets, with methods?  Or add it as a custom property that you can set?
(there's already a Node.combovalue property that you can write to IIRC)

> 
> Be warned, though, at the moment, at least, setting the text attribute
> will sort of work, even if a spinbutton is insensitive (try, for
> instance, the spinbutton for how often to have gedit autosave while the
> checkbox is off; you can put text into it, but dogtail raises an
> exception when you try to activate() it, since it is insensitive)

You can disable those exceptions by setting a boolean in dogtail.config
We might want to do that by default, since I've seen plenty of times
where the sensitive state doesn't seem to have been set on sensitive
widgets.

Hope that's helpful





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