Reputation: 229361
For example, graying out the "X" on windows systems.
Upvotes: 4
Views: 838
Reputation: 919
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)
Upvotes: 5
Reputation: 229361
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.
Upvotes: 4