[gnome-code-assistance] [backends/pycommon] Expose org.gnome.CodeAssist.v1.Document when introspecting
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-code-assistance] [backends/pycommon] Expose org.gnome.CodeAssist.v1.Document when introspecting
- Date: Thu, 14 Nov 2013 13:51:14 +0000 (UTC)
commit 9ad92fcf0579d1d13cca5602b5b94889fa9ed0ae
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Thu Nov 14 14:50:10 2013 +0100
[backends/pycommon] Expose org.gnome.CodeAssist.v1.Document when introspecting
.../gnome/codeassistance/transport_dbus.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/backends/pycommon/gnome/codeassistance/transport_dbus.py
b/backends/pycommon/gnome/codeassistance/transport_dbus.py
index 2781912..a2dca4b 100644
--- a/backends/pycommon/gnome/codeassistance/transport_dbus.py
+++ b/backends/pycommon/gnome/codeassistance/transport_dbus.py
@@ -40,6 +40,18 @@ class Document(dbus.service.Object):
self.data_path = ''
self.cursor = types.SourceLocation()
+ def Introspect(self, object_path, connection):
+ ret = super(Document, self).Introspect(object_path, connection)
+
+ # This is so nasty, I don't have words for it. I'm sincerely sorry!
+ # If the Document interface gets any methods, please remove this
+ # atrocity!!
+ if not 'org.gnome.CodeAssist.v1.Document' in ret:
+ find = "<interface name=\"org.gnome.CodeAssist.v1.Diagnostics\">"
+ ret = ret.replace(find, "<interface name=\"org.gnome.CodeAssist.v1.Document\"/>\n " + find)
+
+ return ret
+
class Diagnostics(dbus.service.Object):
"""Diagnostics interface.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]