main_window: when no devices found on linux, link to udev guide
parent
bc438fb130
commit
9c77228feb
|
|
@ -6,6 +6,7 @@ from PyQt5.QtWidgets import QWidget, QComboBox, QToolButton, QHBoxLayout, QVBoxL
|
|||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from urllib.request import urlopen
|
||||
|
||||
from editor_container import EditorContainer
|
||||
|
|
@ -69,10 +70,14 @@ class MainWindow(QMainWindow):
|
|||
self.tabs.currentChanged.connect(self.on_tab_changed)
|
||||
self.refresh_tabs()
|
||||
|
||||
self.lbl_no_devices = QLabel(tr("MainWindow", 'No devices detected. Connect a Vial-compatible device and press '
|
||||
'"Refresh"\n'
|
||||
'or select "File" → "Download VIA definitions" in order to enable'
|
||||
' support for VIA keyboards.'))
|
||||
no_devices = 'No devices detected. Connect a Vial-compatible device and press "Refresh"<br>' \
|
||||
'or select "File" → "Download VIA definitions" in order to enable support for VIA keyboards.'
|
||||
if sys.platform.startswith("linux"):
|
||||
no_devices += '<br><br>On Linux you need to set up a custom udev rule for keyboards to be detected. ' \
|
||||
'Follow the instructions linked below:<br>' \
|
||||
'<a href="https://get.vial.today/getting-started/linux-udev.html">https://get.vial.today/getting-started/linux-udev.html</a>'
|
||||
self.lbl_no_devices = QLabel(tr("MainWindow", no_devices))
|
||||
self.lbl_no_devices.setTextFormat(Qt.RichText)
|
||||
self.lbl_no_devices.setAlignment(Qt.AlignCenter)
|
||||
|
||||
layout = QVBoxLayout()
|
||||
|
|
|
|||
Loading…
Reference in New Issue