MCPcopy Index your code
hub / github.com/keystone-engine/keypatch / Hooks

Class Hooks

keypatch.py:1417–1437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1415
1416# hooks for popup menu
1417class Hooks(idaapi.UI_Hooks):
1418 def finish_populating_tform_popup(self, form, popup):
1419 # We'll add our action to all "IDA View-*"s.
1420 # If we wanted to add it only to "IDA View-A", we could
1421 # also discriminate on the widget's title:
1422 #
1423 # if idaapi.get_tform_title(form) == "IDA View-A":
1424 # ...
1425 #
1426 if idaapi.get_tform_type(form) == idaapi.BWN_DISASM:
1427 try:
1428 idaapi.attach_action_to_popup(form, popup, Kp_MC_Patcher.get_name(), 'Keypatch/')
1429 idaapi.attach_action_to_popup(form, popup, Kp_MC_Fill_Range.get_name(), 'Keypatch/')
1430 idaapi.attach_action_to_popup(form, popup, Kp_MC_Undo.get_name(), 'Keypatch/')
1431 idaapi.attach_action_to_popup(form, popup, "-", 'Keypatch/')
1432 idaapi.attach_action_to_popup(form, popup, Kp_MC_Search.get_name(), 'Keypatch/')
1433 idaapi.attach_action_to_popup(form, popup, "-", 'Keypatch/')
1434 idaapi.attach_action_to_popup(form, popup, Kp_MC_Updater.get_name(), 'Keypatch/')
1435 idaapi.attach_action_to_popup(form, popup, Kp_MC_About.get_name(), 'Keypatch/')
1436 except:
1437 pass
1438
1439
1440# check if we already initialized Keypatch

Callers 1

initMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected