@QtCore.Slot(YubiKeyNeo)
    def set_neo(self, neo):
        self._neo = neo
        if not neo:
            return

        self._name_btn.setDisabled(neo.serial is None)
        self._name.setText(m.name_1 % neo.name)
        self._serial.setText(m.serial_1 % neo.serial)
        show_firmware = neo.version != (0, 0, 0)
        self._u2f_row.setDirection(
            QtGui.QBoxLayout.LeftToRight if show_firmware else
            QtGui.QBoxLayout.RightToLeft)
        self._firmware.setVisible(show_firmware)
        self._firmware.setText(m.firmware_1 % '.'.join(map(str, neo.version)))
        if neo.allowed_modes[2]:
            self._u2f.setText(m.u2f_1 % m.u2f_supported)
        else:
            self._u2f.setText(m.u2f_1 % m.u2f_not_supported_1 % U2F_URL)
        self._mode_btn.setText(m.change_mode_1 % MODE.name_for_mode(neo.mode))
        self._mode_note.setVisible(neo.version < (4, 1, 0))
dataset/ETHPy150Open Yubico/yubikey-neo-manager/neoman/view/neo.py/SettingsTab.set_neo/original