[gnome-shell] iconGrid: Initialize properties in _init



commit 39c4fa1bf0257d143afdf2dd9233a90dcd06312a
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Sep 5 17:59:41 2013 +0200

    iconGrid: Initialize properties in _init
    
    While this is good style anyway, after the latest appDisplay changes
    the first call to get_preferred_height() happens before we properly
    compute those properties, resulting in a size request of NaN that
    triggers a Clutter warning.

 js/ui/iconGrid.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 3715044..8bcb56d 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -533,6 +533,9 @@ const PaginatedIconGrid = new Lang.Class({
     _init: function(params) {
         this.parent(params);
         this._nPages = 0;
+        this._rowsPerPage = 0;
+        this._spaceBetweenPages = 0;
+        this._childrenPerPage = 0;
     },
 
     _getPreferredHeight: function (grid, forWidth, alloc) {


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