summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorPranav Kant <pranavk@gnome.org>2015-06-18 21:52:22 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-22 12:33:24 +0200
commita2aaf911e2e7b63af920186acb2a5e03bc58bd54 (patch)
tree0701b92f9d1cb76e25f2afac348443615cdf217f /include/LibreOfficeKit
parent35fd66e8648c6d82396486a9469dcb061c832b91 (diff)
lokdocview: Use GInitable
The construction of LokDocView widget can fail because it involves initializing the lok context via lok_init. Having lok_init calls in constructed virtual method is a bad idea since it assumes that construction will never fail. So, implement GInitable for this class, and move the object initialization from constructed to initable. Change-Id: Idf18a054cf8ef2e946392458ec52cb0107bd7454
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitGtk.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index 7048dbefc0a1..3eaf28352a11 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -42,10 +42,12 @@ struct _LOKDocViewClass
GType lok_doc_view_get_type (void) G_GNUC_CONST;
-GtkWidget* lok_doc_view_new (const char* pPath);
+GtkWidget* lok_doc_view_new (const gchar* pPath,
+ GCancellable *cancellable,
+ GError **error);
gboolean lok_doc_view_open_document (LOKDocView* pDocView,
- char* pPath);
+ const gchar* pPath);
/// Gets the document the viewer displays.
LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView* pDocView);