From 32d28d7bf2646fc7a0008937034246fcc96dbc8a Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Tue, 6 Dec 2022 02:49:19 +0100 Subject: misc src/: make ArcticaGreeter a proper vala SingleInstance class. This allows us to drop the rather awkward self-referencing static singleton member and use a standard vala/glib feature. --- src/dash-box.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dash-box.vala') diff --git a/src/dash-box.vala b/src/dash-box.vala index cc1d715..d8fe6fd 100644 --- a/src/dash-box.vala +++ b/src/dash-box.vala @@ -54,7 +54,8 @@ public class DashBox : Gtk.Box /* Does not actually add w to this widget, as doing so would potentially mess with w's placement. */ public void set_base (Gtk.Widget? w) { - if (!ArcticaGreeter.singleton.test_mode) { + var greeter = new ArcticaGreeter (); + if (!greeter.test_mode) { return_if_fail (pushed == null); return_if_fail (mode == Mode.NORMAL); } -- cgit v1.2.3