tweak hook name
This commit is contained in:
parent
28380d4183
commit
634931cf9e
@ -1928,7 +1928,7 @@ class _StyleDidInitFilter:
|
||||
style_did_init = _StyleDidInitFilter()
|
||||
|
||||
|
||||
class _TagEditorReceivedAKeyHook:
|
||||
class _TagEditorDidProcessKeyHook:
|
||||
_hooks: List[Callable[[TagEdit, QEvent], None]] = []
|
||||
|
||||
def append(self, cb: Callable[[TagEdit, QEvent], None]) -> None:
|
||||
@ -1949,7 +1949,7 @@ class _TagEditorReceivedAKeyHook:
|
||||
raise
|
||||
|
||||
|
||||
tag_editor_received_a_key = _TagEditorReceivedAKeyHook()
|
||||
tag_editor_did_process_key = _TagEditorDidProcessKeyHook()
|
||||
|
||||
|
||||
class _TopToolbarDidInitLinksHook:
|
||||
|
@ -77,7 +77,7 @@ class TagEdit(QLineEdit):
|
||||
Qt.Key_Delete,
|
||||
):
|
||||
self.showCompleter()
|
||||
gui_hooks.tag_editor_received_a_key(self, evt)
|
||||
gui_hooks.tag_editor_did_process_key(self, evt)
|
||||
|
||||
def showCompleter(self):
|
||||
self.completer.setCompletionPrefix(self.text())
|
||||
|
@ -511,7 +511,7 @@ def emptyNewCard():
|
||||
),
|
||||
# Tag
|
||||
###################
|
||||
Hook(name="tag_editor_received_a_key", args=["tag_edit: TagEdit", "evt: QEvent"]),
|
||||
Hook(name="tag_editor_did_process_key", args=["tag_edit: TagEdit", "evt: QEvent"]),
|
||||
# Sound/video
|
||||
###################
|
||||
Hook(name="av_player_will_play", args=["tag: anki.sound.AVTag"]),
|
||||
|
Loading…
Reference in New Issue
Block a user