From: Marco Pesenti Gritti Date: Mon, 21 Feb 2005 14:40:40 +0000 (+0000) Subject: Initialize correct parent class. Set GError on document load X-Git-Tag: EVINCE_0_1_5~33 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=317e9a2524e83504db0b328b0fba3a5edb2bb5c9;p=evince.git Initialize correct parent class. Set GError on document load 2005-02-21 Marco Pesenti Gritti * ps/ps-document.c: (ps_document_class_init), (ps_document_load): Initialize correct parent class. Set GError on document load --- diff --git a/ChangeLog b/ChangeLog index 16c4e496..1cfade30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-02-21 Marco Pesenti Gritti + + * ps/ps-document.c: (ps_document_class_init), (ps_document_load): + + Initialize correct parent class. Set GError on document load + 2005-02-21 Marco Pesenti Gritti * pdf/xpdf/pdf-document.cc: diff --git a/ps/ps-document.c b/ps/ps-document.c index 1f29c761..fda942b2 100644 --- a/ps/ps-document.c +++ b/ps/ps-document.c @@ -325,12 +325,12 @@ ps_document_get_property (GObject *object, } static void -ps_document_class_init(PSDocumentClass * klass) +ps_document_class_init(PSDocumentClass *klass) { GObjectClass *object_class; object_class = (GObjectClass *) klass; - parent_class = gtk_type_class(gtk_widget_get_type()); + parent_class = g_type_class_peek_parent (klass); gs_class = klass; object_class->finalize = ps_document_finalize; @@ -1695,6 +1695,12 @@ ps_document_load (EvDocument *document, return FALSE; result = document_load (PS_DOCUMENT (document), filename); + if (!result) { + g_set_error (error, G_FILE_ERROR, + G_FILE_ERROR_FAILED, + "Failed to load document '%s'\n", + uri); + } g_free (filename);