Re: [pygtk] Hide a gtk.Window

2004-09-05 Thread Marcus Habermehl
Am Son, den 05.09.2004 um 13:39 Uhr +0100 schrieb Gustavo J. A. M.
Carneiro:
> Dom, 2004-09-05 às 14:08 +0200, Marcus Habermehl escreveu:
> > Hello.
> > 
> > Excuse my bad english.
> > 
> > I would like to hide a gtk.Window when the user pressed a button.
> > 
> > This is the function for the button.
> > 
> > def startwm(*args):
> > for rb in rbs:
> > if rb.get_active() == True:
> > wm = rb.get_label()
> > window.hide()
> > system(wm)
> > window.show_all()
> > break
> > 
> > But it does not operates.
> > 
> > I have used window.hide() and window.hide_all().
> > 
> > What is wrong?
> 
>   You have to dispatch gtk events before calling system().  Add
> 
> while gtk.events_pending():
>gtk.main_iteration()
> 
> after window.hide()

That's it! Thank you.

Marcus

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


Re: [pygtk] Hide a gtk.Window

2004-09-05 Thread Gustavo J. A. M. Carneiro
Dom, 2004-09-05 às 14:08 +0200, Marcus Habermehl escreveu:
> Hello.
> 
> Excuse my bad english.
> 
> I would like to hide a gtk.Window when the user pressed a button.
> 
> This is the function for the button.
> 
> def startwm(*args):
> for rb in rbs:
> if rb.get_active() == True:
> wm = rb.get_label()
> window.hide()
> system(wm)
> window.show_all()
> break
> 
> But it does not operates.
> 
> I have used window.hide() and window.hide_all().
> 
> What is wrong?

  You have to dispatch gtk events before calling system().  Add

while gtk.events_pending():
   gtk.main_iteration()

after window.hide()

> 
> Can someone help me?
> 
> Greetings
> 
> Marcus
> 
> ___
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

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


[pygtk] Hide a gtk.Window

2004-09-05 Thread Marcus Habermehl
Hello.

Excuse my bad english.

I would like to hide a gtk.Window when the user pressed a button.

This is the function for the button.

def startwm(*args):
for rb in rbs:
if rb.get_active() == True:
wm = rb.get_label()
window.hide()
system(wm)
window.show_all()
break

But it does not operates.

I have used window.hide() and window.hide_all().

What is wrong?

Can someone help me?

Greetings

Marcus

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


Re: [pygtk] auto-scrolling text view

2004-09-05 Thread Danny Milosavljevic
hi,

Am Sonntag, den 05.09.2004, 12:32 +0100 schrieb Keir Lawson:
> i have been using the code at
> http://www.async.com.br/faq/pygtk/index.py?req=all#14.12 to make my
> pygtk instant messenger always scroll to the latest message
> automatically. however, despite my textveiw having editable set to off,
> whenever anyone clicks on it, anywhere other than at the end of the
> text, the automatic scrolling stops working, how can i fix this?

Hm, other than scrolling to the end by hand, no idea...
(tv.scroll_to_iter(tb.get_end_iter()))

> completely unrelated and not apropriate for this list but if anyone can
> help me with this it would be much apreciated: i have a chat_window
> class, and would like to spawn a new instance of it everytime a user
> clicks a button, obviously i cant just do:
> def on_click(widget):
>   foobar = chat()
> as i will only be able to do this once, how would i resolve this?

Why ?
Do you refer to glade ?
When "chat" is a class derived from gtk.Window, it very well works like
that.

Please explain some more, me is slow :)

> 
> Keir Lawson

cheers,
   Danny

-- 
www.keyserver.net key id A334AEA6



signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] auto-scrolling text view

2004-09-05 Thread Keir Lawson
i have been using the code at
http://www.async.com.br/faq/pygtk/index.py?req=all#14.12 to make my
pygtk instant messenger always scroll to the latest message
automatically. however, despite my textveiw having editable set to off,
whenever anyone clicks on it, anywhere other than at the end of the
text, the automatic scrolling stops working, how can i fix this?

completely unrelated and not apropriate for this list but if anyone can
help me with this it would be much apreciated: i have a chat_window
class, and would like to spawn a new instance of it everytime a user
clicks a button, obviously i cant just do:
def on_click(widget):
foobar = chat()
as i will only be able to do this once, how would i resolve this?

Keir Lawson


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