[gedit-plugins/gnome-2-32] synctex: Listen to DocLoaded signal of Evince.
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins/gnome-2-32] synctex: Listen to DocLoaded signal of Evince.
- Date: Tue, 9 Nov 2010 14:03:57 +0000 (UTC)
commit cb995e2f37508a5d4d90cd301e09a3fbd275b713
Author: José Aliste <jaliste src gnome org>
Date: Mon Nov 8 21:21:09 2010 -0300
synctex: Listen to DocLoaded signal of Evince.
This fixes bug #634343.
plugins/synctex/synctex/evince_dbus.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plugins/synctex/synctex/evince_dbus.py b/plugins/synctex/synctex/evince_dbus.py
index dd23928..63aa0b3 100755
--- a/plugins/synctex/synctex/evince_dbus.py
+++ b/plugins/synctex/synctex/evince_dbus.py
@@ -55,12 +55,19 @@ class EvinceWindowProxy:
EvinceWindowProxy.daemon = EvinceWindowProxy.bus.get_object(EV_DAEMON_NAME,
EV_DAEMON_PATH,
follow_name_owner_changes=True)
+ EvinceWindowProxy.bus.add_signal_receiver(self._on_doc_loaded, signal_name="DocumentLoaded",
+ dbus_interface = EV_WINDOW_IFACE,
+ sender_keyword='sender')
self._get_dbus_name(False)
except dbus.DBusException:
if self._log:
self._log.debug("Could not connect to the Evince Daemon")
+ def _on_doc_loaded(self, uri, **keyargs):
+ if uri == self.uri and self._handler is None:
+ self.handle_find_document_reply(keyargs['sender'])
+
def _get_dbus_name(self, spawn):
EvinceWindowProxy.daemon.FindDocument(self.uri,spawn,
reply_handler=self.handle_find_document_reply,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]