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
This commit is contained in:
parent
a55288bda0
commit
2249da7976
@ -80,15 +80,13 @@ const NMNetworkMenuItem = new Lang.Class({
|
|||||||
Name: 'NMNetworkMenuItem',
|
Name: 'NMNetworkMenuItem',
|
||||||
Extends: PopupMenu.PopupBaseMenuItem,
|
Extends: PopupMenu.PopupBaseMenuItem,
|
||||||
|
|
||||||
_init: function(bestAP, title, params) {
|
_init: function(bestAP) {
|
||||||
this.parent(params);
|
this.parent();
|
||||||
|
|
||||||
this.bestAP = bestAP;
|
this.bestAP = bestAP;
|
||||||
|
|
||||||
if (!title) {
|
let ssid = this.bestAP.get_ssid();
|
||||||
let ssid = this.bestAP.get_ssid();
|
let title = ssidToLabel(ssid);
|
||||||
title = ssidToLabel(ssid);
|
|
||||||
}
|
|
||||||
|
|
||||||
this._label = new St.Label({ text: title });
|
this._label = new St.Label({ text: title });
|
||||||
this.actor.label_actor = this._label;
|
this.actor.label_actor = this._label;
|
||||||
@ -1071,8 +1069,8 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_createAPItem: function(connection, accessPointObj, useConnectionName) {
|
_createAPItem: function(connection, accessPointObj) {
|
||||||
let item = new NMNetworkMenuItem(accessPointObj.accessPoints[0], useConnectionName ? connection.get_id() : undefined);
|
let item = new NMNetworkMenuItem(accessPointObj.accessPoints[0]);
|
||||||
item._connection = connection;
|
item._connection = connection;
|
||||||
item.connect('activate', Lang.bind(this, function() {
|
item.connect('activate', Lang.bind(this, function() {
|
||||||
let accessPoints = accessPointObj.accessPoints;
|
let accessPoints = accessPointObj.accessPoints;
|
||||||
@ -1171,8 +1169,8 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
else
|
else
|
||||||
title = _("Connected (private)");
|
title = _("Connected (private)");
|
||||||
|
|
||||||
this._activeConnectionItem = new NMNetworkMenuItem(this.device.active_access_point, undefined,
|
this._activeConnectionItem = new NMNetworkMenuItem(this.device.active_access_point);
|
||||||
{ reactive: false });
|
this._activeConnectionItem.setSensitive(false);
|
||||||
this._activeConnectionItem.setOrnament(PopupMenu.Ornament.DOT);
|
this._activeConnectionItem.setOrnament(PopupMenu.Ornament.DOT);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1183,7 +1181,7 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(network.connections.length > 0) {
|
if(network.connections.length > 0) {
|
||||||
network.item = this._createAPItem(network.connections[0], network, false);
|
network.item = this._createAPItem(network.connections[0], network);
|
||||||
} else {
|
} else {
|
||||||
network.item = new NMNetworkMenuItem(network.accessPoints[0]);
|
network.item = new NMNetworkMenuItem(network.accessPoints[0]);
|
||||||
network.item.connect('activate', Lang.bind(this, function() {
|
network.item.connect('activate', Lang.bind(this, function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user