[sushi] Use native new() constructors
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] Use native new() constructors
- Date: Sun, 2 Jun 2019 18:01:04 +0000 (UTC)
commit 5d66b1c3430116e28084df85d59c6bf573c4e1ad
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Apr 2 15:39:22 2017 -0700
Use native new() constructors
Instead of the C utilities.
src/js/ui/spinnerBox.js | 5 +++--
src/js/viewers/evince.js | 2 +-
src/js/viewers/text.js | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/js/ui/spinnerBox.js b/src/js/ui/spinnerBox.js
index 3aa95b7..32c132e 100644
--- a/src/js/ui/spinnerBox.js
+++ b/src/js/ui/spinnerBox.js
@@ -44,10 +44,11 @@ var SpinnerBox = new Lang.Class({
this.canFullScreen = false;
this.moveOnClick = true;
- this._spinnerBox = Gtk.Box.new(Gtk.Orientation.VERTICAL, 12);
+ this._spinnerBox = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL,
+ spacing: 12 });
this._spinnerBox.show();
- this._spinner = Gtk.Spinner.new();
+ this._spinner = new Gtk.Spinner();
this._spinner.show();
this._spinner.set_size_request(SPINNER_SIZE, SPINNER_SIZE);
this._spinnerBox.pack_start(this._spinner, true, true, 0);
diff --git a/src/js/viewers/evince.js b/src/js/viewers/evince.js
index cb0c35b..f6cea9f 100644
--- a/src/js/viewers/evince.js
+++ b/src/js/viewers/evince.js
@@ -92,7 +92,7 @@ const EvinceRenderer = new Lang.Class({
this._view = EvView.View.new();
this._view.show();
- this._scrolledWin = Gtk.ScrolledWindow.new(null, null);
+ this._scrolledWin = new Gtk.ScrolledWindow();
this._scrolledWin.set_min_content_width(Constants.VIEW_MIN);
this._scrolledWin.set_min_content_height(Constants.VIEW_MIN);
this._scrolledWin.show();
diff --git a/src/js/viewers/text.js b/src/js/viewers/text.js
index a044fbe..11af034 100644
--- a/src/js/viewers/text.js
+++ b/src/js/viewers/text.js
@@ -96,7 +96,7 @@ const TextRenderer = new Lang.Class({
return false;
}));
- this._scrolledWin = Gtk.ScrolledWindow.new(null, null);
+ this._scrolledWin = new Gtk.ScrolledWindow();
this._scrolledWin.add(this._view);
this._scrolledWin.show_all();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]