[sushi/implement-some-getters] viewers: Implement getters in the viewers child classes
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi/implement-some-getters] viewers: Implement getters in the viewers child classes
- Date: Thu, 22 Oct 2020 08:59:44 +0000 (UTC)
commit 5612141b1e196b0c8e30b72b4a21b2ae7794eec9
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Sep 23 12:59:53 2020 +0200
viewers: Implement getters in the viewers child classes
I have no idea why the getters defined in Renderer.Renderer are not
inherited by their derived classes. I am not very versed in modern
GJS, neither interested much in it.
This fixes sushi tho. :)
Fixes #44
src/ui/fallbackRenderer.js | 8 ++++++++
src/viewers/audio.js | 7 +++++++
src/viewers/evince.js | 8 ++++++++
src/viewers/font.js | 8 ++++++++
src/viewers/gst.js | 8 ++++++++
src/viewers/html.js | 8 ++++++++
src/viewers/image.js | 8 ++++++++
src/viewers/libreoffice.js | 8 ++++++++
src/viewers/text.js | 8 ++++++++
9 files changed, 71 insertions(+)
---
diff --git a/src/ui/fallbackRenderer.js b/src/ui/fallbackRenderer.js
index 5af9774..cfc843e 100644
--- a/src/ui/fallbackRenderer.js
+++ b/src/ui/fallbackRenderer.js
@@ -175,6 +175,14 @@ var FallbackRenderer = GObject.registerClass({
false)
},
}, class FallbackRenderer extends Gtk.Box {
+ get ready() {
+ return !!this._ready;
+ }
+
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file, fileInfo) {
super._init({ orientation: Gtk.Orientation.HORIZONTAL,
spacing: 6 });
diff --git a/src/viewers/audio.js b/src/viewers/audio.js
index e339711..f210165 100644
--- a/src/viewers/audio.js
+++ b/src/viewers/audio.js
@@ -244,6 +244,13 @@ var Klass = GObject.registerClass({
false)
},
}, class AudioRenderer extends Gtk.Overlay {
+ get ready() {
+ return !!this._ready;
+ }
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file) {
super._init();
diff --git a/src/viewers/evince.js b/src/viewers/evince.js
index 5330eea..9eb36a9 100644
--- a/src/viewers/evince.js
+++ b/src/viewers/evince.js
@@ -42,6 +42,14 @@ var Klass = GObject.registerClass({
false)
},
}, class EvinceRenderer extends Gtk.ScrolledWindow {
+ get ready() {
+ return !!this._ready;
+ }
+
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file, fileInfo) {
super._init({ visible: true,
min_content_height: Constants.VIEW_MIN,
diff --git a/src/viewers/font.js b/src/viewers/font.js
index 9bba13d..330c92b 100644
--- a/src/viewers/font.js
+++ b/src/viewers/font.js
@@ -38,6 +38,14 @@ var Klass = GObject.registerClass({
false)
},
}, class FontRenderer extends Sushi.FontWidget {
+ get ready() {
+ return !!this._ready;
+ }
+
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file) {
super._init({ uri: file.get_uri(),
visible: true })
diff --git a/src/viewers/gst.js b/src/viewers/gst.js
index 14d4b00..0c5654a 100644
--- a/src/viewers/gst.js
+++ b/src/viewers/gst.js
@@ -39,6 +39,14 @@ var Klass = GObject.registerClass({
false)
},
}, class GstRenderer extends Sushi.MediaBin {
+ get ready() {
+ return !!this._ready;
+ }
+
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file) {
super._init({ uri: file.get_uri() });
diff --git a/src/viewers/html.js b/src/viewers/html.js
index a20d55d..3de4455 100644
--- a/src/viewers/html.js
+++ b/src/viewers/html.js
@@ -38,6 +38,14 @@ var Klass = GObject.registerClass({
false)
},
}, class HTMLRenderer extends WebKit2.WebView {
+ get ready() {
+ return !!this._ready;
+ }
+
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file) {
super._init();
diff --git a/src/viewers/image.js b/src/viewers/image.js
index bae07cd..8befc05 100644
--- a/src/viewers/image.js
+++ b/src/viewers/image.js
@@ -38,6 +38,14 @@ var Klass = GObject.registerClass({
false)
},
}, class ImageRenderer extends Gtk.DrawingArea {
+ get ready() {
+ return !!this._ready;
+ }
+
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file) {
super._init();
diff --git a/src/viewers/libreoffice.js b/src/viewers/libreoffice.js
index d153223..8302b4e 100644
--- a/src/viewers/libreoffice.js
+++ b/src/viewers/libreoffice.js
@@ -24,6 +24,14 @@ var Klass = GObject.registerClass({
false)
},
}, class LibreofficeRenderer extends Gtk.ScrolledWindow {
+ get ready() {
+ return !!this._ready;
+ }
+
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file) {
super._init({ hexpand: true,
visible: true,
diff --git a/src/viewers/text.js b/src/viewers/text.js
index 52d4b17..c621efd 100644
--- a/src/viewers/text.js
+++ b/src/viewers/text.js
@@ -38,6 +38,14 @@ var Klass = GObject.registerClass({
false)
},
}, class TextRenderer extends Gtk.ScrolledWindow {
+ get ready() {
+ return !!this._ready;
+ }
+
+ get fullscreen() {
+ return !!this._fullscreen;
+ }
+
_init(file, fileInfo) {
super._init();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]