Robert Ancell
7b01c11840
network: Convert NetDeviceWifi to GtkTemplate
2019-11-06 10:40:23 +13:00
Robert Ancell
7e84af0d6d
network: Remove net_object_emit_changed
...
Turns out nothing was actually listening to it.
2019-11-06 10:40:23 +13:00
Robert Ancell
a39ebd5bda
network: Remove net_object_get/set_title
2019-11-06 10:40:23 +13:00
Robert Ancell
577762b60c
network: Remove NetDevice class
...
We don't need the NetObject/NetDevice class separation anymore
2019-11-06 10:16:40 +13:00
Robert Ancell
1c92cf4844
network: Remove net_device_get_nm_device
2019-11-06 10:16:40 +13:00
Robert Ancell
0197654177
network: Move helper functions into panel-common.c
2019-11-06 10:16:40 +13:00
Robert Ancell
29734b599c
network: Remove net_object_get_client
...
Better handled inside each object.
2019-11-06 10:16:39 +13:00
Robert Ancell
d7e17ca02f
network: Replace method with a helper function.
...
This removes a case where an object was being temporarily created just to use
this mehtod.
2019-11-06 10:16:39 +13:00
Robert Ancell
966cb97d45
network: Remove net_object_get_cancellable
...
Only a few objects need it
2019-11-06 10:16:39 +13:00
Robert Ancell
c74d26bf3a
network: Remove NetObject id property
...
This is better handled by comparing objects.
2019-11-06 10:16:39 +13:00
Robert Ancell
0b3ce1e15d
network: Remove net_object_get_panel
...
It was only being used for WiFi devices
2019-11-06 10:16:39 +13:00
Robert Ancell
76de0ce408
network: Simplify net_object_add_to_stack function
...
Except in the WiFi case it was creating a stack with one child.
All the non-WiFi cases had the same logic.
2019-11-06 10:16:39 +13:00
Robert Ancell
0c92c7b461
network: Replace g_object_new with constructors
2019-11-06 10:16:20 +13:00
Robert Ancell
6ab75da5c6
network: Use g_clear_pointer
2019-11-06 10:16:20 +13:00
Robert Ancell
62af171d8b
network: Remove net_object_edit virtual method
...
It didn't need to be virtual and was only used in two cases
2019-10-22 20:11:45 +00:00
Robert Ancell
9b1226aea5
network: Remove helper function with minimal value
...
This can be more easily optimised away in the modules that use it.
2019-10-22 20:11:45 +00:00
Robert Ancell
96585c1542
network: Remove unused hotspot connected label
2019-10-22 20:11:45 +00:00
Robert Ancell
708b1fdaf7
network: Use self variable name consistently
2019-10-22 20:11:45 +00:00
Robert Ancell
8b6e3fb736
network: Store widgets inside objects
...
This is a step towards replacing GtkBuilder with GtkTemplate
2019-10-22 20:11:45 +00:00
Robert Ancell
b331d75df5
network: Rename widget IDs to standard names
2019-10-22 20:11:45 +00:00
Robert Ancell
54f8fce47f
network: Connect signals in swapped form
2019-10-22 20:11:44 +00:00
Robert Ancell
e7cec00235
network: Remove unused wifi dialog
...
This seems to have been copied from the connection editor code, but is not
actually used.
2019-10-22 20:11:44 +00:00
Robert Ancell
57d7a79034
network: Pass widget references rather than relying on names
...
The existing code relied on using GtkBuilder, which will no longer work when we
switch to GtkTemplate.
2019-10-01 14:47:23 +13:00
Robert Ancell
1d43f4c0f5
network: Simplify function
2019-10-01 14:46:14 +13:00
Robert Ancell
3c32ee72ea
network: Remove two common functions that are more simply done inside the few cases that use them
...
The existing code relied on using GtkBuilder, which will no longer work when we
switch to GtkTemplate.
2019-10-01 12:52:42 +13:00
Mohammed Sadiq
642be83798
network: Add new hotspot creation dialog
2019-09-17 12:15:11 +00:00
Robert Ancell
e70610fe74
network: Use g_autoptr for unref code
2019-09-13 14:20:50 +12:00
Robert Ancell
a0c758c46b
network: Fix D-Bus GVariant leak
2019-09-13 14:20:50 +12:00
Robert Ancell
de84f7e344
network: Use g_autofree for strings
2019-09-13 14:20:50 +12:00
Robert Ancell
b085a8af51
network: Fix string leak
2019-09-13 14:20:50 +12:00
Robert Ancell
01190db349
network: Use g_autoptr for GError handling
2019-09-13 14:20:50 +12:00
Mohammed Sadiq
ab8aa577e1
wifi: Use HdyDialog for known networks dialog
2019-09-09 21:36:19 +00:00
Georges Basile Stavracas Neto
e08bc03533
network: Add NetDeviceWifi::scanning property
...
This is a boolean property that notifies whether the
device is scanning for new access points. This is
implemented by monitoring the NMDeviceWifi::last-scan
property, as suggested by NetworkManager developers
(and due to the lack of a better API), since this
property is updated *after* the scan is completed.
2019-06-16 01:01:36 +00:00
Adrien Plazas
91af270cce
connection-editor: Use GtkTemplate
2019-01-27 21:03:13 +00:00
Benjamin Berg
d126b3db5e
wifi: Hook up new connection list widget
2019-01-07 15:29:23 +01:00
Benjamin Berg
5c81b12647
wifi: Handle multiple APs in a connection row
...
Note that this also changes the way to detect that the connection is
currently active. This change is not required but but does simplify the
code a little bit.
2019-01-07 15:29:23 +01:00
Benjamin Berg
8f706f45bd
wifi: Remove unused code in wireless_try_to_connect
...
The code tries to establish a connect by using an existing connection.
However, if that is possible the function will not even be called.
Remove the code in question.
2019-01-07 15:29:23 +01:00
Benjamin Berg
fb089b7c55
wifi: Use new CcWifiConnectionRow widget
...
This is in preparation to optimise the AP list updating.
2019-01-07 15:29:23 +01:00
Benjamin Berg
88183c0e9f
wifi: Remove old and unused column definitions
2019-01-07 15:28:38 +01:00
Benjamin Berg
0922f1095a
wifi: Avoid one level of indentation
...
Convert an if into an early return rather than nesting the entire logic.
2019-01-07 15:28:38 +01:00
Adrien Plazas
943c90074c
wifi: Allow the panel to reach narrower sizes
2018-11-26 15:36:34 +01:00
Georges Basile Stavracas Neto
ccd492d752
net-device-wifi: Remove private field
...
NetDeviceWifi is a final class, and thus does not need a private
field. Remove this field and use the NetDeviceWifi struct itself
to store the previously private variables.
2018-11-05 08:31:49 -02:00
Georges Basile Stavracas Neto
0ce486ecb5
net-device-wifi: Turn into a final class
...
Remove the old style GObject boilerplate and replace it by
G_DECLARE_FINAL_TYPE(). Move the NetDeviceWifi structure
definition to the .c file too.
2018-11-05 08:31:49 -02:00
Georges Basile Stavracas Neto
e1dcf21979
net-device-wifi: Remove macro to get private field
...
We can just use the standard, non-deprecated G_DEFINE_TYPE_WITH_PRIVATE
and avoid g_type_class_add_private(), which is deprecated now.
2018-11-05 08:31:49 -02:00
Jonathan Kang
a0998bbb03
wifi: Disable periodic scan only when Wi-Fi is disabled
...
The periodic Wi-Fi scan is introduced in 84279c4a
. It's designed to
scan the Wi-Fi list every 15 seconds and disable the scan when Wi-Fi is
disabled.
But currently the periodic check is disabled every time
wireless_enabled_toggled() is called, which is wrong. Because it can
mean Wi-Fi is enabled or disabled.
Fix that by disabling periodic scan only when Wi-Fi is disabled.
fixes 84279c4a
2018-10-24 04:38:53 +00:00
Robert Ancell
3642cb2d82
wifi: Use g_signal_connect_object
...
The previous code used the g_signal_connect which could leave the signals
connected even after the NetDeviceWifi object was destroyed.
Automatic crash reports in Ubuntu indicate that this might be happening:
https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1718727
2018-08-13 23:46:23 +00:00
Lubomir Rintel
3c61cee1bb
network: use nm_device_get_description()
...
It's better for human-readable display than nm_device_get_product().
Unlike nm_device_get_product(), it never returns an empty string and
sanitizes the string.
With NM 1.12 it goes to great lengths to clean up the messy udev
strings.
2018-07-17 08:44:16 +02:00
Benjamin Berg
c2f601a9d4
Move common panel code from shell/ to panel/common
...
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Bastien Nocera
84279c4aaa
network: Request periodic Wi-Fi scans
...
As NetworkManager from version 1.10 doesn't handle background scanning
itself, to minimise battery drain, we need to periodically request it to
scan for Wi-Fi Access Points.
We now do this request every 15 seconds, as NetworkManager-applet and
gnome-shell do, and disable that periodic scan if Wi-Fi is disabled.
https://bugzilla.gnome.org/show_bug.cgi?id=793647
2018-02-21 12:29:40 +01:00
Felipe Borges
849e50b70e
wifi: Revert "Add a refresh button"
...
This reverts commit 5ad72b6faa
.
See https://bugzilla.gnome.org/793238
2018-02-20 10:04:48 +01:00