[gnome-shell] iconGrid: Don't enter an infinite loop
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] iconGrid: Don't enter an infinite loop
- Date: Tue, 7 Feb 2012 22:40:47 +0000 (UTC)
commit 27b34992c69d42a1725b8223c66b4c9f78a39aa5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Nov 19 15:27:36 2011 -0500
iconGrid: Don't enter an infinite loop
If both spacing and -shell-grid-item-size are 0, as they would be with nothing
setting them, we enter an infinite loop where we try to compute the layout.
Avoid the situation entirely by defaulting -shell-grid-item-size to a sane
value instead of 0.
https://bugzilla.gnome.org/show_bug.cgi?id=662747
js/ui/iconGrid.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index b93f6c0..f893d5d 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -305,7 +305,7 @@ const IconGrid = new Lang.Class({
_onStyleChanged: function() {
let themeNode = this.actor.get_theme_node();
this._spacing = themeNode.get_length('spacing');
- this._item_size = themeNode.get_length('-shell-grid-item-size');
+ this._item_size = themeNode.get_length('-shell-grid-item-size') || ICON_SIZE;
this._grid.queue_relayout();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]