See previous commits for details on the widgets.
This commit ports the network panel to these new widgets.
In addition, it moves the switch to enable the proxy into
a row within the proxy page itself, following the latest
mockups.
It required two changes:
* Setting the stack page only after all pages are initialized
* And removing the VPN choices list from its bin only after that
Each connection now has a delete icon to forget a saved connection.
List can still be generated to include the checkbox to forget multiple.
Follows mockups for wi-fi panel. Add translation comments.
Hooking to all the toggled signals from all the buttons for executing
the same action is inneficient, and can potenticall end up in a segmentation
fault due to some race in the signal emmission, where the active button
gets deactivated before the clicked button is activated
Looking at the GTK4 code, in a radio group:
- The button which was previously active gets de-activated, emitting its
corresponding toggled signal.
- The active property for the clicked button gets set.
- The clicked button emits its toggled signal.
Therefore, if the first toggle signal gets processed before the active
property is set, there can be a race condition. We are seeing this downstream
at pmOS: https://gitlab.com/postmarketOS/pmaports/-/issues/1816
Instead of this racy behavior, follow upstream recommendation and keep track
of the state through a stateful signal.
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
Achieved by making the container widget for all other widgets
in the content section of the panel an AdwPreferencesPage and
having each group of widgets (e.g. the airplane mode toggle
and the stack that shows the list of wi-fi networks or a status
message) be in its own AdwPreferencesGroup.
Much along the lines of !1739 and !1740
Also fixes#2420
This changes update the Forget Connection dialog of saved networks
using AdwMessageDialog instead of GtkMessageDialog. And set Cancel
as a default responce instead of Forget to overcome accidental forget.
We used to have a custom title widget containing a label for the
title and another for the subtitle (status). When the subtitle label
wasn't visible, the title label wouldn't get centered vertically in
the headerbar.
By porting the custom title widget to AdwWindowTitle we get the title
centered for free.
Fixes#1891
Destructive actions are supposed to have a dialog asking the user for confirmation.
This commit adds the confirmation dialog when user tries to forget a wifi network.
Fixes#2371
Before this MR, the signal level was not available at all, and the security
status only as an a11y description of an image. Now, these pieces of information
are part of the description of the item itself.
The maximum MTU value of 10000 is too low for USB Ethernet, which has a
maximum (for Linux USB gadgets) of 15412 bytes (although the upper limit
is the USB wMaxPacketSize which goes up to 4294967295 bytes):
linux/drivers/usb/gadget/function/u_ether.c:#define GETHER_MAX_MTU_SIZE 15412
Multiple Intel NICs can use an MTU of 16110 bytes:
linux/drivers/net/ethernet/intel/e1000/e1000_hw.h:#define MAX_JUMBO_FRAME_SIZE 0x3F00
linux/drivers/net/ethernet/intel/e1000e/defines.h:#define MAX_JUMBO_FRAME_SIZE 0x3F00
linux/drivers/net/ethernet/intel/igbvf/defines.h:#define MAX_JUMBO_FRAME_SIZE 0x3F00
The NetworkManager limit is 4294967295 bytes but this is unreasonable
in a typical enivornment because of the memory required for packets of
that size.
The maximum IPv4 and IPv6 (without using Jumbograms) packet size is 65535
bytes so increase the maximum MTU value to 65536 allow full size IP
packets to be used.
There is a corresponding change in network-manager-applet.