panel: don't break when indicator has no menu
Status indicators don't have necessarily a menu. If they have not we don't want to add the menu in the PopupMenuManager. https://bugzilla.gnome.org/show_bug.cgi?id=678694
This commit is contained in:
parent
b90e7eb95c
commit
9faac81a37
@ -1126,7 +1126,8 @@ const Panel = new Lang.Class({
|
|||||||
if (!position)
|
if (!position)
|
||||||
position = 0;
|
position = 0;
|
||||||
this._insertStatusItem(indicator.actor, position);
|
this._insertStatusItem(indicator.actor, position);
|
||||||
this._menus.addMenu(indicator.menu);
|
if (indicator.menu)
|
||||||
|
this._menus.addMenu(indicator.menu);
|
||||||
|
|
||||||
this._statusArea[role] = indicator;
|
this._statusArea[role] = indicator;
|
||||||
let destroyId = indicator.connect('destroy', Lang.bind(this, function(emitter) {
|
let destroyId = indicator.connect('destroy', Lang.bind(this, function(emitter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user