]> www.fi.muni.cz Git - evince.git/commitdiff
Initialize correct parent class. Set GError on document load
authorMarco Pesenti Gritti <marco@gnome.org>
Mon, 21 Feb 2005 14:40:40 +0000 (14:40 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Mon, 21 Feb 2005 14:40:40 +0000 (14:40 +0000)
2005-02-21  Marco Pesenti Gritti  <marco@gnome.org>

        * ps/ps-document.c: (ps_document_class_init), (ps_document_load):

        Initialize correct parent class. Set GError on document load

ChangeLog
ps/ps-document.c

index 16c4e4960ce87f8142f309c7fb22921177e37740..1cfade30244c1e62c46ea7c6a262ab92173cbc34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-21  Marco Pesenti Gritti  <marco@gnome.org>
+
+       * 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  <marco@gnome.org>
 
        * pdf/xpdf/pdf-document.cc:
index 1f29c761fc4de926e0cb1e580ddd9ad848046323..fda942b25ed36d6b0c44168b56bd421ca20f95ba 100644 (file)
@@ -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);