]> www.fi.muni.cz Git - evince.git/commitdiff
PDFDoc constructor assumes ownership of the string passed in.
authorOwen Taylor <otaylor@redhat.com>
Wed, 22 Dec 2004 03:23:47 +0000 (03:23 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 22 Dec 2004 03:23:47 +0000 (03:23 +0000)
Tue Dec 21 22:17:04 2004  Owen Taylor  <otaylor@redhat.com>

        * pdf/xpdf/pdf-document.cc (pdf_document_load): PDFDoc
        constructor assumes ownership of the string passed in.

        * shell/ev-window.c (ev_window_open): Destroy the error
        dialog once we've displayed it.

ChangeLog
pdf/xpdf/pdf-document.cc
shell/ev-window.c

index 48320e8ac85e7f417155c18c1110fa6f4cfb26cd..11c2b4592b55c4bb0ac827170c9f711c510c5254 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Dec 21 22:17:04 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * pdf/xpdf/pdf-document.cc (pdf_document_load): PDFDoc
+       constructor assumes ownership of the string passed in.
+       
+       * shell/ev-window.c (ev_window_open): Destroy the error
+       dialog once we've displayed it.
+
 Tue Dec 21 21:58:56 2004  Owen Taylor  <otaylor@redhat.com>
 
        * pdf/xpdf/pdf-document.cc shell/ev-view.c: Hook things up 
index 6078f96297ebb81a9cd4ac6585d0a45b5b02d0e1..8558c822f1faa6a9dee786c955cf746bd8876f7f 100644 (file)
@@ -78,11 +78,9 @@ pdf_document_load (EvDocument  *document,
        filename_g = new GString (filename);
        g_free (filename);
 
-       // open the PDF file
+       // open the PDF file, assumes ownership of filename_g
        newDoc = new PDFDoc(filename_g, 0, 0);
 
-       delete filename_g;
-  
        if (!newDoc->isOk()) {
                err = newDoc->getErrorCode();
                delete newDoc;
index d04dd9102ac20b5aeec315919b2f009683a4353c..72fc62721f7972d66e49b8ddc2562195a507a0f9 100644 (file)
@@ -177,6 +177,7 @@ ev_window_open (EvWindow *ev_window, const char *uri)
                gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
                                                          "%s", error->message);
                gtk_dialog_run (GTK_DIALOG (dialog));
+               gtk_widget_destroy (dialog);
 
                g_error_free (error);
        }