Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-07-12 17:08:10 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-07-12 17:12:02 (GMT)
commitd87812b63f78717e5b82c9a2170769a89b91eefd (patch)
treef7c113d8ea1a32d6411a6576506641cad06f6668 /shell/ev-window.c
parent726e082719d0148eae6744b962ee1fc05b5af5a4 (diff)
[shell] Focus the selected annotation in the sidebar
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 9228f4a..168ed67 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -5376,6 +5376,14 @@ sidebar_layers_visibility_changed (EvSidebarLayers *layers,
}
static void
+sidebar_annots_annot_activated_cb (EvSidebarAnnotations *sidebar_annots,
+ EvMapping *annot_mapping,
+ EvWindow *window)
+{
+ ev_view_focus_annotation (EV_VIEW (window->priv->view), annot_mapping);
+}
+
+static void
register_custom_actions (EvWindow *window, GtkActionGroup *group)
{
GtkAction *action;
@@ -6537,6 +6545,10 @@ ev_window_init (EvWindow *ev_window)
sidebar_widget = ev_sidebar_annotations_new ();
ev_window->priv->sidebar_annots = sidebar_widget;
+ g_signal_connect (sidebar_widget,
+ "annot_activated",
+ G_CALLBACK (sidebar_annots_annot_activated_cb),
+ ev_window);
gtk_widget_show (sidebar_widget);
ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar),
sidebar_widget);