From 7da39031e19ed9393d84d19bc1d0c8968a424d34 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 9 Jan 2012 16:33:36 +0100 Subject: [PATCH] Place display: don't use a StIcon for DND DND code assumes it can query the size of the actor before parenting, while StWidget asserts that get_preferred_size() is only called after the actor is on stage. This fixes a crash while dragging "Connect to..." https://bugzilla.gnome.org/show_bug.cgi?id=633028 --- js/ui/placeDisplay.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js index 9241ebf56..539e2c696 100644 --- a/js/ui/placeDisplay.js +++ b/js/ui/placeDisplay.js @@ -155,9 +155,12 @@ const PlacesManager = new Lang.Class({ this._connect = new PlaceInfo('special:connect', _("Connect to..."), function (size) { - return new St.Icon({ icon_name: 'applications-internet', - icon_type: St.IconType.FULLCOLOR, - icon_size: size }); + // do NOT use St.Icon here, it crashes the shell + // see wanda.js for details + return St.TextureCache.get_default().load_icon_name('applications-internet', + null, + St.IconType.FULLCOLOR, + size); }, function (params) { // BUG: nautilus-connect-server doesn't have a desktop file, so we can't