Skip to content

Instantly share code, notes, and snippets.

@Ikke
Created August 12, 2018 11:31
Show Gist options
  • Save Ikke/fc9e7db6eb04c5cbb7f7113a21b61281 to your computer and use it in GitHub Desktop.
Save Ikke/fc9e7db6eb04c5cbb7f7113a21b61281 to your computer and use it in GitHub Desktop.
Solaar 0.9.2 patch to support python 3.7
diff --git a/lib/solaar/ui/__init__.py b/lib/solaar/ui/__init__.py
index 5a0340e..80441f5 100644
--- a/lib/solaar/ui/__init__.py
+++ b/lib/solaar/ui/__init__.py
@@ -123,7 +123,7 @@ _queue_processor.start()
del Thread
-def async(function, *args, **kwargs):
+def ui_async(function, *args, **kwargs):
task = (function, args, kwargs)
_task_queue.put(task)
@@ -149,7 +149,7 @@ def run_loop():
def _shutdown(app):
# stop the async UI processor
_queue_processor.alive = False
- async(None)
+ ui_async(None)
tray.destroy()
notify.uninit()
diff --git a/lib/solaar/ui/config_panel.py b/lib/solaar/ui/config_panel.py
index 8adca6e..e288f04 100644
--- a/lib/solaar/ui/config_panel.py
+++ b/lib/solaar/ui/config_panel.py
@@ -23,7 +23,7 @@ from gi.repository import Gtk, GLib
from solaar.i18n import _
-from solaar.ui import async as _ui_async
+from solaar.ui import ui_async as _ui_async
from logitech_receiver.settings import KIND as _SETTING_KIND
#
diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py
index 496082e..66c8d0d 100644
--- a/lib/solaar/ui/window.py
+++ b/lib/solaar/ui/window.py
@@ -30,7 +30,7 @@ from gi.repository.GObject import TYPE_PYOBJECT
from solaar import NAME
from solaar.i18n import _
# from solaar import __version__ as VERSION
-from solaar.ui import async as _ui_async
+from solaar.ui import ui_async as _ui_async
from logitech_receiver import hidpp10 as _hidpp10
from logitech_receiver.common import NamedInts as _NamedInts, NamedInt as _NamedInt
from logitech_receiver.status import KEYS as _K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment