[gnome-shell] network: Remove dead code



commit 95208805686f51a0309c08a14698a0b69167ec1f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jun 12 14:38:20 2013 -0400

    network: Remove dead code
    
    No class in here has this.carrier as a property. Presumably, this was
    meant to be this.device.carrier, but since this code is going to be
    rewritten soon anyway, might as well just junk the never-working
    code for now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701954

 js/ui/status/network.js |   21 ++-------------------
 1 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 288caf3..0ca02ea 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -316,10 +316,6 @@ const NMDevice = new Lang.Class({
                 GObject.Object.prototype.disconnect.call(this.device, this._activeConnectionChangedId);
                 this._stateChangedId = 0;
             }
-            if (this._carrierChangedId) {
-                GObject.Object.prototype.disconnect.call(this.device, this._carrierChangedId);
-                this._carrierChangedId = 0;
-            }
             if (this._firmwareChangedId) {
                 GObject.Object.prototype.disconnect.call(this.device, this._firmwareChangedId);
                 this._firmwareChangedId = 0;
@@ -414,8 +410,8 @@ const NMDevice = new Lang.Class({
             return _("authentication required");
         case NetworkManager.DeviceState.UNAVAILABLE:
             // This state is actually a compound of various states (generically unavailable,
-            // firmware missing, carrier not available), that are exposed by different properties
-            // (whose state may or may not updated when we receive state-changed).
+            // firmware missing), that are exposed by different properties (whose state may
+            // or may not updated when we receive state-changed).
             if (!this._firmwareChangedId)
                 this._firmwareChangedId = this.device.connect('notify::firmware-missing', Lang.bind(this, 
this._substateChanged));
             if (this.device.firmware_missing) {
@@ -423,14 +419,6 @@ const NMDevice = new Lang.Class({
                    module, which is missing */
                 return _("firmware missing");
             }
-            if (this.device.capabilities & NetworkManager.DeviceCapabilities.CARRIER_DETECT) {
-                if (!this._carrierChangedId)
-                    this._carrierChangedId = this.device.connect('notify::carrier', Lang.bind(this, 
this._substateChanged));
-                if (!this.carrier) {
-                    /* Translators: this is for wired network devices that are physically disconnected */
-                    return _("cable unplugged");
-                }
-            }
             /* Translators: this is for a network device that cannot be activated (for example it
                is disabled by rfkill, or it has no coverage */
             return _("unavailable");
@@ -543,11 +531,6 @@ const NMDevice = new Lang.Class({
     },
 
     _updateStatusItem: function() {
-        if (this._carrierChangedId) {
-            // see above for why this is needed
-            GObject.Object.prototype.disconnect.call(this.device, this._carrierChangedId);
-            this._carrierChangedId = 0;
-        }
         if (this._firmwareChangedId) {
             GObject.Object.prototype.disconnect.call(this.device, this._firmwareChangedId);
             this._firmwareChangedId = 0;


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