def __init__(self): super(BaseView, self).__init__() self.set_auto_indent(True) self.set_show_line_numbers(True) self.set_show_line_markers(True) self.set_tabs_width(4) self.set_margin(80) self.set_show_margin(True) self.set_smart_home_end(True) self.set_highlight_current_line(True) self.set_insert_spaces_instead_of_tabs(True) text.make_source_view_indentable(self)
def __init__(self, action_group): gtksourceview.SourceView.__init__(self) self.set_auto_indent(True) self.set_show_line_numbers(True) self.set_show_line_markers(True) self.set_tabs_width(4) self.set_margin(80) self.set_show_margin(True) self.set_smart_home_end(True) self.set_highlight_current_line(True) self.set_insert_spaces_instead_of_tabs(True) font_desc = pango.FontDescription('monospace 10') if font_desc is not None: self.modify_font(font_desc) self.search_bar = SearchBar(self, action_group) self.replace_bar = ReplaceBar(self, self.search_bar, action_group) self.set_action_group(action_group) make_source_view_indentable(self)
def __init__(self, action_group): gtksourceview.SourceView.__init__(self) self.set_auto_indent(True) self.set_show_line_numbers(True) self.set_show_line_markers(True) self.set_tabs_width(4) self.set_margin(80) self.set_show_margin(True) self.set_smart_home_end(True) self.set_highlight_current_line(True) self.set_insert_spaces_instead_of_tabs(True) font_desc = pango.FontDescription('monospace 10') if font_desc is not None: self.modify_font(font_desc) self.search_bar = SearchBar(self, action_group) self.replace_bar = ReplaceBar(self, self.search_bar, action_group) action_group.get_action(ACTION_FIND_FORWARD).connect( "activate", self.on_find_forward) action_group.get_action(ACTION_FIND_BACKWARD).connect( "activate", self.on_find_backwards) make_source_view_indentable(self)