table.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:MTTT 作者: roxana-lafuente 项目源码 文件源码
def __init__(self, table_type, source, reference, save_callback_function, save_function,  stats_callback_function, tab_grid, output_directory):
        self.save_callback_function = save_callback_function
        self.stats_callback_function = stats_callback_function
        self.save_function = save_function
        self.table_type = table_type
        self.source = source
        self.reference = reference
        self.tab_grid = tab_grid
        self.output_directory = output_directory

        self.saved_reference_filepath = ""
        self.last_segment_changed = -1
        self._table_initializing()
        self.make_table_interface()
        self.update_table()

        self.modified_references =  []
        self.last_cell_focused = None
        self.last_cell_focused_index = -1

        # Post Editing: Table
        search_frame = Gtk.Frame()
        self.table_scroll_window = Gtk.ScrolledWindow()
        self.table_scroll_window.set_hexpand(True)
        self.table_scroll_window.set_vexpand(True)
        self.table_scroll_window.add(self.table)
        search_frame.add(self.table_scroll_window)
        self.tab_grid.attach(search_frame, 0, 1, 2, 1)

        # Post Editing: Term Search
        table_frame = Gtk.Frame()
        self.search_results_scroll_window = Gtk.ScrolledWindow()
        self.search_results_scroll_window.show()
        term_search_frame = Gtk.Frame(label="Term Search")
        term_search_entry = Gtk.Entry()
        term_search_frame.add(term_search_entry)
        self.tab_grid.add(term_search_frame)
        term_search_entry.connect("changed", self.search_and_mark_wrapper)
        self.search_results_scroll_window.add(self.search_buttons_table)
        table_frame.add(self.search_results_scroll_window)
        self.tab_grid.attach_next_to(table_frame, term_search_frame, Gtk.PositionType.BOTTOM, 2, 1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号