def __init__(self, main_window): CustomListView.__init__(self, [(_('Date'), str), (_('Text'), str)]) self.main_window = main_window self.journal = self.main_window.journal self.tree_store = self.get_model() self.connect('cursor_changed', self.on_cursor_changed)
def __init__(self, main_window, always_show_results): CustomListView.__init__(self, [(_("Date"), str), (_("Text"), str)]) self.main_window = main_window self.journal = self.main_window.journal self.always_show_results = always_show_results self.tree_store = self.get_model() self.connect("cursor_changed", self.on_cursor_changed)
def setup_stats_dialog(self): self.stats_dialog = self.builder.get_object('stats_dialog') self.stats_dialog.set_transient_for(self.main_frame) overall_box = self.builder.get_object('overall_box') day_box = self.builder.get_object('day_stats_box') columns = [('1', str), ('2', str)] overall_list = CustomListView(columns) day_list = CustomListView(columns) overall_box.pack_start(overall_list, True, True, 0) day_box.pack_start(day_list, True, True, 0) setattr(self.stats_dialog, 'overall_list', overall_list) setattr(self.stats_dialog, 'day_list', day_list) for list in [overall_list, day_list]: list.set_headers_visible(False)
def setup_stats_dialog(self): self.stats_dialog = self.builder.get_object("stats_dialog") self.stats_dialog.set_transient_for(self.main_frame) overall_box = self.builder.get_object("overall_box") day_box = self.builder.get_object("day_stats_box") columns = [("1", str), ("2", str)] overall_list = CustomListView(columns) day_list = CustomListView(columns) overall_box.pack_start(overall_list, True, True, 0) day_box.pack_start(day_list, True, True, 0) self.stats_dialog.overall_list = overall_list self.stats_dialog.day_list = day_list for list in [overall_list, day_list]: list.set_headers_visible(False)