summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-08 22:33:58 +0100
committerinfirit <[email protected]>2014-12-08 22:33:58 +0100
commit730924bea728462bc7e3abbe988b4823451c9358 (patch)
tree8bf553b3f9e41b05795868d94f11247f04b3cb16 /shell
parentee69f4fc0c077a676c1f975d67615887996981d5 (diff)
downloadatril-730924bea728462bc7e3abbe988b4823451c9358.tar.bz2
atril-730924bea728462bc7e3abbe988b4823451c9358.tar.xz
Add support for external links to EvViewPresentation, close #111
Taken from evince commit: 4f8bc8db98020835d2c4d39c902a296b784cf030 From: Carlos Garcia Campos <[email protected]> Gnome bug: http://bugzilla.gnome.org/show_bug.cgi?id=628711
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 58985c03..111cf5a9 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -343,6 +343,9 @@ static void ev_window_cmd_edit_find (GtkAction *actio
static void find_bar_search_changed_cb (EggFindBar *find_bar,
GParamSpec *param,
EvWindow *ev_window);
+static void view_external_link_cb (EvWindow *window,
+ EvLinkAction *action);
+
static void ev_window_load_file_remote (EvWindow *ev_window,
GFile *source_file);
static void ev_window_media_player_key_pressed (EvWindow *window,
@@ -4059,6 +4062,10 @@ ev_window_run_presentation (EvWindow *window)
G_CALLBACK (ev_window_view_presentation_finished),
window);
+ g_signal_connect_swapped (window->priv->presentation_view, "external-link",
+ G_CALLBACK (view_external_link_cb),
+ window);
+
gtk_box_pack_start (GTK_BOX (window->priv->main_box),
window->priv->presentation_view,
TRUE, TRUE, 0);
@@ -6394,7 +6401,7 @@ do_action_named (EvWindow *window, EvLinkAction *action)
}
static void
-view_external_link_cb (EvView *view, EvLinkAction *action, EvWindow *window)
+view_external_link_cb (EvWindow *window, EvLinkAction *action)
{
switch (ev_link_action_get_action_type (action)) {
case EV_LINK_ACTION_TYPE_GOTO_DEST: {
@@ -7334,9 +7341,9 @@ ev_window_init (EvWindow *ev_window)
g_signal_connect_object (ev_window->priv->view, "focus_out_event",
G_CALLBACK (view_actions_focus_out_cb),
ev_window, 0);
- g_signal_connect_object (ev_window->priv->view, "external-link",
- G_CALLBACK (view_external_link_cb),
- ev_window, 0);
+ g_signal_connect_swapped (ev_window->priv->view, "external-link",
+ G_CALLBACK (view_external_link_cb),
+ ev_window);
g_signal_connect_object (ev_window->priv->view, "handle-link",
G_CALLBACK (view_handle_link_cb),
ev_window, 0);