Programmatically close gtk window

If you have a sub-window in GTK and you want to close it programmatically (e.g., pressing a save button or the escape key), is there a preferred way to close the window?

E.g.,

window.destroy()
# versus
window.emit('delete-event')
8
задан Cœur 2 April 2018 в 01:33
поделиться