Commit 7e1b0754 authored by Kai Willadsen's avatar Kai Willadsen

filediff: Use sensitivity rather than editability while loading files

This will make it easier to use editability for really indicating
whether an underlying buffer should be editable, rather than whether
it's been temporarily disabled for a load/save operation.
parent 6f79973b
......@@ -337,15 +337,15 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
def _disconnect_buffer_handlers(self):
for textview in self.textview:
textview.set_editable(0)
textview.set_sensitive(False)
for buf in self.textbuffer:
assert hasattr(buf,"handlers")
for h in buf.handlers:
buf.disconnect(h)
def _connect_buffer_handlers(self):
for textview, buf in zip(self.textview, self.textbuffer):
textview.set_editable(buf.data.editable)
for textview in self.textview:
textview.set_sensitive(True)
for buf in self.textbuffer:
id0 = buf.connect("insert-text", self.on_text_insert_text)
id1 = buf.connect("delete-range", self.on_text_delete_range)
......
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