diff options
author | rootavish <[email protected]> | 2014-08-10 01:05:45 +0530 |
---|---|---|
committer | rootavish <[email protected]> | 2014-08-10 01:05:45 +0530 |
commit | 1548bcb4629a6a41641a0188003215b3098aa5fc (patch) | |
tree | 368ef186c9aa1a60eeeba84fabcaceb6d30bd30f /shell | |
parent | 3a013d3b19c5a81372560e735cf6f9f5c3ebdd37 (diff) | |
download | atril-1548bcb4629a6a41641a0188003215b3098aa5fc.tar.bz2 atril-1548bcb4629a6a41641a0188003215b3098aa5fc.tar.xz |
Page Label handling, other fixes
Added the function to handle links from the toolbar, also added functions to disconnect all ev-view handlers once it has been replaced by ev-web-view, and vice-versa(to drop all handler associated to ev-web-view).
Also the unref call to job_thumb was causing thumbnail jobs to crash with GTK2, so had to revert that, now we're back to the document folder not getting deleted from disk.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-window.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index bb870976..fda6f68b 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1502,7 +1502,7 @@ ev_window_set_document (EvWindow *ev_window, EvDocument *document) /*We have encountered a web document, replace the atril view with a web view, if the web view is not already loaded.*/ gtk_container_remove (GTK_CONTAINER(ev_window->priv->scrolled_window), ev_window->priv->view); - + ev_view_disconnect_handlers(EV_VIEW(ev_window->priv->view)); g_object_unref(ev_window->priv->view); ev_window->priv->view = NULL; gtk_container_add (GTK_CONTAINER (ev_window->priv->scrolled_window), @@ -1511,6 +1511,7 @@ ev_window_set_document (EvWindow *ev_window, EvDocument *document) } else { /*Since the document is not a webdocument might as well get rid of the webview now*/ + ev_web_view_disconnect_handlers(EV_WEB_VIEW(ev_window->priv->webview)); g_object_ref_sink(ev_window->priv->webview); g_object_unref(ev_window->priv->webview); } @@ -5887,8 +5888,14 @@ sidebar_links_link_activated_cb (EvSidebarLinks *sidebar_links, EvLink *link, Ev static void activate_link_cb (EvPageAction *page_action, EvLink *link, EvWindow *window) { - ev_view_handle_link (EV_VIEW (window->priv->view), link); - gtk_widget_grab_focus (window->priv->view); + if (window->priv->view) { + ev_view_handle_link (EV_VIEW (window->priv->view), link); + gtk_widget_grab_focus (window->priv->view); + } + else { + ev_web_view_handle_link (EV_WEB_VIEW (window->priv->webview), link); + gtk_widget_grab_focus (window->priv->webview); + } } static void |