Exemple #1
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.drag_dest_add_uri_targets()

        # Most bindings are on SourceView, except the Page Up/Down ones
        # which are on TextView.
        binding_set_names = ('GtkSourceView', 'GtkTextView')
        for set_name in binding_set_names:
            binding_set = Gtk.binding_set_find(set_name)
            for key, modifiers in self.replaced_entries:
                Gtk.binding_entry_remove(binding_set, key, modifiers)

        self.anim_source_id = None
        self.animating_chunks = []
        self.syncpoints = []
        self._show_line_numbers = None

        buf = MeldBuffer()
        inline_tag = GtkSource.Tag.new("inline")
        inline_tag.props.draw_spaces = True
        buf.get_tag_table().add(inline_tag)
        buf.create_tag("dimmed")
        self.set_buffer(buf)
        self.connect('notify::overscroll-num-lines', self.notify_overscroll)
Exemple #2
0
    def __init__(self, *args, **kwargs):
        super(MeldSourceView, self).__init__(*args, **kwargs)
        binding_set = Gtk.binding_set_find('GtkSourceView')
        for key, modifiers in self.replaced_entries:
            Gtk.binding_entry_remove(binding_set, key, modifiers)
        self.anim_source_id = None
        self.animating_chunks = []
        self.syncpoints = []
        self._show_line_numbers = None

        buf = MeldBuffer()
        buf.create_tag("inline")
        buf.create_tag("dimmed")
        self.set_buffer(buf)

        meldsettings.connect('changed', self.on_setting_changed)
Exemple #3
0
    def __init__(self, *args, **kwargs):
        super(MeldSourceView, self).__init__(*args, **kwargs)
        binding_set = Gtk.binding_set_find("GtkSourceView")
        for key, modifiers in self.replaced_entries:
            Gtk.binding_entry_remove(binding_set, key, modifiers)
        self.anim_source_id = None
        self.animating_chunks = []
        self.syncpoints = []
        self._show_line_numbers = None

        buf = MeldBuffer()
        buf.create_tag("inline")
        buf.create_tag("dimmed")
        self.set_buffer(buf)

        meldsettings.connect("changed", self.on_setting_changed)
        self.on_setting_changed(meldsettings, "font")
        self.on_setting_changed(meldsettings, "style-scheme")
Exemple #4
0
    def __init__(self, *args, **kwargs):
        super(MeldSourceView, self).__init__(*args, **kwargs)
        binding_set = Gtk.binding_set_find('GtkSourceView')
        for key, modifiers in self.replaced_entries:
            Gtk.binding_entry_remove(binding_set, key, modifiers)
        self.anim_source_id = None
        self.animating_chunks = []
        self.syncpoints = []
        self._show_line_numbers = None

        buf = MeldBuffer()
        inline_tag = GtkSource.Tag.new("inline")
        inline_tag.props.draw_spaces = True
        buf.get_tag_table().add(inline_tag)
        buf.create_tag("dimmed")
        self.set_buffer(buf)

        meldsettings.connect('changed', self.on_setting_changed)
Exemple #5
0
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.drag_dest_add_uri_targets()

        binding_set = Gtk.binding_set_find('GtkSourceView')
        for key, modifiers in self.replaced_entries:
            Gtk.binding_entry_remove(binding_set, key, modifiers)
        self.anim_source_id = None
        self.animating_chunks = []
        self.syncpoints = []
        self._show_line_numbers = None

        buf = MeldBuffer()
        inline_tag = GtkSource.Tag.new("inline")
        inline_tag.props.draw_spaces = True
        buf.get_tag_table().add(inline_tag)
        buf.create_tag("dimmed")
        self.set_buffer(buf)