[gnome-shell] Place display: don't use a StIcon for DND



commit 7da39031e19ed9393d84d19bc1d0c8968a424d34
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Jan 9 16:33:36 2012 +0100

    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 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 9241ebf..539e2c6 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



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