[gnome-sound-recorder/wip/cdavis/typescript] application: Fix activation



commit db6aa534e781e0aa72120c557c9149ef712933cb
Author: Christopher Davis <christopherdavis gnome org>
Date:   Wed Aug 24 13:01:52 2022 -0400

    application: Fix activation

 src/application.ts | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/application.ts b/src/application.ts
index 81fad40..2ebf19a 100644
--- a/src/application.ts
+++ b/src/application.ts
@@ -119,10 +119,13 @@ export class Application extends Adw.Application {
     }
 
     public vfunc_activate(): void {
-        this.window = new Window({ application: this });
-        if (pkg.name.endsWith('Devel'))
-            this.window.add_css_class('devel');
-        this.window.show();
+        if (!this.window) {
+            this.window = new Window({ application: this });
+            if (pkg.name.endsWith('Devel'))
+                this.window.add_css_class('devel');
+        }
+
+        this.window.present();
     }
 
     private showAbout(): void {


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