[gnome-shell] popupMenu: Fix setting ImageMenuItem's icons via strings
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] popupMenu: Fix setting ImageMenuItem's icons via strings
- Date: Mon, 16 Oct 2017 18:47:42 +0000 (UTC)
commit c12da66da8b82f762c47109735391488ca2cfee9
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Oct 16 00:09:52 2017 +0200
popupMenu: Fix setting ImageMenuItem's icons via strings
Commit 28ca96064bcb 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
js/ui/popupMenu.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index d00132f..cb975f5 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]