Rename "fullscreenMode" boolean to "isFullscreenMode"

This commit is contained in:
Rafał Dzięgiel
2021-02-16 17:11:29 +01:00
parent 887f189b60
commit e79ce58b26
2 changed files with 14 additions and 14 deletions

View File

@@ -312,7 +312,7 @@ class ClapperPlayer extends PlayerBase
const clapperWidget = this.widget.get_ancestor(Gtk.Grid); const clapperWidget = this.widget.get_ancestor(Gtk.Grid);
return clapperWidget.fullscreenMode; return clapperWidget.isFullscreenMode;
} }
_setHideControlsTimeout() _setHideControlsTimeout()
@@ -328,7 +328,7 @@ class ClapperPlayer extends PlayerBase
this.widget.set_cursor(blankCursor); this.widget.set_cursor(blankCursor);
clapperWidget.revealerTop.set_cursor(blankCursor); clapperWidget.revealerTop.set_cursor(blankCursor);
if(clapperWidget.fullscreenMode) if(clapperWidget.isFullscreenMode)
this._clearTimeout('updateTime'); this._clearTimeout('updateTime');
clapperWidget.revealControls(false); clapperWidget.revealControls(false);
@@ -351,7 +351,7 @@ class ClapperPlayer extends PlayerBase
this._updateTimeTimeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, nextUpdate, () => { this._updateTimeTimeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, nextUpdate, () => {
this._updateTimeTimeout = null; this._updateTimeTimeout = null;
if(clapperWidget.fullscreenMode) if(clapperWidget.isFullscreenMode)
this._setUpdateTimeInterval(); this._setUpdateTimeInterval();
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
@@ -377,7 +377,7 @@ class ClapperPlayer extends PlayerBase
const clapperWidget = this.widget.get_ancestor(Gtk.Grid); const clapperWidget = this.widget.get_ancestor(Gtk.Grid);
if(!clapperWidget.fullscreenMode && clapperWidget.controlsRevealer.child_revealed) { if(!clapperWidget.isFullscreenMode && clapperWidget.controlsRevealer.child_revealed) {
const size = window.get_default_size(); const size = window.get_default_size();
if(size[0] > 0 && size[1] > 0) { if(size[0] > 0 && size[1] > 0) {
@@ -484,7 +484,7 @@ class ClapperPlayer extends PlayerBase
if(settings.get_boolean('fullscreen-auto')) { if(settings.get_boolean('fullscreen-auto')) {
const root = player.widget.get_root(); const root = player.widget.get_root();
const clapperWidget = root.get_child(); const clapperWidget = root.get_child();
if(!clapperWidget.fullscreenMode) { if(!clapperWidget.isFullscreenMode) {
this.playOnFullscreen = true; this.playOnFullscreen = true;
root.fullscreen(); root.fullscreen();
@@ -570,7 +570,7 @@ class ClapperPlayer extends PlayerBase
this.toggle_play(); this.toggle_play();
break; break;
case Gdk.KEY_Return: case Gdk.KEY_Return:
if(clapperWidget.fullscreenMode) { if(clapperWidget.isFullscreenMode) {
clapperWidget.revealControls(true); clapperWidget.revealControls(true);
this._setHideControlsTimeout(); this._setHideControlsTimeout();
} }
@@ -589,7 +589,7 @@ class ClapperPlayer extends PlayerBase
clapperWidget.toggleFullscreen(); clapperWidget.toggleFullscreen();
break; break;
case Gdk.KEY_Escape: case Gdk.KEY_Escape:
if(clapperWidget.fullscreenMode) { if(clapperWidget.isFullscreenMode) {
root = this.widget.get_root(); root = this.widget.get_root();
root.unfullscreen(); root.unfullscreen();
} }
@@ -661,7 +661,7 @@ class ClapperPlayer extends PlayerBase
this._setHideControlsTimeout(); this._setHideControlsTimeout();
if(clapperWidget.fullscreenMode) { if(clapperWidget.isFullscreenMode) {
if(!this._updateTimeTimeout) if(!this._updateTimeTimeout)
this._setUpdateTimeInterval(); this._setUpdateTimeInterval();
} }
@@ -685,7 +685,7 @@ class ClapperPlayer extends PlayerBase
return; return;
const clapperWidget = this.widget.get_ancestor(Gtk.Grid); const clapperWidget = this.widget.get_ancestor(Gtk.Grid);
if(clapperWidget.fullscreenMode) if(clapperWidget.isFullscreenMode)
return; return;
const { gtk_double_click_distance } = this.widget.get_settings(); const { gtk_double_click_distance } = this.widget.get_settings();

View File

@@ -23,7 +23,7 @@ class ClapperWidget extends Gtk.Grid
this.windowSize = JSON.parse(settings.get_string('window-size')); this.windowSize = JSON.parse(settings.get_string('window-size'));
this.layoutWidth = 0; this.layoutWidth = 0;
this.fullscreenMode = false; this.isFullscreenMode = false;
this.isSeekable = false; this.isSeekable = false;
this.isMobileMonitor = false; this.isMobileMonitor = false;
@@ -100,17 +100,17 @@ class ClapperWidget extends Gtk.Grid
const root = this.get_root(); const root = this.get_root();
if(!root) return; if(!root) return;
const un = (this.fullscreenMode) ? 'un' : ''; const un = (this.isFullscreenMode) ? 'un' : '';
root[`${un}fullscreen`](); root[`${un}fullscreen`]();
} }
setFullscreenMode(isFullscreen) setFullscreenMode(isFullscreen)
{ {
if(this.fullscreenMode === isFullscreen) if(this.isFullscreenMode === isFullscreen)
return; return;
debug('changing fullscreen mode'); debug('changing fullscreen mode');
this.fullscreenMode = isFullscreen; this.isFullscreenMode = isFullscreen;
const root = this.get_root(); const root = this.get_root();
const action = (isFullscreen) ? 'add' : 'remove'; const action = (isFullscreen) ? 'add' : 'remove';
@@ -527,7 +527,7 @@ class ClapperWidget extends Gtk.Grid
_onLeave(controller) _onLeave(controller)
{ {
if( if(
this.fullscreenMode this.isFullscreenMode
|| this.player.isWidgetDragging || this.player.isWidgetDragging
) )
return; return;