How to use the solaar.listener.stop_all function in solaar

To help you get started, we’ve selected a few solaar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pwr-Solaar / Solaar / lib / solaar / gtk.py View on Github external
gi.require_version('Gtk', '3.0')
	_require('gi.repository.Gtk', 'gir1.2-gtk-3.0')

	try:
		import solaar.ui as ui
		import solaar.listener as listener
		listener.setup_scanner(ui.status_changed, ui.error_dialog)

		import solaar.upower as _upower
		if args.restart_on_wake_up:
			_upower.watch(listener.start_all, listener.stop_all)
		else:
			_upower.watch(listener.ping_all)

		# main UI event loop
		ui.run_loop(listener.start_all, listener.stop_all)
	except Exception as e:
		import sys
		sys.exit('%s: error: %s' % (NAME.lower(), e))