network: Remove the Wired section
This is a part of the new system status design, see https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/ for design details. Note that this does have an interesting side effect of not showing network connectivity status on wired. This is intentional, and error states will still be shown in the top bar when they happen. This also means that if you're connected to both wired and wireless, even though wired is the default route, we'll first notice the wireless active connection, and we'll show that in the top bar. New NM API that will help figuring out the active connection of the default device is being implemented to stop this from happening. https://bugzilla.gnome.org/show_bug.cgi?id=704670
This commit is contained in:
parent
d6dc9af5ff
commit
fc6a0c1006
@ -20,7 +20,6 @@ const Util = imports.misc.util;
|
||||
|
||||
const NMConnectionCategory = {
|
||||
INVALID: 'invalid',
|
||||
WIRED: 'wired',
|
||||
WIRELESS: 'wireless',
|
||||
WWAN: 'wwan',
|
||||
VPN: 'vpn'
|
||||
@ -459,47 +458,6 @@ const NMDevice = new Lang.Class({
|
||||
});
|
||||
Signals.addSignalMethods(NMDevice.prototype);
|
||||
|
||||
const NMDeviceSimple = new Lang.Class({
|
||||
Name: 'NMDeviceSimple',
|
||||
Extends: NMDevice,
|
||||
|
||||
_init: function(client, device, connections) {
|
||||
this.category = NMConnectionCategory.WIRED;
|
||||
|
||||
this.parent(client, device, connections);
|
||||
},
|
||||
|
||||
_createSection: function() {
|
||||
this.parent();
|
||||
|
||||
// if we have only one connection (normal or automatic)
|
||||
// we hide the connection list, and use the switch to control
|
||||
// the device
|
||||
// we can do it here because addConnection and removeConnection
|
||||
// both call _createSection at some point
|
||||
this.section.actor.visible = this._connections.length > 1;
|
||||
}
|
||||
});
|
||||
|
||||
const NMDeviceWired = new Lang.Class({
|
||||
Name: 'NMDeviceWired',
|
||||
Extends: NMDeviceSimple,
|
||||
|
||||
_init: function(client, device, connections) {
|
||||
device._description = _("Wired");
|
||||
this.category = NMConnectionCategory.WIRED;
|
||||
|
||||
this.parent(client, device, connections);
|
||||
},
|
||||
|
||||
getIndicatorIcon: function() {
|
||||
if (this._device.active_connection.state == NetworkManager.ActiveConnectionState.ACTIVATING)
|
||||
return 'network-wired-acquiring-symbolic';
|
||||
else
|
||||
return 'network-wired-symbolic';
|
||||
},
|
||||
});
|
||||
|
||||
const NMDeviceModem = new Lang.Class({
|
||||
Name: 'NMDeviceModem',
|
||||
Extends: NMDevice,
|
||||
@ -1278,23 +1236,17 @@ const NMApplet = new Lang.Class({
|
||||
|
||||
// Device types
|
||||
this._dtypes = { };
|
||||
this._dtypes[NetworkManager.DeviceType.ETHERNET] = NMDeviceWired;
|
||||
this._dtypes[NetworkManager.DeviceType.WIFI] = NMDeviceWireless;
|
||||
this._dtypes[NetworkManager.DeviceType.MODEM] = NMDeviceModem;
|
||||
this._dtypes[NetworkManager.DeviceType.BT] = NMDeviceBluetooth;
|
||||
this._dtypes[NetworkManager.DeviceType.INFINIBAND] = NMDeviceSimple;
|
||||
// TODO: WiMax support
|
||||
|
||||
// Connection types
|
||||
this._ctypes = { };
|
||||
this._ctypes[NetworkManager.SETTING_WIRELESS_SETTING_NAME] = NMConnectionCategory.WIRELESS;
|
||||
this._ctypes[NetworkManager.SETTING_WIRED_SETTING_NAME] = NMConnectionCategory.WIRED;
|
||||
this._ctypes[NetworkManager.SETTING_PPPOE_SETTING_NAME] = NMConnectionCategory.WIRED;
|
||||
this._ctypes[NetworkManager.SETTING_PPP_SETTING_NAME] = NMConnectionCategory.WIRED;
|
||||
this._ctypes[NetworkManager.SETTING_BLUETOOTH_SETTING_NAME] = NMConnectionCategory.WWAN;
|
||||
this._ctypes[NetworkManager.SETTING_CDMA_SETTING_NAME] = NMConnectionCategory.WWAN;
|
||||
this._ctypes[NetworkManager.SETTING_GSM_SETTING_NAME] = NMConnectionCategory.WWAN;
|
||||
this._ctypes[NetworkManager.SETTING_INFINIBAND_SETTING_NAME] = NMConnectionCategory.WIRED;
|
||||
this._ctypes[NetworkManager.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
|
||||
|
||||
NMClient.Client.new_async(null, Lang.bind(this, this._clientGot));
|
||||
@ -1329,12 +1281,6 @@ const NMApplet = new Lang.Class({
|
||||
this._section = new PopupMenu.PopupMenuSection();
|
||||
this.menu.addMenuItem(this._section);
|
||||
|
||||
this._devices.wired = {
|
||||
section: new PopupMenu.PopupMenuSection(),
|
||||
devices: [ ],
|
||||
};
|
||||
this._section.addMenuItem(this._devices.wired.section);
|
||||
|
||||
this._devices.wireless = {
|
||||
section: new PopupMenu.PopupMenuSection(),
|
||||
devices: [ ],
|
||||
|
Loading…
Reference in New Issue
Block a user