diff options
author | rootavish <[email protected]> | 2014-07-25 18:32:19 +0530 |
---|---|---|
committer | rootavish <[email protected]> | 2014-07-25 18:32:19 +0530 |
commit | d4ea4f2056a2863c7a37ad83e73bb63301de5022 (patch) | |
tree | 11932da4f199c7e49572a106f25a1aa892806d95 /shell/ev-window.c | |
parent | df1fce63dca7bd7ac85c720a357adba0f1b7108a (diff) | |
download | atril-d4ea4f2056a2863c7a37ad83e73bb63301de5022.tar.bz2 atril-d4ea4f2056a2863c7a37ad83e73bb63301de5022.tar.xz |
Fixing dispose functions, display in webview
Fixed the backend epub_document_finalize function which was caused caja to crash when you opened the document properties dialog.
Fixed the ev_window_dispose and the webview's dispose and finalise functions, now the window closes without any glib-critical errors.
Also now it is possible to read epub documents, once you have changed pages at least once, I still have to figure out where I call load_uri at document load.
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r-- | shell/ev-window.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index 9b9a417d..89b64307 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1487,6 +1487,7 @@ ev_window_set_document (EvWindow *ev_window, EvDocument *document) gtk_container_remove (GTK_CONTAINER(ev_window->priv->scrolled_window), 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), ev_window->priv->webview); gtk_widget_show(ev_window->priv->webview); @@ -5422,12 +5423,12 @@ ev_window_dispose (GObject *object) priv->view = NULL; } -#ifdef ENABLE_EPUB +/*#ifdef ENABLE_EPUB if ( priv->webview ) { - g_object_unref (priv->webview); + g_object_unref (EV_WEB_VIEW(priv->webview)); priv->webview = NULL ; } -#endif +#endif*/ if (priv->password_view) { g_object_unref (priv->password_view); priv->password_view = NULL; @@ -7181,6 +7182,7 @@ ev_window_init (EvWindow *ev_window) #ifdef ENABLE_EPUB ev_window->priv->webview = ev_web_view_new(); + ev_web_view_set_model(EV_WEB_VIEW(ev_window->priv->webview),ev_window->priv->model); #endif ev_view_set_page_cache_size (EV_VIEW (ev_window->priv->view), PAGE_CACHE_SIZE); ev_view_set_model (EV_VIEW (ev_window->priv->view), ev_window->priv->model); |