Originally Posted by
jorges00
Was this solution tested on gnome-2.32 or in gnome-3. I've read
here that the dbus interface has changed in gnome-3, and I get some messages about function on_sync_source() taking exactly 3 arguments, but being given 4. Could this be the source of the error?
The solution in the link above works for me under gnome-3, but the one given here seems much cleaner, i.e. don't have to manually launch a process, etc.
Thanks in advance,
jorges
I found the answer myself: The solution posted above needs some changes in order to work with gnome-3, as it seems the dbus interface changed.
Below there's a diff of the required changes:
Code:
diff -urN evince_synctex/evince_backward_search evince_synctex.mod/evince_backward_search
--- evince_synctex/evince_backward_search 2011-04-26 03:20:28.000000000 -0300
+++ evince_synctex.mod/evince_backward_search 2011-05-05 00:57:11.848306440 -0300
@@ -104,14 +104,14 @@
if self._log:
self._log.debug("GetWindowList returned empty list")
- def on_sync_source(self, input_file, source_link):
+ def on_sync_source(self, input_file, source_link, time):
print input_file + ":" + str(source_link[0])
cmd = re.sub("%f",input_file,self.editor)
cmd = re.sub("%l",str(source_link[0]), cmd)
print cmd
subprocess.call(cmd, shell=True)
if self.source_handler is not None:
- self.source_handler(input_file, source_link)
+ self.source_handler(input_file, source_link, time)
## This file offers backward search in any editor.
diff -urN evince_synctex/evince_forward_search evince_synctex.mod/evince_forward_search
--- evince_synctex/evince_forward_search 2011-03-23 18:53:05.000000000 -0300
+++ evince_synctex.mod/evince_forward_search 2011-05-05 00:57:21.511639938 -0300
@@ -44,4 +44,4 @@
except dbus.DBusException:
print_exc()
-window.SyncView(tex_file, (line_number,1), dbus_interface="org.gnome.evince.Window")
+window.SyncView(tex_file, (line_number,1), 0, dbus_interface="org.gnome.evince.Window")
jorges
Bookmarks