Re: [pygtk] Sync 2 widgets

2008-05-02 Thread Steven Brown
Timo, you have lots of options.  The simplest would be to add an event
handler to each widget's "toggled" (i think) signal to check the other
widget and set the same value.  If it's sufficient, you could create
an action (gtk.Action) and connect both widgets to it.  You could
create your own "model" and make your widgets the "observers" (search
for observer/observable design pattern).  Or if it's a GNOME
application, you could use a "gconf" key, which is already
"observable" and you can set anything to monitor the key's value.

Anyway, gives you some things to read about, if you haven't already.  :)

On Sat, Apr 19, 2008 at 3:35 AM, Timo <[EMAIL PROTECTED]> wrote:
> I have a checkbox in my program (made with Glade). I also have a tray-icon
> which pops-up a menu that contains a checkbox too. Is it possible that if I
> click the checkbox in my program, the checkbox in the traymenu is also
> toggled? And the other way around too ofcourse.
>
>
>  Timo
>  ___
>  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/
>
___
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/


[pygtk] Sync 2 widgets

2008-04-19 Thread Timo
I have a checkbox in my program (made with Glade). I also have a 
tray-icon which pops-up a menu that contains a checkbox too. Is it 
possible that if I click the checkbox in my program, the checkbox in the 
traymenu is also toggled? And the other way around too ofcourse.



Timo
___
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/