[meld] Remove Reload, replacing with Revert for file comparisons (bgo#699048)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Remove Reload, replacing with Revert for file comparisons (bgo#699048)
- Date: Sun, 28 Apr 2013 02:49:23 +0000 (UTC)
commit 416167db85b7b229bec90d26fdd821244636914a
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Apr 28 08:48:59 2013 +1000
Remove Reload, replacing with Revert for file comparisons (bgo#699048)
For version control and folder comparisons, Reload and Refresh already
did exactly the same thing. For file comparisons, Reload actually
re-reads files off disk, discarding changes if there were any. Since
this behaviour is closer to that of gedit's Revert, this commit
removes the Reload action for all views, and adds a Revert command to
the File menu for file comparisons.
data/ui/filediff-ui.xml | 3 +++
data/ui/meldapp-ui.xml | 2 +-
help/C/keyboard-shortcuts.page | 4 ----
meld/dirdiff.py | 2 +-
meld/filediff.py | 3 +++
meld/melddoc.py | 3 ---
meld/meldwindow.py | 7 -------
meld/vcview.py | 2 +-
8 files changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/data/ui/filediff-ui.xml b/data/ui/filediff-ui.xml
index 7bd4142..4b91298 100644
--- a/data/ui/filediff-ui.xml
+++ b/data/ui/filediff-ui.xml
@@ -9,6 +9,9 @@
<menubar name="Menubar">
<menu action="FileMenu">
+ <placeholder name="RevertPlaceholder">
+ <menuitem action="Revert"/>
+ </placeholder>
<placeholder name="FileActionsPlaceholder">
<menuitem action="MakePatch"/>
</placeholder>
diff --git a/data/ui/meldapp-ui.xml b/data/ui/meldapp-ui.xml
index cc2f2c2..b013265 100644
--- a/data/ui/meldapp-ui.xml
+++ b/data/ui/meldapp-ui.xml
@@ -4,6 +4,7 @@
<menuitem action="New" />
<menuitem action="Save" />
<menuitem action="SaveAs" />
+ <placeholder name="RevertPlaceholder" />
<separator/>
<placeholder name="FileActionsPlaceholder" />
<separator/>
@@ -51,7 +52,6 @@
<separator/>
<menuitem action="Stop" />
<menuitem action="Refresh" />
- <menuitem action="Reload" />
</menu>
<menu action="TabMenu">
<menuitem action="PrevTab" />
diff --git a/help/C/keyboard-shortcuts.page b/help/C/keyboard-shortcuts.page
index 99c6825..81209c3 100644
--- a/help/C/keyboard-shortcuts.page
+++ b/help/C/keyboard-shortcuts.page
@@ -119,10 +119,6 @@
<td><p><keyseq><key>Ctrl</key><key>R</key></keyseq></p></td>
<td><p>Refresh the current comparison.</p></td>
</tr>
- <tr>
- <td><p><keyseq><key>Ctrl</key><key>Shift</key><key>R</key></keyseq></p></td>
- <td><p>Reload the current comparison.</p></td>
- </tr>
</tbody>
</table>
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 6e30b15..8009399 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -1449,7 +1449,7 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
self.treeview[pane].expand_to_path(path)
self.treeview[pane].set_cursor(path)
- def on_reload_activate(self, *extra):
+ def on_refresh_activate(self, *extra):
self.on_fileentry_activate(None)
def on_delete_event(self, appquit=0):
diff --git a/meld/filediff.py b/meld/filediff.py
index de3697e..f7c786a 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -221,6 +221,9 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
("MakePatch", None, _("Format as Patch..."), None,
_("Create a patch using differences between files"),
self.make_patch),
+ ("Revert", gtk.STOCK_REVERT_TO_SAVED, None, None,
+ _("Revert files to their saved versions"),
+ self.on_reload_activate),
("SplitAdd", None, _("Add Synchronization Point"), None,
_("Add a manual point for synchronization of changes between "
"files"),
diff --git a/meld/melddoc.py b/meld/melddoc.py
index bd25a1c..aa74a44 100644
--- a/meld/melddoc.py
+++ b/meld/melddoc.py
@@ -119,9 +119,6 @@ class MeldDoc(gobject.GObject):
pass
def on_refresh_activate(self, *extra):
- self.on_reload_activate(self, *extra)
-
- def on_reload_activate(self, *extra):
pass
def on_find_activate(self, *extra):
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index bfe8153..cf20c63 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -126,9 +126,6 @@ class MeldWindow(gnomeglade.Component):
("Refresh", gtk.STOCK_REFRESH, None, "<control>R",
_("Refresh the view"),
self.on_menu_refresh_activate),
- ("Reload", gtk.STOCK_REFRESH, _("Reload"), "<control><shift>R",
- _("Reload the comparison"),
- self.on_menu_reload_activate),
("TabMenu", None, _("_Tabs")),
("PrevTab", None, _("_Previous Tab"), "<Ctrl><Alt>Page_Up",
@@ -322,7 +319,6 @@ class MeldWindow(gnomeglade.Component):
have_focus = current_page != -1
self.actiongroup.get_action("Close").set_sensitive(have_focus)
self.actiongroup.get_action("Refresh").set_sensitive(have_focus)
- self.actiongroup.get_action("Reload").set_sensitive(have_focus)
if not have_focus:
self.actiongroup.get_action("PrevChange").set_sensitive(False)
self.actiongroup.get_action("NextChange").set_sensitive(False)
@@ -468,9 +464,6 @@ class MeldWindow(gnomeglade.Component):
def on_menu_refresh_activate(self, *extra):
self.current_doc().on_refresh_activate()
- def on_menu_reload_activate(self, *extra):
- self.current_doc().on_reload_activate()
-
def on_menu_find_activate(self, *extra):
self.current_doc().on_find_activate()
diff --git a/meld/vcview.py b/meld/vcview.py
index d054a80..38d1e1f 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -938,7 +938,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
self.treeview.expand_to_path(path)
self.treeview.set_cursor(path)
- def on_reload_activate(self, *extra):
+ def on_refresh_activate(self, *extra):
self.on_fileentry_activate(self.fileentry)
def on_find_activate(self, *extra):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]