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:
Jean-Philippe Braun 2012-06-24 10:55:46 +02:00 committed by Florian Müllner
parent b90e7eb95c
commit 9faac81a37

View File

@ -1126,6 +1126,7 @@ const Panel = new Lang.Class({
if (!position) if (!position)
position = 0; position = 0;
this._insertStatusItem(indicator.actor, position); this._insertStatusItem(indicator.actor, position);
if (indicator.menu)
this._menus.addMenu(indicator.menu); this._menus.addMenu(indicator.menu);
this._statusArea[role] = indicator; this._statusArea[role] = indicator;