def _marker_menu_item_activated(widget, msg): current_frame = PLAYER().current_frame() if msg == "add": dialogs.marker_name_dialog(utils.get_tc_string(current_frame), _marker_add_dialog_callback) elif msg == "delete": mrk_index = -1 for i in range(0, len(current_sequence().markers)): name, frame = current_sequence().markers[i] if frame == current_frame: mrk_index = i if mrk_index != -1: current_sequence().markers.pop(mrk_index) updater.repaint_tline() elif msg == "deleteall": current_sequence().markers = [] updater.repaint_tline() else: # seek to marker name, frame = current_sequence().markers[int(msg)] PLAYER().seek_frame(frame)
def add_marker(): current_frame = PLAYER().current_frame() dialogs.marker_name_dialog(utils.get_tc_string(current_frame), _marker_add_dialog_callback)