Example: graying out the "X" on windows systems.
+3
A:
Just call the set_deletable
with False
on the window in question. It will work as long as GTK can convince the window manager to make the window unclosable.
Claudiu
2009-08-05 20:00:25
Why did you answer your own question in under a minute?
Javed Ahamed
2009-08-05 20:08:36
I don't know what happened here. But I like it.
Sean O'Hollaren
2009-08-05 20:29:00
I had a question. then, before posting it here, I looked it up and found the answer in a few minutes. i figured i might as well add to the SO stash of questions by putting it up, along w/ an answer so as to not waste anyones time =P. vote me up!!@!# omg.
Claudiu
2009-08-06 15:10:16
+4
A:
If Gtk can't convince the window manager you can always connect the "delete-event" signal and return True from the callback. Doing this Gtk assumes that the callback handle that signal and does nothing.
import gtk
window = gtk.Window()
window.connect('delete-event',lambda widget, event: True)
markuz
2009-08-16 05:19:23