[gnome-shell/wip/message-tray-menu: 91/109] network: Remove some more dead code



commit 61aac1848b7d80d8aa5d342e9a8245f7b7184ed0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Apr 26 12:12:29 2013 -0400

    network: Remove some more dead code
    
    Submenus gone means we can remove the title param and things
    that use it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698918

 js/ui/status/network.js |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index f2ff43f..d86f61b 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -87,15 +87,13 @@ const NMNetworkMenuItem = new Lang.Class({
     Name: 'NMNetworkMenuItem',
     Extends: PopupMenu.PopupBaseMenuItem,
 
-    _init: function(bestAP, title, params) {
-        this.parent(params);
+    _init: function(bestAP) {
+        this.parent();
 
         this.bestAP = bestAP;
 
-        if (!title) {
-            let ssid = this.bestAP.get_ssid();
-            title = ssidToLabel(ssid);
-        }
+        let ssid = this.bestAP.get_ssid();
+        let title = ssidToLabel(ssid);
 
         this._label = new St.Label({ text: title });
         this.actor.label_actor = this._label;
@@ -1145,8 +1143,8 @@ const NMDeviceWireless = new Lang.Class({
         }
     },
 
-    _createAPItem: function(connection, accessPointObj, useConnectionName) {
-        let item = new NMNetworkMenuItem(accessPointObj.accessPoints[0], useConnectionName ? 
connection.get_id() : undefined);
+    _createAPItem: function(connection, accessPointObj) {
+        let item = new NMNetworkMenuItem(accessPointObj.accessPoints[0]);
         item._connection = connection;
         item.connect('activate', Lang.bind(this, function() {
             let accessPoints = accessPointObj.accessPoints;
@@ -1245,8 +1243,8 @@ const NMDeviceWireless = new Lang.Class({
         else
             title = _("Connected (private)");
 
-        this._activeConnectionItem = new NMNetworkMenuItem(this.device.active_access_point, undefined,
-                                                           { reactive: false });
+        this._activeConnectionItem = new NMNetworkMenuItem(this.device.active_access_point);
+        this._activeConnectionItem.setSensitive(false);
         this._activeConnectionItem.setOrnament(PopupMenu.Ornament.DOT);
     },
 
@@ -1257,7 +1255,7 @@ const NMDeviceWireless = new Lang.Class({
         }
 
         if(network.connections.length > 0) {
-            network.item = this._createAPItem(network.connections[0], network, false);
+            network.item = this._createAPItem(network.connections[0], network);
         } else {
             network.item = new NMNetworkMenuItem(network.accessPoints[0]);
             network.item.connect('activate', Lang.bind(this, function() {


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