moved logitech.unifying_receiver package to logitech_receiver
This commit is contained in:
parent
b83a14e16f
commit
43ab629a26
|
@ -1,7 +0,0 @@
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
|
||||||
|
|
||||||
__version__ = "0.8"
|
|
|
@ -25,6 +25,9 @@ _log.setLevel(logging.root.level)
|
||||||
del logging
|
del logging
|
||||||
|
|
||||||
|
|
||||||
|
__version__ = '0.9'
|
||||||
|
|
||||||
|
|
||||||
from .common import strhex
|
from .common import strhex
|
||||||
from .base import NoReceiver, NoSuchDevice, DeviceUnreachable
|
from .base import NoReceiver, NoSuchDevice, DeviceUnreachable
|
||||||
from .receiver import Receiver, PairedDevice
|
from .receiver import Receiver, PairedDevice
|
|
@ -32,8 +32,8 @@ def _require(module, os_package):
|
||||||
#
|
#
|
||||||
|
|
||||||
def _receiver(dev_path=None):
|
def _receiver(dev_path=None):
|
||||||
from logitech.unifying_receiver import Receiver
|
from logitech_receiver import Receiver
|
||||||
from logitech.unifying_receiver.base import receivers
|
from logitech_receiver.base import receivers
|
||||||
for dev_info in receivers():
|
for dev_info in receivers():
|
||||||
if dev_path is not None and dev_path != dev_info.path:
|
if dev_path is not None and dev_path != dev_info.path:
|
||||||
continue
|
continue
|
||||||
|
@ -93,7 +93,7 @@ def _print_receiver(receiver, verbose=False):
|
||||||
|
|
||||||
print (" Has", paired_count, "paired device(s) out of a maximum of", receiver.max_devices, ".")
|
print (" Has", paired_count, "paired device(s) out of a maximum of", receiver.max_devices, ".")
|
||||||
|
|
||||||
from logitech.unifying_receiver import hidpp10
|
from logitech_receiver import hidpp10
|
||||||
notification_flags = hidpp10.get_notification_flags(receiver)
|
notification_flags = hidpp10.get_notification_flags(receiver)
|
||||||
if notification_flags is not None:
|
if notification_flags is not None:
|
||||||
if notification_flags:
|
if notification_flags:
|
||||||
|
@ -133,7 +133,7 @@ def _print_device(dev, verbose=False):
|
||||||
if dev.power_switch_location:
|
if dev.power_switch_location:
|
||||||
print (" The power switch is located on the %s." % dev.power_switch_location)
|
print (" The power switch is located on the %s." % dev.power_switch_location)
|
||||||
|
|
||||||
from logitech.unifying_receiver import hidpp10, hidpp20, special_keys
|
from logitech_receiver import hidpp10, hidpp20, special_keys
|
||||||
|
|
||||||
if dev.online:
|
if dev.online:
|
||||||
notification_flags = hidpp10.get_notification_flags(dev)
|
notification_flags = hidpp10.get_notification_flags(dev)
|
||||||
|
@ -166,7 +166,7 @@ def _print_device(dev, verbose=False):
|
||||||
if battery is None:
|
if battery is None:
|
||||||
battery = hidpp10.get_battery(dev)
|
battery = hidpp10.get_battery(dev)
|
||||||
if battery is not None:
|
if battery is not None:
|
||||||
from logitech.unifying_receiver.common import NamedInt as _NamedInt
|
from logitech_receiver.common import NamedInt as _NamedInt
|
||||||
level, status = battery
|
level, status = battery
|
||||||
if isinstance(level, _NamedInt):
|
if isinstance(level, _NamedInt):
|
||||||
text = str(level)
|
text = str(level)
|
||||||
|
@ -201,7 +201,7 @@ def pair_device(receiver, args):
|
||||||
# get all current devices
|
# get all current devices
|
||||||
known_devices = [dev.number for dev in receiver]
|
known_devices = [dev.number for dev in receiver]
|
||||||
|
|
||||||
from logitech.unifying_receiver import base, hidpp10, status, notifications
|
from logitech_receiver import base, hidpp10, status, notifications
|
||||||
receiver.status = status.ReceiverStatus(receiver, lambda *args, **kwargs: None)
|
receiver.status = status.ReceiverStatus(receiver, lambda *args, **kwargs: None)
|
||||||
|
|
||||||
# check if it's necessary to set the notification flags
|
# check if it's necessary to set the notification flags
|
||||||
|
@ -300,7 +300,7 @@ def config_device(receiver, args):
|
||||||
print ("%s = %s" % (setting.name, setting.read()))
|
print ("%s = %s" % (setting.name, setting.read()))
|
||||||
return
|
return
|
||||||
|
|
||||||
from logitech.unifying_receiver import settings as _settings
|
from logitech_receiver import settings as _settings
|
||||||
|
|
||||||
if setting.kind == _settings.KIND.toggle:
|
if setting.kind == _settings.KIND.toggle:
|
||||||
value = args.value
|
value = args.value
|
||||||
|
|
|
@ -9,10 +9,12 @@ _log = getLogger(__name__)
|
||||||
del getLogger
|
del getLogger
|
||||||
|
|
||||||
from . import configuration
|
from . import configuration
|
||||||
from logitech.unifying_receiver import (Receiver,
|
from logitech_receiver import (
|
||||||
listener as _listener,
|
Receiver,
|
||||||
status as _status,
|
listener as _listener,
|
||||||
notifications as _notifications)
|
status as _status,
|
||||||
|
notifications as _notifications
|
||||||
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -254,7 +256,7 @@ from . import upower
|
||||||
upower.watch(start_all, stop_all)
|
upower.watch(start_all, stop_all)
|
||||||
|
|
||||||
|
|
||||||
from logitech.unifying_receiver import base as _base
|
from logitech_receiver import base as _base
|
||||||
_status_callback = None
|
_status_callback = None
|
||||||
_error_callback = None
|
_error_callback = None
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ def run_loop():
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from logitech.unifying_receiver.status import ALERT
|
from logitech_receiver.status import ALERT
|
||||||
def _status_changed(device, alert, reason):
|
def _status_changed(device, alert, reason):
|
||||||
assert device is not None
|
assert device is not None
|
||||||
if _log.isEnabledFor(_DEBUG):
|
if _log.isEnabledFor(_DEBUG):
|
||||||
|
|
|
@ -8,7 +8,7 @@ from gi.repository import Gtk, GLib
|
||||||
|
|
||||||
|
|
||||||
from solaar.ui import async as _ui_async
|
from solaar.ui import async as _ui_async
|
||||||
from logitech.unifying_receiver.settings import KIND as _SETTING_KIND
|
from logitech_receiver.settings import KIND as _SETTING_KIND
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -11,7 +11,7 @@ _log = getLogger(__name__)
|
||||||
del getLogger
|
del getLogger
|
||||||
|
|
||||||
from . import icons as _icons
|
from . import icons as _icons
|
||||||
from logitech.unifying_receiver.status import KEYS as _K
|
from logitech_receiver.status import KEYS as _K
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
|
@ -14,7 +14,7 @@ from gi.repository import Gtk, GLib
|
||||||
from gi.repository.Gdk import ScrollDirection
|
from gi.repository.Gdk import ScrollDirection
|
||||||
|
|
||||||
from solaar import NAME
|
from solaar import NAME
|
||||||
from logitech.unifying_receiver.status import KEYS as _K
|
from logitech_receiver.status import KEYS as _K
|
||||||
from . import icons as _icons
|
from . import icons as _icons
|
||||||
from .window import popup as _window_popup, toggle as _window_toggle
|
from .window import popup as _window_popup, toggle as _window_toggle
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ from gi.repository.GObject import TYPE_PYOBJECT
|
||||||
from solaar import NAME
|
from solaar import NAME
|
||||||
# from solaar import __version__ as VERSION
|
# from solaar import __version__ as VERSION
|
||||||
from solaar.ui import async as _ui_async
|
from solaar.ui import async as _ui_async
|
||||||
from logitech.unifying_receiver import hidpp10 as _hidpp10
|
from logitech_receiver import hidpp10 as _hidpp10
|
||||||
from logitech.unifying_receiver.common import NamedInts as _NamedInts, NamedInt as _NamedInt
|
from logitech_receiver.common import NamedInts as _NamedInts, NamedInt as _NamedInt
|
||||||
from logitech.unifying_receiver.status import KEYS as _K
|
from logitech_receiver.status import KEYS as _K
|
||||||
from . import config_panel as _config_panel
|
from . import config_panel as _config_panel
|
||||||
from . import action as _action, icons as _icons
|
from . import action as _action, icons as _icons
|
||||||
from .about import show_window as _show_about_window
|
from .about import show_window as _show_about_window
|
||||||
|
|
|
@ -12,7 +12,6 @@ del getLogger
|
||||||
# As suggested here: http://stackoverflow.com/a/13548984
|
# As suggested here: http://stackoverflow.com/a/13548984
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
_suspend_callback = None
|
_suspend_callback = None
|
||||||
def _suspend():
|
def _suspend():
|
||||||
if _suspend_callback:
|
if _suspend_callback:
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -54,7 +54,7 @@ battery status.
|
||||||
requires=['pyudev (>= 0.13)', 'gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],
|
requires=['pyudev (>= 0.13)', 'gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],
|
||||||
|
|
||||||
package_dir={'': 'lib'},
|
package_dir={'': 'lib'},
|
||||||
packages=['hidapi', 'logitech', 'logitech.unifying_receiver', 'solaar', 'solaar.ui'],
|
packages=['hidapi', 'logitech_receiver', 'solaar', 'solaar.ui'],
|
||||||
|
|
||||||
data_files=[('share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')),
|
data_files=[('share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')),
|
||||||
('share/solaar/icons', _glob('share/solaar/icons/light_*.png')),
|
('share/solaar/icons', _glob('share/solaar/icons/light_*.png')),
|
||||||
|
|
Loading…
Reference in New Issue