Commit 1982574b authored by Kai Willadsen's avatar Kai Willadsen

filediff, ui.statubar: Remove overwrite mode indicator

Text editors seem split on whether to show one of these. Some (gedit,
LibreOffice Writer) do, others (Builder, Sublime Text) just rely on the
insert cursor changing to a block.

Given that I see overwrite mode as basically a giant historical
misfeature, and also that I don't really want to move the display code
over to the new status bar... I'm going to remove the display of it.
parent 69a8d38f
......@@ -214,14 +214,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
for diffmap in self.diffmap:
self.linediffer.connect('diffs-changed', diffmap.on_diffs_changed)
self.status_info_labels = []
for statusbar, buf in zip(self.statusbar, self.textbuffer):
overwrite_label = Gtk.Label()
pane_labels = [overwrite_label]
'language', statusbar, 'source-language',
......@@ -353,9 +346,6 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
"notify::cursor-position", self.on_cursor_position_changed)
buf.handlers = id0, id1, id2, id3, id4
# Abbreviations for insert and overwrite that fit in the status bar
_insert_overwrite_text = (_("INS"), _("OVR"))
def on_cursor_position_changed(self, buf, pspec, force=False):
pane = self.textbuffer.index(buf)
pos = buf.props.cursor_position
......@@ -367,10 +357,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
offset = self.textview[pane].get_visual_column(cursor_it)
line = cursor_it.get_line()
insert_overwrite = self._insert_overwrite_text[self.textview_overwrite]
self.statusbar[pane].props.cursor_position = (line, offset)
overwrite_label = self.status_info_labels[pane][0]
if line != self.cursor.line or force:
chunk, prev, next_ = self.linediffer.locate_chunk(pane, line)
......@@ -144,14 +144,6 @@ class MeldStatusBar(Gtk.Statusbar):
hbox.pack_end(label, False, True, 0)
alignment =
xalign=1.0, yalign=0.5, xscale=1.0, yscale=1.0)
self.info_box = Gtk.HBox(homogeneous=False, spacing=12)
self.pack_end(alignment, False, True, 0)
self.box_box = Gtk.HBox(homogeneous=False, spacing=6)
self.pack_end(self.box_box, False, True, 0)
self.box_box.pack_end(self.construct_line_display(), False, True, 0)
......@@ -263,9 +255,3 @@ class MeldStatusBar(Gtk.Statusbar):
return button
def set_info_box(self, widgets):
for child in self.info_box.get_children():
for widget in widgets:
self.info_box.pack_end(widget, False, True, 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment