From e9c72d3f2e90e341fe014d7c0ccfa8859ba13754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Wed, 20 Jan 2021 19:30:07 +0100 Subject: [PATCH] Remove workarounds for GTK 3.99.X versions Clapper build scripts were updated to GTK 4.0.0 some time ago. Most distros either received GTK 4.0 from start or an update to it. No point in having a special workarounds to support 3.99.X versions. --- clapper_src/misc.js | 1 - clapper_src/player.js | 4 +--- clapper_src/widget.js | 10 ++-------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/clapper_src/misc.js b/clapper_src/misc.js index 2c55946b..05c5d1eb 100644 --- a/clapper_src/misc.js +++ b/clapper_src/misc.js @@ -14,7 +14,6 @@ var settings = new Gio.Settings({ }); var maxVolume = 1.5; -var isOldGtk = (Gtk.MINOR_VERSION === 99 && Gtk.MICRO_VERSION <= 4); let inhibitCookie; diff --git a/clapper_src/player.js b/clapper_src/player.js index e0af0fe4..1a49eaa8 100644 --- a/clapper_src/player.js +++ b/clapper_src/player.js @@ -372,9 +372,7 @@ class ClapperPlayer extends PlayerBase const clapperWidget = this.widget.get_ancestor(Gtk.Grid); if(!clapperWidget.fullscreenMode) { - const size = (Misc.isOldGtk) - ? window.get_size() - : window.get_default_size(); + const size = window.get_default_size(); if(size[0] > 0 && size[1] > 0) clapperWidget._saveWindowSize(size); diff --git a/clapper_src/widget.js b/clapper_src/widget.js index c0dfd8e2..f0d5589c 100644 --- a/clapper_src/widget.js +++ b/clapper_src/widget.js @@ -136,9 +136,7 @@ class ClapperWidget extends Gtk.Grid return; const root = this.get_root(); - const size = (Misc.isOldGtk) - ? root.get_size() - : root.get_default_size(); + const size = root.get_default_size(); this._saveWindowSize(size); @@ -163,11 +161,7 @@ class ClapperWidget extends Gtk.Grid ? this.floatSize : this.windowSize; - if(Misc.isOldGtk) - root.resize(resize[0], resize[1]); - else - root.set_default_size(resize[0], resize[1]); - + root.set_default_size(resize[0], resize[1]); debug(`resized window: ${resize[0]}x${resize[1]}`); this.revealerBottom.showChild(false);