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.
This commit is contained in:
parent
77cae9ce72
commit
8e175bb562
1 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
else
|
||||
net_object_set_title (NET_OBJECT (devices[i]), titles[i]);
|
||||
g_free (titles[i]);
|
||||
}
|
||||
g_free (titles);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue