Skip to content

Commit

Permalink
ui: fix bug when displaying receiver notification flags
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Feb 26, 2024
1 parent 67be689 commit 8ae86ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/solaar/ui/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import gi

from gi.repository.GObject import TYPE_PYOBJECT
from logitech_receiver import hidpp10 as _hidpp10
from logitech_receiver import hidpp10_constants as _hidpp10_constants
from logitech_receiver.common import NamedInt as _NamedInt
from logitech_receiver.common import NamedInts as _NamedInts
from logitech_receiver.status import KEYS as _K
Expand Down Expand Up @@ -579,7 +579,9 @@ def _details_items(device, read_all=False):

flag_bits = device.status.get(_K.NOTIFICATION_FLAGS)
if flag_bits is not None:
flag_names = ("(%s)" % _("none"),) if flag_bits == 0 else _hidpp10.NOTIFICATION_FLAG.flag_names(flag_bits)
flag_names = (
("(%s)" % _("none"),) if flag_bits == 0 else _hidpp10_constants.NOTIFICATION_FLAG.flag_names(flag_bits)
)
yield (_("Notifications"), ("\n%15s" % " ").join(flag_names))

def _set_details(text):
Expand Down

0 comments on commit 8ae86ac

Please sign in to comment.