def _init_action_clear(self):
"""
Register the clear prefix action with IDA.
"""
# load the icon for this action
self._clear_icon_id = idaapi.load_custom_icon(plugin_resource("clear.png"))
# describe the action
action_desc = idaapi.action_desc_t(
self.ACTION_CLEAR, # The action name.
"Clear prefixes", # The action text.
IDACtxEntry(clear_prefix), # The action handler.
None, # Optional: action shortcut
"Clear user prefixes from the selected functions", # Optional: tooltip
self._clear_icon_id # Optional: the action icon
)
# register the action with IDA
assert idaapi.register_action(action_desc), "Action registration failed"
评论列表
文章目录