]> www.fi.muni.cz Git - evince.git/commitdiff
Use document info from page cache instead of document itself. fix for crash
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Tue, 7 Jun 2005 21:46:46 +0000 (21:46 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Tue, 7 Jun 2005 21:46:46 +0000 (21:46 +0000)
306545

ChangeLog
shell/ev-properties.c
shell/ev-properties.h
shell/ev-window.c

index b2cc9a7d61492807a30467d237c247ea658b2d67..43d7261d2b703d9cd2a230e6e9de0341ab99046e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,19 @@
+2005-06-08  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * shell/ev-properties.c: (ev_properties_new):
+       * shell/ev-properties.h:
+       * shell/ev-window.c: (ev_window_cmd_file_properties):
+       
+       Get document info from page cache instead of document itself.
+       This should fix crash related to race conditions described in
+       bug 306545.
+
 2005-06-07  Marco Pesenti Gritti <mpg@redhat.com>
 
        * ps/ps-document.c: (ps_document_init),
        (send_ps), (get_page_box), (output), (catchPipe), (input),
        (stop_interpreter), (file_length), (file_readable),
-       (check_filecompressed), (ps_document_enable_interpreter),
+       (check_filecompressedb), (ps_document_enable_interpreter),
        (document_load), (ps_async_renderer_render_pixbuf):
        * ps/ps-document.h:
 
index 9e0af6608473d04d1b87eab980f75e7fccec94cc..e2dba3d1cd09cff180198f36a55aabe56d7b61c1 100644 (file)
@@ -120,7 +120,7 @@ setup_fonts_view (GladeXML *xml, GtkTreeModel *fonts)
 }
 
 GtkDialog *
-ev_properties_new (EvDocumentInfo *info, GtkTreeModel *fonts)
+ev_properties_new (const EvDocumentInfo *info, GtkTreeModel *fonts)
 {
        GladeXML *xml;
        GtkWidget *dialog;
index 03cd4e3287e25caeca0f8c6b55a8881aae45cb9a..99c6fcb9dafeb76d141bbb29eded0e06faa1e3c4 100644 (file)
@@ -28,7 +28,7 @@
 
 G_BEGIN_DECLS
 
-GtkDialog *ev_properties_new (EvDocumentInfo   *info,
+GtkDialog *ev_properties_new (const EvDocumentInfo   *info,
                              GtkTreeModel     *fonts);
 
 G_END_DECLS
index c7f0fadc46b7dcc1b586723aa071242456710fcc..7bdeacd28db1ff5eeb3f04a363725efc78b32f76 100644 (file)
@@ -1189,7 +1189,7 @@ static void
 ev_window_cmd_file_properties (GtkAction *action, EvWindow *ev_window)
 {
        EvDocument *document = ev_window->priv->document;
-       EvDocumentInfo *info;
+       const EvDocumentInfo *info;
        GtkDialog *dialog;
        GtkTreeModel *fonts;
 
@@ -1199,12 +1199,11 @@ ev_window_cmd_file_properties (GtkAction *action, EvWindow *ev_window)
                fonts = NULL;
        }
 
-       info = ev_document_get_info (document);
+       info = ev_page_cache_get_info (ev_window->priv->page_cache);
        dialog = ev_properties_new (info, fonts);
        gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (ev_window));
        gtk_dialog_run (dialog);
        gtk_widget_destroy (GTK_WIDGET (dialog));
-       ev_document_info_free (info);
 }
                                        
 static void