[polari] entryArea: ... and switch back to properties



commit 427a703b39ec405a7d9ae4e0ead87650d6fb930a
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jul 22 11:18:25 2017 +0200

    entryArea: ... and switch back to properties
    
    In case where a method- and property name overlap, using the method
    is less unambiguous than I thought - mozjs52-based gjs will only see
    the method, while mozjs38-based gjs will only see the property. We
    are in luck though, and the real property names contain dashes that
    allow us to refer to the properties in a way that works for all gjs
    versions.

 src/entryArea.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/entryArea.js b/src/entryArea.js
index 485af8e..c112b3b 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -249,7 +249,7 @@ var EntryArea = new Lang.Class({
         let toplevelFocus = this._chatEntry.get_toplevel().get_focus();
         return this.sensitive &&
                this._chatEntry.get_mapped() &&
-               !this._chatEntry.has_focus() &&
+               !this._chatEntry['has-focus'] &&
                !(toplevelFocus instanceof Gtk.Entry);
     },
 
@@ -422,7 +422,7 @@ var EntryArea = new Lang.Class({
         this._nickLabel.width_chars = Math.max(nick.length, this._maxNickChars);
         this._nickLabel.label = nick;
 
-        if (!this._nickEntry.is_focus())
+        if (!this._nickEntry['is-focus'])
             this._nickEntry.text = nick;
     },
 


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