summaryrefslogtreecommitdiff
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-09 12:26:05 +0100
committerinfirit <[email protected]>2014-12-09 23:02:27 +0100
commitb7918f40bd6a2c6b63bca6d4e095194160c08a5b (patch)
treed30c2fe3821913489fc8e95ba19719a6dd6f53c3 /shell/ev-window.c
parentdb7225b9a188e2df6d7e0729897ca8952a8b9fb3 (diff)
downloadatril-b7918f40bd6a2c6b63bca6d4e095194160c08a5b.tar.bz2
atril-b7918f40bd6a2c6b63bca6d4e095194160c08a5b.tar.xz
[shell] Add timestamp parameter to SyncView.
SyncView is called after user interaction, so it needs timestamp parameter to avoid stealing focus. Taken from evince commit: a2b36d8928c30f93f74869b294e72d2484422646 From: José Aliste <[email protected]>
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index f4600d92..3e8e096a 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -7055,10 +7055,11 @@ method_call_cb (GDBusConnection *connection,
if (window->priv->document && ev_document_has_synctex (window->priv->document)) {
EvSourceLink link;
+ guint32 timestamp;
- g_variant_get (parameters, "(&s(ii))", &link.filename, &link.line, &link.col);
+ g_variant_get (parameters, "(&s(ii)u)", &link.filename, &link.line, &link.col, &timestamp);
ev_view_highlight_forward_search (EV_VIEW (window->priv->view), &link);
- gtk_window_present (GTK_WINDOW (window));
+ gtk_window_present_with_time (GTK_WINDOW (window), timestamp);
}
g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
@@ -7070,6 +7071,7 @@ static const char introspection_xml[] =
"<method name='SyncView'>"
"<arg type='s' name='source_file' direction='in'/>"
"<arg type='(ii)' name='source_point' direction='in'/>"
+ "<arg type='u' name='timestamp' direction='in'/>"
"</method>"
"<signal name='SyncSource'>"
"<arg type='s' name='source_file' direction='out'/>"