Commit graph

1208 commits

Author SHA1 Message Date
Alice Mikhaylenko
52f4919c94 network: Stop using AdwPreferencesWindow for the saved networks dialog 2023-08-02 12:51:48 +00:00
Alice Mikhaylenko
f3640d83d3 network: Consistently make options buttons flat 2023-08-02 12:51:48 +00:00
Alice Mikhaylenko
81a3c3dd15 network: Fix up proxy page and port to AdwSpinRow 2023-08-02 12:51:48 +00:00
Mohammed Sadiq
39f21e4229 network: Fix some memory leaks 2023-07-03 01:56:24 +00:00
Felipe Borges
fd1ac377ae network: Use AdwSwitchRow for wifi device enable row
In commit 2a33247f52 the
cc_list_row_get_active() method got removed despite still being
used in the network settings. This was breaking our build.
2023-06-30 11:52:42 +02:00
Lukáš Tyrychtr
b706f1261b network-connection-editor: Fix a keyboard trapped on the Cancel button when adding a VPN connection
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
2023-06-30 09:37:21 +00:00
Marco Melorio
b75bb10bb6 misc: Replace usage of CcListRow + switch with AdwSwitchRow
That feature will be removed in the next commit.
2023-06-30 09:06:56 +00:00
Barnabás Pőcze
146aae180d cc-wifi-connection-list: Use correct setter in property getter
CcWifiConnectionList::forgettable is of type `gboolean` so use
`g_value_set_boolean()` in the getter instead of `g_value_set_object()`.
2023-06-13 04:35:38 +00:00
Fareed
b813d378ec wi-fi: Update airplane mode row
airplane mode row wasn't updated
to be compatible with new Wi-Fi panel ui.

set airplane mode to be in preference group.
2023-06-12 19:41:20 -04:00
Fareed
1b70d766d6 wi-fi: Move controls out of headerbar
Enable switch and dropdown taken out of header bar.
Follow order of Network mockups for row order. Wifi hotspot
remains here until full network panel redesign completed.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2413
2023-06-12 19:40:04 -04:00
Fareed
eccc4d304e wi-fi: Add delete icon in saved connections list
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.
2023-06-07 22:58:37 +00:00
Robert Ancell
a01e179830 network: Connect signal handlers in swapped form 2023-06-07 09:12:54 +12:00
Christopher Davis
590506add3 vpn-helpers: Use GtkFileDialog and AdwMessageDialog
GtkFileChooser and GtkMessageDialog are both deprecated.
This commit replaces them with the most appropriate API
for each use case.
2023-06-06 13:33:29 +00:00
sunflowerskater
266c55715a general: Add tooltips to headerbar controls
Acc. HIG, "controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html
2023-06-06 13:27:00 +00:00
Robert Ancell
256e52b0f7 network: Fix name of parent class variable 2023-06-06 07:54:38 +00:00
Felipe Borges
b80f154f80 network: Close Connection Editor dialog when clicking Apply button
Fixes #2499
2023-05-31 08:15:32 +00:00
Robert Ancell
c78eb3d2f8 region: Do signal handlers in swapped form 2023-05-30 08:36:22 +00:00
Robert Ancell
89c054a31b network: Do signal handlers in swapped form 2023-05-30 08:36:22 +00:00
Felipe Borges
e6336ec433 network: Add ToastOverlay to connection-editor 2023-05-26 02:04:52 +00:00
Felipe Borges
3f482559ea network: Make "Import VPN from file" use GtkFileDialog
Since the gtk_file_chooser_dialog APIs are deprecated.
2023-05-26 02:04:52 +00:00
Felipe Borges
e580c309e8 network: Drop legacy vpn_export function
This was a leftover from the old connection-editor.
2023-05-26 02:04:52 +00:00
Ismael
497f599517 network-panel: fix crash when importing wrong vpn file 2023-05-26 02:04:52 +00:00
Pablo Correa Gómez
a2b9620b1b network: keep track of radio buttons in connection editor with action
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.
2023-05-24 08:54:06 +00:00
Pablo Correa Gómez
7f7b65545c all: meson: do not specify resources from gresource files as dependencies
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
2023-05-24 08:34:14 +00:00
Emad Saadat
813a5f838c wi-fi: Remove extraneous list box in Airplane Mode group
and give parent AdwPreferencesGroup the id of rfkill_widget
to preserve previous behavior (hiding widget when no
airplane mode available).
2023-05-15 10:50:09 +00:00
Emad Saadat
216a7619b7 wi-fi: Have page contents clamped like other pages
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
2023-05-15 10:50:09 +00:00
Automeris naranja
8dd0abeaa4 network: Rename "Other Devices" to "Bluetooth"
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2102
2023-05-04 09:54:49 +00:00
Automeris naranja
fe36282b26 network: AdwStatusPage consistency tweaks
Both Wi-Fi and Network panels shows a status page when Network Manager isn't running.
However, they don't use the same writing style:

- https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/gnome-44/panels/network/cc-wifi-panel.ui#L221
- https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/gnome-44/panels/network/cc-network-panel.c#L672

