[meld] vcview: Add hack for checking inter-tab command support (bgo#745781)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] vcview: Add hack for checking inter-tab command support (bgo#745781)
- Date: Fri, 10 Apr 2015 21:29:20 +0000 (UTC)
commit 18420c858d25842686795aea966af56414b473b8
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Mar 21 12:38:26 2015 +1000
vcview: Add hack for checking inter-tab command support (bgo#745781)
meld/vcview.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/meld/vcview.py b/meld/vcview.py
index 609665f..c699b6a 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -689,7 +689,13 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
yield workdir, r
def has_command(self, command):
- return command in self.command_map
+ # Because of the way we've chosen to implement the newer command API,
+ # it's very very hard to determine whether a plugin implements a call
+ # at this point. We're using whether a plugin has been updated to the
+ # new API as a proxy for understanding these commands, since right now
+ # that happens to work... this is bad.
+ uses_new_api = hasattr(self.vc, 'update_actions_for_paths')
+ return uses_new_api and command in self.command_map
def command(self, command, files):
if not self.has_command(command):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]