On Sun, 2005-20-03 at 11:09 -0300, Eric Jardim wrote:
> On Sat, 19 Mar 2005 22:40:54 -0800, Brian <[EMAIL PROTECTED]> wrote:
> > I have been trying in vane to figure out the event that triggers the
> > window_state_event callback.   The docs are as clear as mud!   I am
> > trying to get the minimize and restore events so I can change the window
> > title to the same as the statusbar message when the window is minimized.
> > Then restore the title along with the window for normal viewing.
> 
> When PyGTK is not enough you can always apeal to the GTK+2.0 docs:
> http://www.gtk.org/api/2.6/gtk/index.html
> http://www.gtk.org/api/2.6/gdk/index.html
> 
> But in this case I think everything you need is in:
> http://www.pygtk.org/pygtk2reference/class-gdkevent.htm
> 
> There it says:
> "The attributes available for a gtk.gdk.Event are dependent on the
> type of the event. The event types are described in the Description
> section."
> 
> Look carefully at the gtk.gdk.WINDOW_STATE section..
> 
I did, obviously though not carefully enough :)

> > Does anyone know how to decipher the event passed to the callback for
> > these to user actions?
> 
> You can always use a friendly "dir(event)" function. I did it and
> discovered that there is a "new_window_state". There is also a
> "change_mask", but I dont think it will help you.
> 
> Study and meditate on the code below and I think your questions will
> be answered.
> 
>     state = event.new_window_state   

That did it.  I must have been too tired, I didn't see to add the
reference to .new_window_state

> Hope helped,
> 
> [Eric Jardim]

Yes, it did.

Thanks...
-- 
Brian <[EMAIL PROTECTED]>

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to