mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
popupMenu: Fix setting ImageMenuItem's icons via strings
Commit 28ca96064b added support for setting PopupImageMenuItem's icons
via GIcons as well as via strings. However as the check whether an object
implements the GIcon interface only works on GObjects, specifying an icon
name was broken. Fix that to actually allow both strings and GIcons.
https://bugzilla.gnome.org/show_bug.cgi?id=789018
This commit is contained in:
parent
01d8811913
commit
c12da66da8
1 changed files with 1 additions and 1 deletions
|
|
@ -405,7 +405,7 @@ var PopupImageMenuItem = new Lang.Class({
|
|||
|
||||
setIcon: function(icon) {
|
||||
// The 'icon' parameter can be either a Gio.Icon or a string.
|
||||
if (GObject.type_is_a(icon, Gio.Icon))
|
||||
if (icon instanceof GObject.Object && GObject.type_is_a(icon, Gio.Icon))
|
||||
this._icon.gicon = icon;
|
||||
else
|
||||
this._icon.icon_name = icon;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue