Commit Graph

166 Commits

Author SHA1 Message Date
Jasper St. Pierre
621810c409 network: Fix visibility of the VPN icon
This is a regression from e6c239d0f3,
where we removed the calls to hide()/show() when we had a VPN device
vs. not.

https://bugzilla.gnome.org/show_bug.cgi?id=702536
2013-08-05 15:19:40 -04:00
Jasper St. Pierre
728c3a72ad network: Introduce a new, rewritten Wi-Fi section
Remove the Wi-Fi chooser from the menu and put it in a dialog instead.
This frees up the submenu to simply have three items: an rfkill toggle,
a button to show the dialog, and a button to show network settings.

Ideally, we'd autodetect the "needs network" case by user initiation
and automatically show the dialog if needed, but lower-level plumbing
is neccessary, so the menu item to show the dialog is an acceptable
compromise instead.

This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:52:33 -04:00
Jasper St. Pierre
c8c839a569 network: Make sure that the network menu is insensitive when in the lock screen
Since the network section of the aggregate menu will be shown in the lock
screen, we need to ensure that users can't tweak with network settings or
anything like that.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:40:24 -04:00
Jasper St. Pierre
6827dacb4b network: Remove syncDescription
Replace it with setDeviceDescription, which gives device wrappers
more control about how to handle description changes.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:40:24 -04:00
Jasper St. Pierre
246271fd9d network: Implement new designs for VPN/modem submenus
This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:40:24 -04:00
Jasper St. Pierre
4305ebc5b0 network: Rework the VPN rewrite to work for modem and bluetooth as well
Replace NMNetworkMenuItem with NMConnectionItem, based on
NMVPNConnectionItem, and replace NMDevice with NMConnectionSection
and NMConnectionDevice.

Since this rips apart NMDevice, and since wi-fi should not be
connection-based, we'll temporarily remove NMDeviceWireless. We'll
add it back in a later commit, along with the new Wi-Fi dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:40:23 -04:00
Jasper St. Pierre
39bff8bfbc network: Don't pass a list of connections to the devices
Instead, just add them after they're constructed. This allows us to
not have to pass the connections to each device, and prevents issues
with having to enumerate the connections in the middle of construction.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:39:40 -04:00
Jasper St. Pierre
fc6a0c1006 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
2013-07-28 15:39:40 -04:00
Jasper St. Pierre
d6dc9af5ff network: Remove overflow implementation
The code is complicated by requiring overflow, and in order to incrementally
improve the code to match the designs, remove overflow.

In the new design, we'll have a fixed number of menu items, and Wi-Fi
will be done by a separate design, so we can't be too concerned with
the menu not fitting on the screen.

This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:39:40 -04:00
Jasper St. Pierre
e62045eb7f network: Remove the enable networking item
This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

Additionally, with this gone, we can clean up how we handle menu
item visibility.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:39:40 -04:00
Jasper St. Pierre
bda3e53511 network: Remove the global wireless killswitch
"Airplane Mode" is able to be turned on in gnome-control-center,
and it will replace the killswitch UI we have in the menu right
now.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:39:39 -04:00
Jasper St. Pierre
6295d0fc6c network: Make the device section headers not bold
The new device section headers will be simple text strings
in the new designs.

This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:39:39 -04:00
Jasper St. Pierre
3271e65d56 network: Remove separators between device sections
This is not needed in the new design. Doing this allows us to
remove some complex section visibility tracking, also.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:39:39 -04:00
Jasper St. Pierre
f8225141dc network: Remove the firmware changed signal
According to Dan Williams, if firmware is installed the device
will disappear and reappear, and this is unlikely to change any
time soon. Just make our lives easier by removing the tracking.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:39:39 -04:00
Jasper St. Pierre
8e9e583b79 network: Fix the AP strength indicator never getting updated
I intended to make a few code cleanups, but I apparently forgot
to hook up _updateAccessPoint. Merge it with _activeApChanged,
which is where the notify::active-access-point signal is actually
hooked up to.

https://bugzilla.gnome.org/show_bug.cgi?id=704670
2013-07-28 15:39:39 -04:00
Jasper St. Pierre
2cd41773ba status: Remove settings actions
These aren't used in the new system status designs.

This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

