From 99973f56fd48e63fc916d20c16a49da6471e4a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 12 Apr 2023 15:20:42 +0200 Subject: [PATCH] tests: Stop using Gtk.PolicyType St got its own enum type years ago, so use that. Part-of: --- tests/interactive/scroll-view-sizing.js | 4 ++-- tests/interactive/scrolling.js | 8 ++++---- tests/testcommon/ui.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/interactive/scroll-view-sizing.js b/tests/interactive/scroll-view-sizing.js index a6c682e54..be929a4f4 100644 --- a/tests/interactive/scroll-view-sizing.js +++ b/tests/interactive/scroll-view-sizing.js @@ -2,7 +2,7 @@ const UI = imports.testcommon.ui; -const { Clutter, GObject, Gtk, Shell, St } = imports.gi; +const {Clutter, GObject, Shell, St} = imports.gi; // This is an interactive test of the sizing behavior of StScrollView. It // may be interesting in the future to split out the two classes at the @@ -299,7 +299,7 @@ function test() { button.label = 'AUTOMATIC'; break; } - scrollView.set_policy(Gtk.PolicyType[hpolicy.label], Gtk.PolicyType[vpolicy.label]); + scrollView.set_policy(St.PolicyType[hpolicy.label], St.PolicyType[vpolicy.label]); } hpolicy.connect('clicked', () => { togglePolicy(hpolicy); }); diff --git a/tests/interactive/scrolling.js b/tests/interactive/scrolling.js index 91951ce10..ab526f97e 100644 --- a/tests/interactive/scrolling.js +++ b/tests/interactive/scrolling.js @@ -2,7 +2,7 @@ const UI = imports.testcommon.ui; -const { Clutter, Gtk, St } = imports.gi; +const {Clutter, St} = imports.gi; function test() { let stage = new Clutter.Stage(); @@ -22,9 +22,9 @@ function test() { vbox.add(v, { expand: true }); toggle.connect('notify::checked', () => { - v.set_policy(toggle.checked ? Gtk.PolicyType.AUTOMATIC - : Gtk.PolicyType.NEVER, - Gtk.PolicyType.AUTOMATIC); + v.set_policy(toggle.checked ? St.PolicyType.AUTOMATIC + : St.PolicyType.NEVER, + St.PolicyType.AUTOMATIC); }); let b = new St.BoxLayout({ vertical: true, diff --git a/tests/testcommon/ui.js b/tests/testcommon/ui.js index abacea5f7..d426c0b38 100644 --- a/tests/testcommon/ui.js +++ b/tests/testcommon/ui.js @@ -2,7 +2,7 @@ const Config = imports.misc.config; -imports.gi.versions = { Clutter: Config.LIBMUTTER_API_VERSION, Gtk: '3.0' }; +imports.gi.versions = {Clutter: Config.LIBMUTTER_API_VERSION}; const { Clutter, Gio, GLib, St } = imports.gi;