diff options
author | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2005-06-07 21:46:46 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2005-06-07 21:46:46 (GMT) |
commit | 11bd1d65957b444c7491e4fb252f3f50ce8ad3d2 (patch) | |
tree | 1c2373245b45247b94695e38ef9c59d3dd300bdf | |
parent | c6450a96c9e000535a222689a55bd20e3ee62206 (diff) |
Use document info from page cache instead of document itself. fix for crash
306545
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | shell/ev-properties.c | 2 | ||||
-rw-r--r-- | shell/ev-properties.h | 2 | ||||
-rw-r--r-- | shell/ev-window.c | 5 |
4 files changed, 15 insertions, 6 deletions
@@ -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: diff --git a/shell/ev-properties.c b/shell/ev-properties.c index 9e0af66..e2dba3d 100644 --- a/shell/ev-properties.c +++ b/shell/ev-properties.c @@ -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; diff --git a/shell/ev-properties.h b/shell/ev-properties.h index 03cd4e3..99c6fcb 100644 --- a/shell/ev-properties.h +++ b/shell/ev-properties.h @@ -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 diff --git a/shell/ev-window.c b/shell/ev-window.c index c7f0fad..7bdeacd 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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 |