From 20dce532ae3e340995dab3fb0bc991fad482f11a Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sun, 23 Jan 2022 16:47:31 +0100 Subject: [PATCH] :wrench: Port to newest version --- resources/ui/gtk4/SnapOfDisintegration.ui | 4 ---- src/SnapOfDisintegration.js | 9 +++------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/resources/ui/gtk4/SnapOfDisintegration.ui b/resources/ui/gtk4/SnapOfDisintegration.ui index 2cbb268..00774d2 100644 --- a/resources/ui/gtk4/SnapOfDisintegration.ui +++ b/resources/ui/gtk4/SnapOfDisintegration.ui @@ -3,10 +3,6 @@ vertical - 60 - 60 - 60 - 60 diff --git a/src/SnapOfDisintegration.js b/src/SnapOfDisintegration.js index 0d9a5b5..e268bd7 100644 --- a/src/SnapOfDisintegration.js +++ b/src/SnapOfDisintegration.js @@ -59,7 +59,7 @@ var SnapOfDisintegration = class SnapOfDisintegration { // This is called by the preferences dialog. It loads the settings page for this effect, // binds all properties to the settings and appends the page to the main stack of the // preferences dialog. - static initPreferences(dialog) { + static getPreferences(dialog) { // Add the settings page to the builder. dialog.getBuilder().add_from_resource('/ui/gtk4/SnapOfDisintegration.ui'); @@ -69,11 +69,8 @@ var SnapOfDisintegration = class SnapOfDisintegration { dialog.bindAdjustment('snap-scale'); dialog.bindColorButton('snap-color'); - // Finally, append the settings page to the main stack. - const stack = dialog.getBuilder().get_object('main-stack'); - stack.add_titled( - dialog.getBuilder().get_object('snap-prefs'), SnapOfDisintegration.getNick(), - SnapOfDisintegration.getLabel()); + // Finally, return the new settings page. + return dialog.getBuilder().get_object('snap-prefs'); } // ---------------------------------------------------------------- API for extension.js