[gnome-shell] search-display: Enable swipe scrolling



commit 1b383c72859da0f30379f2279e852ffa898711c0
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jan 21 23:49:03 2011 +0100

    search-display: Enable swipe scrolling
    
    If a search gives many results from various providers, the result
    area will be scrollable, so enable swipe-scrolling here as well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=635034

 js/ui/searchDisplay.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index f85eb67..45fccd6 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -10,6 +10,7 @@ const St = imports.gi.St;
 const DND = imports.ui.dnd;
 const IconGrid = imports.ui.iconGrid;
 const Main = imports.ui.main;
+const Overview = imports.ui.overview;
 const Search = imports.ui.search;
 
 const MAX_SEARCH_RESULTS_ROWS = 2;
@@ -175,6 +176,15 @@ SearchResults.prototype = {
                                      expand: true,
                                      x_align: St.Align.START,
                                      y_align: St.Align.START });
+        this.actor.connect('notify::mapped', Lang.bind(this,
+            function() {
+                if (!this.actor.mapped)
+                    return;
+
+                let adjustment = scrollView.vscroll.adjustment;
+                let direction = Overview.SwipeScrollDirection.VERTICAL;
+                Main.overview.setScrollAdjustment(adjustment, direction);
+            }));
 
         this._statusText = new St.Label({ style_class: 'search-statustext' });
         this._content.add(this._statusText);



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