[gnome-documents] searchbar: Let <Primary>a work in the OverviewSearchbar



commit 940b7538584a1d3cecb608d38b943abb368121b1
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue May 28 15:49:19 2013 +0200

    searchbar: Let <Primary>a work in the OverviewSearchbar
    
    Disable the application-wide action select-all when we show the
    OverviewSearchbar so that <Primary>a can be used to select the text
    instead of getting eaten up by the application to select all the items
    in the overview.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699611

 src/searchbar.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/searchbar.js b/src/searchbar.js
index 364ecd4..5632952 100644
--- a/src/searchbar.js
+++ b/src/searchbar.js
@@ -260,6 +260,7 @@ const OverviewSearchbar = new Lang.Class({
 
     _init: function(dropdown) {
         this._dropdown = dropdown;
+        this._selectAll = Application.application.lookup_action('select-all');
 
         this.parent();
 
@@ -403,8 +404,14 @@ const OverviewSearchbar = new Lang.Class({
         this.parent();
     },
 
+    show: function() {
+        this._selectAll.enabled = false;
+        this.parent();
+    },
+
     hide: function() {
         this._dropdownButton.set_active(false);
+        this._selectAll.enabled = true;
 
         Application.searchTypeManager.setActiveItemById('all');
         Application.searchMatchManager.setActiveItemById('all');


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