[gnome-shell/wip/fmuellner/more-minor-bug-fixes: 3/4] Don't mistake GObject.registerClass() for a constructor



commit 6893149da05daa307025904d75655e15c7ba56ba
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jan 31 20:38:24 2019 +0100

    Don't mistake GObject.registerClass() for a constructor
    
    Those slipped through when porting from Lang.Class to ES6 classes.
    
    Very indirectly spotted by eslint.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/388

 js/ui/kbdA11yDialog.js | 2 +-
 js/ui/keyboard.js      | 2 +-
 js/ui/messageList.js   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/kbdA11yDialog.js b/js/ui/kbdA11yDialog.js
index d789abac5..c09466b4f 100644
--- a/js/ui/kbdA11yDialog.js
+++ b/js/ui/kbdA11yDialog.js
@@ -8,7 +8,7 @@ const KEYBOARD_A11Y_SCHEMA    = 'org.gnome.desktop.a11y.keyboard';
 const KEY_STICKY_KEYS_ENABLED = 'stickykeys-enable';
 const KEY_SLOW_KEYS_ENABLED   = 'slowkeys-enable';
 
-var KbdA11yDialog = new GObject.registerClass(
+var KbdA11yDialog = GObject.registerClass(
 class KbdA11yDialog extends GObject.Object {
     _init() {
         super._init();
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index a57326361..c4b173e8c 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -54,7 +54,7 @@ const defaultKeysPost = [
       [{ width: 1.5, action: 'languageMenu', extraClassName: 'layout-key' }, { width: 1.5, action: 'hide', 
extraClassName: 'hide-key' }] ],
 ];
 
-var KeyContainer = new GObject.registerClass(
+var KeyContainer = GObject.registerClass(
 class KeyContainer extends St.Widget {
     _init() {
         let gridLayout = new Clutter.GridLayout({ orientation: Clutter.Orientation.HORIZONTAL,
diff --git a/js/ui/messageList.js b/js/ui/messageList.js
index 510f1b007..29bf1c4e8 100644
--- a/js/ui/messageList.js
+++ b/js/ui/messageList.js
@@ -159,7 +159,7 @@ var URLHighlighter = class URLHighlighter {
     }
 };
 
-var ScaleLayout = new GObject.registerClass(
+var ScaleLayout = GObject.registerClass(
 class ScaleLayout extends Clutter.BinLayout {
     _init(params) {
         this._container = null;


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