https://bugzilla.gnome.org/show_bug.cgi?id=704368
2013-07-19 05:34:17 -04:00
Jasper St. Pierre
ccba18aa8f network: Fix a recursion issue when updating VPN
_updateIcon should not attempt to sync any active connections, as the
icon-changed signal can be emitted in response to something done during
_syncActiveConnection. In the case of VPN, removeActiveConnection would
cause an icon-changed signal to be emitted immediately, but the state
would not be updated, causing us to call removeActiveConnection over and
over.

Explicitly sync all active connections when we know it needs to be done,
and simply make _updateIcon synchronize with the current device's icon.

https://bugzilla.gnome.org/show_bug.cgi?id=703565
2013-07-03 13:55:08 -04:00
Giovanni Campagna
013b6aa44a network: don't fail if we can't read a connection associated with an active
It can happen in legitimate cases, such as a version incompatibility
between NetworkManager and libnm-glib or a restricted permission.

https://bugzilla.gnome.org/show_bug.cgi?id=701849
2013-06-14 20:38:54 +02:00
Jasper St. Pierre
0e7d3a7558 network: Remove support for virtual networking
This isn't in the new design, and no good can come from this.
Just allow people to use the control center to configure virtual
networking.

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 14:15:17 -04:00
Jasper St. Pierre
8bd4895538 network: Simplify connections to the firmware signal
The status item will go away soon, so make sure the one-time
fire is given its own function. At the same time, only connect
to the signal when the situation actually matters.

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 14:15:17 -04:00
Jasper St. Pierre
465c77ddcf network: Make the device field private
With getIndicatorIcon() replacing the main use of the .device
field, we can make this a private API.

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 14:15:17 -04:00
Jasper St. Pierre
6ef2d4a4cc network: Merge NMConnectionBased back into NMDevice
https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 14:15:17 -04:00
Jasper St. Pierre
7ae7f046c2 network: Rewrite VPN section to be independent of NMConnectionBased
https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 14:15:17 -04:00
Jasper St. Pierre
f4051e810e network: Remove overflow of VPN configurations
It's unlikely that somebody has more than five VPN connections
configured, and the code is

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 14:15:16 -04:00
Jasper St. Pierre
e6c239d0f3 network: Move indicator icon selection to individual devices
This cuts down on the number of cross-connected "public" API between
the devices, hopefully allowing us to reduce it further.

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 14:15:16 -04:00
Jasper St. Pierre
35a7a3c1ac network: Always show the VPN indicator when connected to VPN
The new designs ask for this.

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 14:15:11 -04:00
Jasper St. Pierre
a0991c8261 network: "Remove" support for dial-up modems
NetworkManager has never supported dial-up modems, which are the
only case we have a modem device without any of these capabilities.

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-14 13:48:35 -04:00
Jasper St. Pierre
9520880568 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
2013-06-14 13:48:35 -04:00
Jasper St. Pierre
c6fe6eb7ab network: Fix a bad signal name
We try to disconnect from firmwareChangedId, not firmwareMissingId.

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-12 16:58:34 -04:00
Jasper St. Pierre
2cbee05c8a network: Remove setActiveConnection/clearActiveConnection
This can be more easily achieved by listening for changes to the
device's active-connection property. VPN will still need support to
track active connections, as it does not have an associated
device. But as VPN can track multiple active connections, the names
"set" and "clear" don't quite fit. Rename them to the more-standard
"add" and "remove".

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-12 16:57:56 -04:00
Jasper St. Pierre
4cd832c05a network: Rename a variable for consistency
We tend to use the name "a" in this method. This matches consistency
with the rest of the code.

https://bugzilla.gnome.org/show_bug.cgi?id=701954
2013-06-12 16:11:37 -04:00
Jasper St. Pierre
9c222c7e5c network: Remove _createAPItem
The code flows better if this is inlined like this.

https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-06-06 17:16:44 -04:00
Jasper St. Pierre
2249da7976 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
2013-06-06 17:16:44 -04:00
Jasper St. Pierre
a55288bda0 network: Don't create submenus for multiple-connection items
As multiple-connections for a Wi-Fi AP won't fit in the new design,
remove submenus right now. Simply make a simple item that connects
to the first known connection for the AP, which should be the common
case.

