Commit 89302af2 authored by Kai Willadsen's avatar Kai Willadsen

Add Save All action for file comparisons (bgo#699068)

This is just a convenience action to save all curently modified files
open in the current comparison.
parent 7bc109bb
......@@ -10,6 +10,7 @@
<menubar name="Menubar">
<menu action="FileMenu">
<placeholder name="RevertPlaceholder">
<menuitem action="SaveAll"/>
<menuitem action="Revert"/>
<placeholder name="FileActionsPlaceholder">
......@@ -221,6 +221,9 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
("MakePatch", None, _("Format as Patch..."), None,
_("Create a patch using differences between files"),
("SaveAll", None, _("Save A_ll"), "<Ctrl><Shift>L",
_("Save all files in the current comparison"),
("Revert", gtk.STOCK_REVERT_TO_SAVED, None, None,
_("Revert files to their saved versions"),
......@@ -1001,6 +1004,8 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
modified = False if pane == -1 else self.textbuffer[pane].data.modified
if self.main_actiongroup:
any_modified = any( for b in self.textbuffer)
def recompute_label(self):
......@@ -1608,7 +1613,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
if pane >= 0:
self.save_file(pane, True)
def save_all(self):
def on_save_all_activate(self, action):
for i in range(self.num_panes):
if self.textbuffer[i].data.modified:
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