$OpenBSD: patch-js_ui_panel_js,v 1.13 2013/10/16 09:03:55 ajacoutot Exp $

https://bugzilla.gnome.org/show_bug.cgi?id=669495
http://sources.debian.net/src/gnome-shell/3.8.4-3/debian/patches/10-make-NetworkManager-optional.patch
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/gnome-base/gnome-shell/files/gnome-shell-3.8.3-networkmanager-flag.patch

--- js/ui/panel.js.orig	Tue Oct 15 19:06:27 2013
+++ js/ui/panel.js	Wed Oct 16 10:49:53 2013
@@ -809,7 +809,11 @@ const AggregateMenu = new Lang.Class({
         this._indicators = new St.BoxLayout({ style_class: 'panel-status-indicators-box' });
         this.actor.add_child(this._indicators);
 
-        this._network = new imports.ui.status.network.NMApplet();
+        if (Config.HAVE_NETWORKMANAGER) {
+            this._network = new imports.ui.status.network.NMApplet();
+        } else {
+            this._network = null;
+        }
         if (Config.HAVE_BLUETOOTH) {
             this._bluetooth = new imports.ui.status.bluetooth.Indicator();
         } else {
@@ -824,7 +828,9 @@ const AggregateMenu = new Lang.Class({
         this._screencast = new imports.ui.status.screencast.Indicator();
 
         this._indicators.add_child(this._screencast.indicators);
-        this._indicators.add_child(this._network.indicators);
+        if (this._network) {
+            this._indicators.add_child(this._network.indicators);
+        }
         if (this._bluetooth) {
             this._indicators.add_child(this._bluetooth.indicators);
         }
@@ -836,7 +842,9 @@ const AggregateMenu = new Lang.Class({
         this.menu.addMenuItem(this._volume.menu);
         this.menu.addMenuItem(this._brightness.menu);
         this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
-        this.menu.addMenuItem(this._network.menu);
+        if (this._network) {
+            this.menu.addMenuItem(this._network.menu);
+        }
         if (this._bluetooth) {
             this.menu.addMenuItem(this._bluetooth.menu);
         }