https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-06-06 17:16:07 -04:00
Jasper St. Pierre
aee7cd73c4 network: Reformat connection code
This makes the code flow the same between removeConnection and checkConnection.

https://bugzilla.gnome.org/show_bug.cgi?id=701755
2013-06-06 15:32:06 -04:00
Jasper St. Pierre
380a71dd21 network: Remove a dead signal
This signal is unused.

https://bugzilla.gnome.org/show_bug.cgi?id=701755
2013-06-06 14:00:38 -04:00
Florian Müllner
34aa501637 network: Fix stupid typo
There is no ACTIVE state in NetworkManager.ActionConnectionState,
it's ACTIVATED.

https://bugzilla.gnome.org/show_bug.cgi?id=700394
2013-05-15 17:47:36 +02:00
Jasper St. Pierre
6330379f77 network: Use accessPointAdded to add initial access points
This is technically a smidge slower due to the constant bisect insert,
but since this should only happen when we make a Wi-Fi dialog, it's
insignificant.

https://bugzilla.gnome.org/show_bug.cgi?id=700322
2013-05-15 11:13:11 -04:00
Jasper St. Pierre
30c64baa7f network: Don't pass this._connections to the VPN section
It's always empty by this point.

https://bugzilla.gnome.org/show_bug.cgi?id=700322
2013-05-15 11:13:11 -04:00
Jasper St. Pierre
cdbed0c615 network: Use checkConnection to set up the initial connections
https://bugzilla.gnome.org/show_bug.cgi?id=700322
2013-05-15 11:13:11 -04:00
Jasper St. Pierre
f6e7034172 network: Remove an unused getter
https://bugzilla.gnome.org/show_bug.cgi?id=700322
2013-05-15 11:13:11 -04:00
Jasper St. Pierre
cd9c5b9c5d network: Remove semi-complex primary device finding
According to dcbw (and some updated documentation), there will
always be a 1:1 correspondence between NMActiveConnection and
an NMDevice.

https://bugzilla.gnome.org/show_bug.cgi?id=700322
2013-05-15 11:13:11 -04:00
Giovanni Campagna
7514607129 network: don't use active connections that are in invalid states
Only ACTIVE or ACTIVATING connections are important when deciding
what icon to show, don't fallback on any, possibly invalid or deactivating,
active connection object.

https://bugzilla.gnome.org/show_bug.cgi?id=676285
2013-05-08 23:58:53 +02:00
Jasper St. Pierre
7a8b392607 network: Remove some genericism in the wireless code
This was presumably originally used in multiple places, but it's
not anymore, so un-generify the code here.

https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-04-26 12:24:03 -04:00
Jasper St. Pierre
bfdf069d2d network: Rename "apObj" to "network"
We put these "access point objects" in "this._networks" and
"this._activeNetwork", so let's rename it. This also makes
the fact that each "access point object" can contain multiple
access points a tiny bit less confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-04-26 12:18:39 -04:00
Jasper St. Pierre
b4b00a48d9 network: Remove explicit autoconnection code
NM is now a lot smarter about dealing with automatic connections, so just
create an empty connection and pass it to it. The only places where NM
requires connection settings is where we require explicit setup: Bluetooth
DUN, WPA-Enterprise and WWAN/VPN. These cases are already handled by
gnome-control-center, where complex configuration is handled, so remove
the automatic connection management for now and just let NM handle it.

https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-04-26 12:16:06 -04:00
Jasper St. Pierre
e5f226612e network: Use activeApChanged to get the initial active network
https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-04-26 12:16:06 -04:00
Jasper St. Pierre
20619ad3c1 network: Fix some splice mishaps
Calling splice() without a second argument removes all of the elements
after the provided index, not just one.

https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-04-26 12:16:06 -04:00
Jasper St. Pierre
37dce7d4c3 network: Deduplicate some similar code
https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-04-26 12:16:06 -04:00
Jasper St. Pierre
a67b82e730 network: Remove some dead code
We cannot possibly reach createActiveConnectionItem unless we have
an active network, so the plain unreative menu item cannot ever
be created.

https://bugzilla.gnome.org/show_bug.cgi?id=698918
2013-04-26 12:16:05 -04:00