diff --git a/lib/logitech/unifying_receiver/receiver.py b/lib/logitech/unifying_receiver/receiver.py index 02853cd8..eb537fbc 100644 --- a/lib/logitech/unifying_receiver/receiver.py +++ b/lib/logitech/unifying_receiver/receiver.py @@ -323,6 +323,9 @@ class Receiver(object): raise Exception("unknown receiver type", self.max_devices) self._str = '<%s(%s,%s%s)>' % (self.name.replace(' ', ''), self.path, '' if type(self.handle) == int else 'T', self.handle) + # TODO _properly_ figure out which receivers do and which don't support unpairing + self.may_unpair = self.write_register(_R.receiver_pairing) is None + self._firmware = None self._devices = {} diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py index 3d3f38e5..02edee23 100644 --- a/lib/solaar/ui/window.py +++ b/lib/solaar/ui/window.py @@ -606,7 +606,7 @@ def _update_device_panel(device, panel, buttons, full=False): panel._lux.set_visible(False) buttons._pair.set_visible(False) - buttons._unpair.set_sensitive(device.receiver.max_devices >= 6) + buttons._unpair.set_sensitive(device.receiver.may_unpair) buttons._unpair.set_visible(True) panel.set_visible(True)