[latexila/wip/use-tepl-tab] DocumentTab: make the document property read-only
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila/wip/use-tepl-tab] DocumentTab: make the document property read-only
- Date: Fri, 23 Jun 2017 16:03:04 +0000 (UTC)
commit 7dd3a14bce004f5526831de85515b912970db398
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Jun 23 18:01:35 2017 +0200
DocumentTab: make the document property read-only
src/document_tab.vala | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/document_tab.vala b/src/document_tab.vala
index 1bb30d0..4f4b7d0 100644
--- a/src/document_tab.vala
+++ b/src/document_tab.vala
@@ -22,7 +22,11 @@ using Gtk;
public class DocumentTab : Grid
{
public DocumentView document_view { get; private set; }
- public Document document { get; private set; }
+
+ public Document document
+ {
+ get { return document_view.buffer as Document; }
+ }
private bool ask_if_externally_modified = false;
@@ -110,8 +114,7 @@ public class DocumentTab : Grid
public DocumentTab ()
{
- document = new Document ();
- document_view = new DocumentView (document);
+ document_view = new DocumentView (new Document ());
initialize ();
}
@@ -124,7 +127,6 @@ public class DocumentTab : Grid
public DocumentTab.with_view (DocumentView view)
{
document_view = view;
- document = (Document) view.buffer;
initialize ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]