handle the window closing properly
This commit is contained in:
parent
09a6913d98
commit
b58a7224aa
@ -6,6 +6,10 @@ from newterminator import Terminator
|
|||||||
from window import Window
|
from window import Window
|
||||||
from terminal import Terminal
|
from terminal import Terminal
|
||||||
|
|
||||||
|
def on_window_destroyed(widget):
|
||||||
|
"""Window destroyed, so exit"""
|
||||||
|
gtk.main_quit()
|
||||||
|
|
||||||
window = Window()
|
window = Window()
|
||||||
foo = Terminator()
|
foo = Terminator()
|
||||||
term = Terminal()
|
term = Terminal()
|
||||||
@ -14,4 +18,6 @@ foo.register_terminal(term)
|
|||||||
window.add(term)
|
window.add(term)
|
||||||
window.show()
|
window.show()
|
||||||
|
|
||||||
|
window.connect("destroy", on_window_destroyed)
|
||||||
|
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user