[four-in-a-row/arnaudb/wip/gtk4: 63/92] Use hide-on-close property.




commit f55ac1538758ae669c6de58cc0ec58c88c864849
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sun Apr 19 19:51:13 2020 +0200

    Use hide-on-close property.

 src/scorebox.vala | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/scorebox.vala b/src/scorebox.vala
index 7077dcb..164afa2 100644
--- a/src/scorebox.vala
+++ b/src/scorebox.vala
@@ -41,7 +41,8 @@ private class Scorebox : Dialog
                 application: application,
                 transient_for: parent,
                 modal: true,
-                theme_manager: theme_manager);
+                theme_manager: theme_manager,
+                hide_on_close: true);
     }
 
     construct
@@ -132,12 +133,6 @@ private class Scorebox : Dialog
         label_score_end.label = scores [Player.NOBODY].to_string ();
     }
 
-    protected override bool delete_event (Gdk.EventAny event)   // TODO use hide_on_delete (Gtk3) or 
hide-on-close (Gtk4)
-    {
-        hide ();
-        return true;
-    }
-
     /*\
     * * score management
     \*/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]