Commit 0e1dfc0a authored by Kai Willadsen's avatar Kai Willadsen

Booleanise access to BufferData.modified

parent a06f06a2
......@@ -797,7 +797,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
def on_delete_event(self, appquit=0):
response = gtk.RESPONSE_OK
modified = [b.data.modified for b in self.textbuffer]
if 1 in modified:
if True in modified:
dialog = gnomeglade.Component(paths.ui_dir("filediff.ui"), "closedialog")
dialog.widget.set_transient_for(self.widget.get_toplevel())
buttons = []
......@@ -940,7 +940,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
shortnames = misc.shorten_names(*filenames)
for i in range(self.num_panes):
stock = None
if self.textbuffer[i].data.modified == 1:
if self.textbuffer[i].data.modified:
shortnames[i] += "*"
if self.textbuffer[i].data.writable == 1:
stock = gtk.STOCK_SAVE
......
......@@ -84,6 +84,6 @@ class FileMerge(filediff.FileDiff):
yield 1
self.linediffer.unresolved = merger.unresolved
self.textbuffer[1].insert(self.textbuffer[1].get_end_iter(), panetext[1])
self.textbuffer[1].data.modified = 1
self.textbuffer[1].data.modified = True
self.recompute_label()
yield 1
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