Commit graph

26 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
f1347132d9
net-device-mobile: Remove private field from public structure
We can use pointer arithmetics to retrieve the private field.
2018-11-05 08:33:21 -02:00
Georges Basile Stavracas Neto
724c77a1a4
net-device-mobile: Turn into a final class
Exact same case of NetVpn and NetDeviceWifi.
2018-11-05 08:33:21 -02:00
Georges Basile Stavracas Neto
d4a08c48f1
net-device-mobile: 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:33:21 -02:00
Georges Basile Stavracas Neto
890dac86e9
net-device-mobile: Initialize variable 2018-11-05 08:31:48 -02:00
Georges Basile Stavracas Neto
158591a346 network: Replace the notebook with a stack
The Network panel uses a GtkNotebook internally to manage
the different setup pages of the network devices. While it
does the job, we now have a modern widget for that: GtkStack.

With GtkStack, managing the pages becomes a lot easier and
we gain almost for free the nice transition between pages,
besides of course being a widget that consumes slightly less
resources.

Besides all these gains, using a GtkStack will allow us to
implement the new Wi-Fi panel in a more cohesive manner,
sharing large portions of code and avoiding copy pasta.

This commit then turns the GtkNotebook into a GtkStack, and
renames and adapts the code to reflect that. Fortunately,
the code got actually simpler with the move.

https://bugzilla.gnome.org/show_bug.cgi?id=784818
2017-07-17 23:40:58 -03:00
Jonathan Kang
bb8ca23701 network: Fix mobile broadband switch state
The switch was only reflecting the value of the WWAN killswitch instead
of both the WWAN killswitch and the state of the connection itself.

https://bugzilla.gnome.org/show_bug.cgi?id=690361
2017-04-13 15:51:51 +02:00
Bastien Nocera
9183d34947 network: Port to libnm 1.2
We also remove support for WiMAX (now unsupported by NetworkManager),
and InfiniBand (Enterprise feature), and the use of
the deprecated NM_SETTING_WIRELESS_SEC property.

With help from network-manager-applet patches by Jiří Klimeš and
Dan Winship.

https://bugzilla.gnome.org/show_bug.cgi?id=765910
2016-05-27 18:23:33 +02:00
Bastien Nocera
c515a6e67e network: Fix more potential crashers for WWAN
And virtual devices. Again, listening on the long-lasting client
object but expecting the user_data (the object) to be around when
it might have been destroyed already.

https://bugzilla.gnome.org/show_bug.cgi?id=735932
2014-09-03 18:04:58 +02:00
Rui Matos
c5b70a7876 network: Remove unused toplevel windows from .ui files
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Rui Matos
aee3f9d82d network: Remove a spurious signal handler
https://bugzilla.gnome.org/show_bug.cgi?id=707906
2013-09-11 16:46:35 +02:00
Kalev Lember
f8f420256b network: Fix a possible crash with no active connections
As a precaution, check the return value of get_active_connections to
avoid dereferencing a NULL pointer.

https://bugzilla.redhat.com/show_bug.cgi?id=990196
https://bugzilla.gnome.org/show_bug.cgi?id=707906
2013-09-11 16:22:01 +02:00
Bastien Nocera
d5cf19be14 Revert "network: make ModemManager dependency optional"
This reverts commit 4ef8ae4017.
2013-02-21 07:30:46 +01:00
Dan Winship
4ef8ae4017 network: make ModemManager dependency optional
There probably won't be a stable ModemManager 0.7 release before GNOME
3.8, so make support for it optional

