Skip to content

Support action receiving and add ability to name them #3

@C0rn3j

Description

@C0rn3j

Currently, actions are only defined but unimplemented in the async block.

@dbus_signal_async()
def action_invoked(self) -> Tuple[int, int]:
"""Signal when user invokes one of the actions specified.
First element of tuple is notification id.
Second element is the index of the action invoked. \
Matches the index of passed list of actions.
"""
raise NotImplementedError

They are also named automatically by index, it would be nicer if they were able to be named properly via a string.

The blocking version for action receiving could simply block and return a tuple with both the ID and the actions upon expiry of the notification.
It would perhaps be best if this was made optional in the notify() function, as I imagine not everyone would want to block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions