summaryrefslogtreecommitdiff
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorrootavish <[email protected]>2014-08-03 12:23:21 +0530
committerrootavish <[email protected]>2014-08-03 12:23:21 +0530
commit5f3f572777cfcb64a92a4671fb2aff5faa5cefa4 (patch)
tree136c8252c959624b9495778582b8ab6547a43b39 /shell/ev-window.c
parent60b002aab6c2ee610377d46208ee16dda1e94fc3 (diff)
downloadatril-5f3f572777cfcb64a92a4671fb2aff5faa5cefa4.tar.bz2
atril-5f3f572777cfcb64a92a4671fb2aff5faa5cefa4.tar.xz
Table of contents(index) for epub
The documents can finally be read alongside a TOC, I tested it with a variety of documents before this commit, so I presume it should work with all. Also fixed the part where I had screwed up PDF annotations owing to a wrong call. In the next commit, fully functional searching would be up, using HTML parser of libxml in combination with webkit. Also some other minor changes.
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 937b40d3..43963fec 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -3668,7 +3668,7 @@ static void
ev_window_cmd_scroll_forward (GtkAction *action, EvWindow *window)
{
/*If the webview is occupying the window*/
- if ( window->priv->document->iswebdocument == FALSE ) return ;
+ if ( window->priv->document->iswebdocument == FALSE) return ;
ev_view_scroll (EV_VIEW (window->priv->view), GTK_SCROLL_PAGE_FORWARD, FALSE);
}
@@ -5880,7 +5880,11 @@ activate_link_cb (EvPageAction *page_action, EvLink *link, EvWindow *window)
static void
navigation_action_activate_link_cb (EvNavigationAction *action, EvLink *link, EvWindow *window)
{
- if (window->priv->document->iswebdocument == FALSE ) return;
+ if (window->priv->document->iswebdocument == TRUE ) {
+ ev_web_view_handle_link(EV_WEB_VIEW(window->priv->webview),link);
+ gtk_widget_grab_focus (window->priv->webview);
+ return;
+ }
ev_view_handle_link (EV_VIEW (window->priv->view), link);
gtk_widget_grab_focus (window->priv->view);
@@ -6334,7 +6338,7 @@ view_external_link_cb (EvView *view, EvLinkAction *action, EvWindow *window)
static void
ev_view_popup_cmd_open_link (GtkAction *action, EvWindow *window)
{
- if (window->priv->document->iswebdocument == FALSE ) return;
+ if (window->priv->document->iswebdocument == TRUE ) return;
ev_view_handle_link (EV_VIEW (window->priv->view), window->priv->link);
}
@@ -6359,7 +6363,7 @@ static void
ev_view_popup_cmd_copy_link_address (GtkAction *action, EvWindow *window)
{
EvLinkAction *ev_action;
- if (window->priv->document->iswebdocument == FALSE ) return;
+ if (window->priv->document->iswebdocument == TRUE ) return;
ev_action = ev_link_get_action (window->priv->link);
if (!ev_action)
return;
@@ -6534,7 +6538,7 @@ static void
ev_view_popup_cmd_annot_properties (GtkAction *action,
EvWindow *window)
{
- if (window->priv->document->iswebdocument == FALSE ) return;
+ if (window->priv->document->iswebdocument == TRUE ) return;
const gchar *author;
GdkColor color;
@@ -6922,7 +6926,7 @@ method_call_cb (GDBusConnection *connection,
gpointer user_data)
{
EvWindow *window = EV_WINDOW (user_data);
- if (window->priv->document->iswebdocument == FALSE ) return;
+ if (window->priv->document->iswebdocument == TRUE ) return;
if (g_strcmp0 (method_name, "SyncView") != 0)
return;