wanda: Use an StIcon again for createIcon
With the DND bug fixed, this is no longer necessary.
This commit is contained in:
parent
24efeff788
commit
e2ff5846df
@ -1,11 +1,9 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
|
||||||
const GdkPixbuf = imports.gi.GdkPixbuf;
|
const GdkPixbuf = imports.gi.GdkPixbuf;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Shell = imports.gi.Shell;
|
|
||||||
const Signals = imports.signals;
|
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
const IconGrid = imports.ui.iconGrid;
|
const IconGrid = imports.ui.iconGrid;
|
||||||
@ -169,15 +167,8 @@ const WandaSearchProvider = new Lang.Class({
|
|||||||
// only one which speaks the truth!
|
// only one which speaks the truth!
|
||||||
'name': capitalize(fish[0]),
|
'name': capitalize(fish[0]),
|
||||||
'createIcon': function(iconSize) {
|
'createIcon': function(iconSize) {
|
||||||
// for DND only (maybe could be improved)
|
return new St.Icon({ gicon: Gio.icon_new_for_string('face-smile'),
|
||||||
// DON'T use St.Icon here, it crashes the shell
|
icon_size: iconSize });
|
||||||
// (dnd.js code assumes it can query the actor size
|
|
||||||
// without parenting it, while StWidget accesses
|
|
||||||
// StThemeNode in get_preferred_width/height, which
|
|
||||||
// triggers an assertion failure)
|
|
||||||
return St.TextureCache.get_default().load_icon_name(null,
|
|
||||||
'face-smile',
|
|
||||||
iconSize);
|
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user