[gnome-shell] app-display: Only reset filters when they have been initialized



commit 8f7d5cde9067f7053db44b19740d5b62f34af61f
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Feb 10 12:56:19 2011 +0100

    app-display: Only reset filters when they have been initialized
    
    The view might get mapped before the filters have been added, so
    trying to reset to the "All" filter will throw an exception. Fix
    by only do the reset if the filters have been initialized.

 js/ui/appDisplay.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index ad3da75..a723cea 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -115,7 +115,7 @@ ViewByCategories.prototype = {
         // Always select the "All" filter when switching to the app view
         this.actor.connect('notify::mapped', Lang.bind(this,
             function() {
-                if (this.actor.mapped)
+                if (this.actor.mapped && this._allFilter)
                     this._selectCategory(-1);
             }));
 



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