Commit 8e175bb5 authored by Benjamin Berg's avatar Benjamin Berg

network: Don't shorten names of bluetooth connections

This prevents a single bluetooth connection to be shortened to the name
"Bluetooth", which means we end up with one "Bluetooth" device in the
"Bluetooth" section. Rather, always use the long name of the bluetooth
device so that the user knows what they are connecting to.
parent 77cae9ce
Pipeline #71635 passed with stages
in 5 minutes and 48 seconds
......@@ -301,7 +301,16 @@ panel_refresh_device_titles (CcNetworkPanel *panel)
titles = nm_device_disambiguate_names (nm_devices, num_devices);
for (i = 0; i < num_devices; i++) {
net_object_set_title (NET_OBJECT (devices[i]), titles[i]);
const gchar *bt_name = NULL;
if (NM_IS_DEVICE_BT (nm_devices[i]))
bt_name = nm_device_bt_get_name (NM_DEVICE_BT (nm_devices[i]));
/* For bluetooth devices, use their device name. */
if (bt_name)
net_object_set_title (NET_OBJECT (devices[i]), bt_name);
net_object_set_title (NET_OBJECT (devices[i]), titles[i]);
g_free (titles[i]);
g_free (titles);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment