[gnome-sound-recorder/bilelmoussaoui/better-shortcuts] misc: use prop setter when possible



commit 4a8053d54684a47c9d012a091eb278e39facbd6a
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Wed Sep 9 15:43:58 2020 +0200

    misc: use prop setter when possible

 src/recorderWidget.js | 16 ++++++++--------
 src/row.js            |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/recorderWidget.js b/src/recorderWidget.js
index fd771c4..6d33ffb 100644
--- a/src/recorderWidget.js
+++ b/src/recorderWidget.js
@@ -139,20 +139,20 @@ var RecorderWidget = GObject.registerClass({
     set state(recorderState) {
         switch (recorderState) {
         case RecorderState.PAUSED:
-            this.actionsGroup.lookup('pause').set_enabled(false);
-            this.actionsGroup.lookup('resume').set_enabled(true);
+            this.actionsGroup.lookup('pause').enabled = false;
+            this.actionsGroup.lookup('resume').enabled = true;
             this._resumeBtn.grab_focus();
             break;
         case RecorderState.RECORDING:
-            this.actionsGroup.lookup('start').set_enabled(false);
-            this.actionsGroup.lookup('stop').set_enabled(true);
-            this.actionsGroup.lookup('resume').set_enabled(false);
-            this.actionsGroup.lookup('pause').set_enabled(true);
+            this.actionsGroup.lookup('start').enabled = false;
+            this.actionsGroup.lookup('stop').enabled = true;
+            this.actionsGroup.lookup('resume').enabled = false;
+            this.actionsGroup.lookup('pause').enabled = true;
             this._pauseBtn.grab_focus();
             break;
         case RecorderState.STOPPED:
-            this.actionsGroup.lookup('start').set_enabled(true);
-            this.actionsGroup.lookup('stop').set_enabled(false);
+            this.actionsGroup.lookup('start').enabled = true;
+            this.actionsGroup.lookup('stop').enabled = false;
             break;
         }
     }
diff --git a/src/row.js b/src/row.js
index e33e8d2..ba7c989 100644
--- a/src/row.js
+++ b/src/row.js
@@ -150,10 +150,10 @@ var Row = GObject.registerClass({
         });
 
         // Force LTR, we don't want forward/play/backward
-        this._playbackControls.set_direction(Gtk.TextDirection.LTR);
+        this._playbackControls.direction = Gtk.TextDirection.LTR;
 
         // Force LTR, we don't want reverse hh:mm::ss
-        this._duration.set_direction(Gtk.TextDirection.LTR);
+        this._duration.direction = Gtk.TextDirection.LTR;
         this._duration.label = formatTime(recording.duration / Gst.SECOND);
         recording.connect('notify::duration', () => {
             this._duration.label = formatTime(recording.duration / Gst.SECOND);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]