device: upgrade messages when no supported device found

This commit is contained in:
Peter F. Patel-Schneider 2023-08-02 11:41:30 -04:00
parent 0e8e052629
commit d7bd55bdf1
2 changed files with 4 additions and 2 deletions

View File

@ -203,7 +203,9 @@ def run(cli_args=None, hidraw_path=None):
else:
c = list(_receivers(hidraw_path))
if not c:
raise Exception('No devices found')
raise Exception(
'No supported device found. Use "lsusb" and "bluetoothctl devices Connected" to list connected devices.'
)
from importlib import import_module
m = import_module('.' + action, package=__name__)
m.run(c, args, _find_receiver, _find_device)

View File

@ -55,7 +55,7 @@ def _create_menu(quit_handler):
# per-device menu entries will be generated as-needed
no_receiver = Gtk.MenuItem.new_with_label(_('No Logitech device found'))
no_receiver = Gtk.MenuItem.new_with_label(_('No supported device found'))
no_receiver.set_sensitive(False)
menu.append(no_receiver)
menu.append(Gtk.SeparatorMenuItem.new())