From acff1da6c2426c02d396bedf97e306ae407f7f21 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Thu, 27 Jan 2022 06:53:30 +0100 Subject: [PATCH] :beetle: Prevent registering the same type twice --- prefs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prefs.js b/prefs.js index e206641..ffe9c17 100644 --- a/prefs.js +++ b/prefs.js @@ -304,6 +304,7 @@ var PreferencesDialog = class PreferencesDialog { // Each effect page is based on a template widget. This template contains the title // and the preview button. // clang-format off + if (GObject.type_from_name('BurnMyWindowsEffectPage') == null) { BurnMyWindowsEffectPage = GObject.registerClass({ GTypeName: 'BurnMyWindowsEffectPage', @@ -370,7 +371,8 @@ var PreferencesDialog = class PreferencesDialog { }); } }); - // clang-format on + // clang-format on + } } }