[gnome-shell] js: Do not set entries' ClutterText:editable property



commit 4f427f4e0dbfe721f883c7eb8670957659782abc
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Mar 18 22:20:33 2020 +0100

    js: Do not set entries' ClutterText:editable property
    
    The property influences the text's (and thus entry's) minimum width[0],
    which is generally not what we want. And as we now prevent text from
    being entered in non-reactive entries by other means, we can simply
    drop it.
    
    [0] https://gitlab.gnome.org/GNOME/mutter/-/blob/master/clutter/clutter/clutter-text.c#L2940
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423

 js/gdm/authPrompt.js         | 1 -
 js/ui/appDisplay.js          | 1 -
 js/ui/components/keyring.js  | 8 ++------
 js/ui/shellMountOperation.js | 4 ----
 4 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index a9623f5705..3434de0cf0 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -425,7 +425,6 @@ var AuthPrompt = GObject.registerClass({
 
     updateSensitivity(sensitive) {
         this._entry.reactive = sensitive;
-        this._entry.clutter_text.editable = sensitive;
     }
 
     vfunc_hide() {
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index a8c0cb3c22..4f3d88df54 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -691,7 +691,6 @@ var AllView = GObject.registerClass({
 
             // Toggle search entry
             Main.overview.searchEntry.reactive = !isOpen;
-            Main.overview.searchEntry.clutter_text.editable = !isOpen;
 
             this._displayingPopup = isOpen;
         });
diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js
index c0191fbba9..8623f2fdd4 100644
--- a/js/ui/components/keyring.js
+++ b/js/ui/components/keyring.js
@@ -111,15 +111,11 @@ class KeyringDialog extends ModalDialog.ModalDialog {
     }
 
     _updateSensitivity(sensitive) {
-        if (this._passwordEntry) {
+        if (this._passwordEntry)
             this._passwordEntry.reactive = sensitive;
-            this._passwordEntry.clutter_text.editable = sensitive;
-        }
 
-        if (this._confirmEntry) {
+        if (this._confirmEntry)
             this._confirmEntry.reactive = sensitive;
-            this._confirmEntry.clutter_text.editable = sensitive;
-        }
 
         this._continueButton.can_focus = sensitive;
         this._continueButton.reactive = sensitive;
diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js
index e17b0bc174..dc620a09d1 100644
--- a/js/ui/shellMountOperation.js
+++ b/js/ui/shellMountOperation.js
@@ -447,12 +447,8 @@ var ShellMountPasswordDialog = GObject.registerClass({
         let useKeyfiles = this._keyfilesCheckbox.checked;
         this._passwordEntry.reactive = !useKeyfiles;
         this._passwordEntry.can_focus = !useKeyfiles;
-        this._passwordEntry.clutter_text.editable = !useKeyfiles;
-        this._passwordEntry.clutter_text.selectable = !useKeyfiles;
         this._pimEntry.reactive = !useKeyfiles;
         this._pimEntry.can_focus = !useKeyfiles;
-        this._pimEntry.clutter_text.editable = !useKeyfiles;
-        this._pimEntry.clutter_text.selectable = !useKeyfiles;
         this._rememberChoice.reactive = !useKeyfiles;
         this._rememberChoice.can_focus = !useKeyfiles;
         this._keyfilesLabel.visible = useKeyfiles;


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