[gnome-shell] shellEntry: Disable copy action for password entries



commit 9e31f05861e95cd48020a7b5f1573bd5b7c17c34
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Mar 4 16:22:16 2013 +0100

    shellEntry: Disable copy action for password entries
    
    Curently it is possible to copy the content of password entries,
    and paste it elsewhere in clear text. This is undesirable, so
    follow GTK+'s behavior and disable the copy action for password
    entries.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695104

 js/ui/shellEntry.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
index b71c809..61e43a9 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -89,7 +89,8 @@ const EntryMenu = new Lang.Class({
 
     _updateCopyItem: function() {
         let selection = this._entry.clutter_text.get_selection();
-        this._copyItem.setSensitive(selection && selection != '');
+        this._copyItem.setSensitive(!this._entry.clutter_text.password_char &&
+                                    selection && selection != '');
     },
 
     _updatePasteItem: function() {


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