lookingGlass: Use standard icon names for GC icon

Commit b929320d4 added a toolbar item to force garbage collection,
however it won't be visible for most users, as it uses a non-standard
legacy icon name (the default icon theme dropped it as far back as 2009).

https://bugzilla.gnome.org/show_bug.cgi?id=782982
This commit is contained in:
Florian Müllner 2017-05-23 11:04:28 +02:00
parent 83fb34608c
commit 7e7e3ec016

View File

@ -833,19 +833,19 @@ const LookingGlass = new Lang.Class({
return Clutter.EVENT_STOP;
}));
let gcIcon = new St.Icon({ icon_name: 'gnome-fs-trash-full',
let gcIcon = new St.Icon({ icon_name: 'user-trash-full',
icon_size: 24 });
toolbar.add_actor(gcIcon);
gcIcon.reactive = true;
gcIcon.connect('button-press-event', Lang.bind(this, function () {
gcIcon.icon_name = 'gnome-fs-trash-empty';
gcIcon.icon_name = 'user-trash';
System.gc();
this._timeoutId = Mainloop.timeout_add(500, Lang.bind(this, function () {
gcIcon.icon_name = 'gnome-fs-trash-full';
gcIcon.icon_name = 'user-trash-full';
this._timeoutId = 0;
return GLib.SOURCE_REMOVE;
}));
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'gnome-fs-trash-full\'');
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'user-trash-full\'');
return Clutter.EVENT_PROPAGATE;
}));