Hi list!
I think I must be missing some signals concepts here, but I having
trouble reproducing the following behavior:
1. Click on a button;
2. Hide the current window;
3. Run an external script (that will open another program's window);
4. Show again the PyGTK window after the external program is closed.
For that, I've tried something like:
class Foo:
def __init__(self):
self.gladefile = gladefile
self.gladetree = gtk.glade.XML(self.gladefile, 'some_window')
self.window = self.gladetree.get_widget('some_window')
events = { 'on_code_submit_clicked' : self.submit }
self.gladetree.signal_autoconnect(events)
def submit(self):
self.window.hide()
os.system('external_script')
self.window.show()
What's happening, is that when the button is clicked, it stay pressed,
then the script runs, and after the external program is closed, the
window "blinks", being hidden and shown again.
I also tried the "pressed" and "released" signals.
What I can imagine is that the event is being run _during_ the
_clicked_ event, not after. That's why the window remain opened. I
couldn't find something like `gtk_signal_connect_after` [1] on the
glade page [2], that leaves me totally lost about it.
[1]
http://sunsite.ualberta.ca/Documentation/Graphics/by-node/gtk+-1.1.1/gtk_4.html
[2] http://www.pygtk.org/docs/pygtk/class-gladexml.html
Many Thanks.
--
Vinicius Massuchetto
http://vinicius.soylocoporti.org.br
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/