[gnome-shell] panel: don't break when indicator has no menu



commit 9faac81a37afd2fad72133b55d657e3362eb3e60
Author: Jean-Philippe Braun <eon patapon info>
Date:   Sun Jun 24 10:55:46 2012 +0200

    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

 js/ui/panel.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 06d4300..a06cc92 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -1126,7 +1126,8 @@ const Panel = new Lang.Class({
         if (!position)
             position = 0;
         this._insertStatusItem(indicator.actor, position);
-        this._menus.addMenu(indicator.menu);
+        if (indicator.menu)
+            this._menus.addMenu(indicator.menu);
 
         this._statusArea[role] = indicator;
         let destroyId = indicator.connect('destroy', Lang.bind(this, function(emitter) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]