This change makes both status pages to use the same writing style.
2023-05-03 11:25:24 +00:00
Felipe Borges
58a0d8fd32 network: Add quotes to network name in Forget Connection dialog
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1765#note_1726456
2023-04-20 17:30:55 +02:00
Felipe Borges
e3965a6586 wifi: Include network name in the Forget dialog
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1701#note_1719089
2023-04-20 09:24:21 +00:00
Automeris naranja
9b940c27ca network: Use the "labelled-by" property to avoid repeating strings unnecessarily 2023-04-12 18:35:20 -03:00
Automeris naranja
fe5257bc9e general: Remove a11y labels when they aren't needed
A11y labels aren't needed when using the "activatable-widget"
property, because the relation is set automatically:

https://gitlab.gnome.org/GNOME/libadwaita/-/blob/main/src/adw-action-row.c#L661
2023-04-12 18:34:20 -03:00
Jonathan Kang
14b3652289 network/connection-editor: fix crash when removing a connection
This was caused by commit 6f1567f23.
2023-04-12 16:01:51 +08:00
Gotam Gorabh
ad063dfa55 wi-fi:Updated Forget Connection dialog of saved networks with AdwMessageDialog
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.
2023-04-11 11:56:05 +00:00
iampkumar02
27d5e7dd26 wifi: Center panel title when subtitle isn't visible
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
2023-04-11 13:49:09 +02:00
Cyber Phantom
4b450409c5 wifi: Add a confirmation dialog when forgetting a connection
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
2023-04-11 11:28:26 +00:00
Felipe Borges
ff4394da40 Revert "cc-wifi-connection-list: Don't show empty listbox"
This causes the "Saved Networks" list to never show rows.

This reverts commit ba13ca1f4a.
2023-04-07 13:37:23 +00:00
Maksym Hazevych
08c2e69851 Resolving suggestions 2023-03-29 14:26:55 +13:00
Maksym Hazevych
e00f773b2f Remove unnecessary visibility change 2023-03-29 14:26:55 +13:00
Maksym Hazevych
5b988a6943 Replace all occurrences of 'gtk_widget_hide'
Replace all occurrences of 'gtk_widget_hide(smth)' with
'gtk_widget_set_visible(smth, FALSE)'.
2023-03-29 14:26:55 +13:00
Maksym Hazevych
d831e5cb48 Replace all occurrences of 'gtk_widget_show'
Replace all occurrences of 'gtk_widget_show(smth)' with
'gtk_widget_set_visible(smth, TRUE)'.
2023-03-29 14:26:55 +13:00
Lukáš Tyrychtr
ded85c5423 panels/wifi: Make the security status and signal strength read by screen readers
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.
2023-03-28 08:18:27 +00:00
Cyber Phantom
524ffefdea cc-wifi-connection-list: Fix incorrect styling
There should be a space before opening parenthesis.
2023-03-24 21:28:45 +05:30
Simon Arlott
019cbc6a54 network: Increase maximum MTU value from 10000 to 65536
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.
2023-03-24 01:47:09 +00:00
Mohammed Sadiq
c2e3de4086 network: proxy: Keep current mode when enabling proxy
Don't force 'automatic' proxy mode when the user enables proxy.

Closes #2401
2023-03-24 00:40:33 +00:00
Mohammed Sadiq
842438b6e1 network: proxy: Add a method to get selected proxy mode
Also replace the code with the method where it's used.
We shall use this elsewhere in the next commit
2023-03-24 00:40:33 +00:00
Cyber Phantom
ba13ca1f4a cc-wifi-connection-list: Don't show empty listbox
When there are no wifi networks, the wifi listbox is still visible as a thin line which doesn't look good.

Fix this by setting the visibility based on the number of networks.
2023-03-23 23:17:46 +00:00
Athul Iddya
09d8ab968d network: Validate max length of hotspot SSID
Added validation for maximum length of hotspot SSID, which cannot exceed
32 bytes. As this error might be unintuitive, an error message was also
added below the entry row similar to the password entry row. The error
messages are generic as some characters can require multiple bytes and
mentioning the byte limitation might be too technical.

Fixes #1065
2023-03-23 22:36:00 +00:00
Markus Göllnitz
98f7a40d24 multiple panels: show start title buttons in header bar
The start title buttons of the main window should be displayed if and
only if the end title buttons are. Only the left-most header bar should have
the start title button set and only right-most header bar the end title buttons.

Therefore, the title buttons property should be bound to the leaflet state:
When unfolded the start title buttons of the sidebar's header bar are
the only ones visible then, and not a second pair in the panel's header bar.
Likewise, in a folded state of the leaflet, the panel's header bar displays
all availble title buttons – start and end – as the panel is the only widget
displaying a header bar.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
2023-03-16 13:18:37 +00:00
Bastien Nocera
2417cd5e6e wifi: Handle open networks in QR code
Fix empty dialogue when the current Wi-Fi network is an open network.

Closes: #2372
2023-02-27 20:00:15 +00:00