About dialog: close when the close button is pressed (#270)

Fixes #242.
This commit is contained in:
Charlène 2021-02-14 13:02:30 +01:00 committed by GitHub
parent eff22c2bfc
commit 15da090d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,13 @@ public class Tootle.Dialogs.About : AboutDialog {
artists = Build.get_artists ();
translator_credits = Build.TRANSLATOR != " " ? Build.TRANSLATOR : null;
response.connect ((response_id) => {
if (response_id == Gtk.ResponseType.CANCEL ||
response_id == Gtk.ResponseType.DELETE_EVENT) {
hide_on_delete ();
}
});
present ();
}