(Mostly based on Aleksander's original patch.)

https://bugzilla.gnome.org/show_bug.cgi?id=688238
2013-02-19 13:48:45 -05:00
Aleksander Morgado
d28b756e61 network: try to guess operator name from MCCMNC or SID
When the network doesn't provide a valid text string with the current operator
name, try to guess it using either the 3GPP MCCMNC pair or with the CDMA SID.

Guessing is based on the Mobile Providers Database for which there is an API in
libnm-gtk (>= 0.9.7.995).

The same logic to guess operator name is used in gnome-shell.
2013-02-12 17:43:04 +01:00
Aleksander Morgado
0225d1a9e7 network: include support for the 'ModemManager1' interface
The control-center will automatically detect whether the modems exposed by
NetworkManager are from the old or the new interface, and if they are from the
new one it will use the libmm-glib support to gather the required information
from them.

The new ModemManager1 interfaces are exposed by ModemManager >= 0.7; and provide
lots of new functionalities, like:
  * Improved connection bearer handling (e.g. multiple bearers at the same time)
  * Location support (GPS, LAC/CI, CDMA BS...)
  * Full SMS support through the new 'Messaging' interface.
  * ...
2013-02-12 17:43:02 +01:00
Dan Winship
15baea4720 network: display "device state reason", and remove duplicate code
For disconnected/unavailable devices, show the localized
NMDeviceStateReason next to the localized NMDeviceState (and not in
the tooltip). Also, move the code to do this into panel-common rather
to save some duplication.

https://bugzilla.gnome.org/show_bug.cgi?id=676117
2013-02-11 12:46:49 -05:00
Dan Winship
534ad36364 network: don't call inactive devices "Disconnected"
It's confusing to call an ethernet device "disconnected" when it is
plugged in but not in use. Just don't say anything instead.

Also, update the icon logic to show the "disconnected" icon in this
state, rather than the "connected" one, since it's confusing for the
icon to change even though the network connection hasn't been
activated.

https://bugzilla.gnome.org/show_bug.cgi?id=646029
2013-01-31 14:28:48 -05:00
Dan Winship
ebd863e714 network: add net_device_get_valid_connections() and use it everywhere
In addition to simplifying a bunch of places that were calling
nm_remote_settings_list_connections() +
nm_device_filter_connections(), this also ensures we filter out slave
connections everywhere (except when they are the active connection).

https://bugzilla.gnome.org/show_bug.cgi?id=677145
2013-01-30 13:05:34 -05:00
Cosimo Cecchi
57de0ab019 network: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:06 +01:00
Jasper St. Pierre
23e51495ee network: Don't reference CcNetworkPanel directly from some helper code
All we need is the toplevel, here, so pass that in directly.

https://bugzilla.gnome.org/show_bug.cgi?id=690086
2012-12-13 11:55:33 -05:00
Aleksander Morgado
ec0f5b0b29 network: load IMEI and Operator Name also in LTE-only modems
Also bump NetworkManager required version to 0.8.995, which is when
'NM_DEVICE_MODEM_CAPABILITY_LTE' was introduced.

https://bugzilla.gnome.org/show_bug.cgi?id=688212
2012-11-23 17:33:19 +01:00
Aleksander Morgado
0c8f4451b7 network: ensure IMEI is displayed and reload Operator Name when it changes
The IMEI was not being properly displayed in the UI; the code would load it
reading 'EquipmentIdentifier' from ModemManager, but the UI wasn't getting
refreshed properly when that happened. So at the end, the IMEI was stored but
not shown. This patch fixes the issue, by reloading the UI element when the IMEI
is retrieved.

The same issue was happening with the Operator Code, with the additional issue
being that this property is meant to change whenever the registration info in
the modem changes. Therefore, we now listen to the 'RegistrationInfo' signal to
detect the changes and update the Operator Name when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=688211
2012-11-23 17:32:56 +01:00
Dan Winship
63756458b2 network: disambiguate devices of the same type
If there are multiple devices that would end up with the same name in
the device list, disambiguate their names via new libnm-gtk API.

https://bugzilla.gnome.org/show_bug.cgi?id=677143
2012-10-11 09:22:35 +02:00
Dan Winship
8df1069f7d network: fix wired/mobile activation
You have to pass the NMDevice to nm_client_activate_connection() for a
device-specific connection. This got broken at some point in the
rewrites since 3.4.

https://bugzilla.gnome.org/show_bug.cgi?id=682469
2012-08-22 10:32:59 -04:00
Richard Hughes
de8993eddb network: Allow NetObjects to get the main panel object so they can show modal dialogs 2012-07-20 09:31:12 +01:00
Richard Hughes
26b5169bee network: Split the mobile broadband device from the .c and .ui file 2012-07-20 09:31:12 +01:00