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.
This commit is contained in:
Rafał Dzięgiel
2021-01-20 19:30:07 +01:00
parent f5fef2df5b
commit e9c72d3f2e
3 changed files with 3 additions and 12 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);