From e364267010db1242757f67ad9c7aef5abc2c3103 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Sat, 11 Dec 2010 15:00:48 +0100
Subject: Add a "modified" property to LdDocument.
The property is set to TRUE whenever the document changes.
The user may set it back to FALSE with ld_document_set_modified().
Also don't emit the "changed" signal when nothing has happened.
---
src/ld-document.h | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'src/ld-document.h')
diff --git a/src/ld-document.h b/src/ld-document.h
index 12d59cb..a27fe23 100644
--- a/src/ld-document.h
+++ b/src/ld-document.h
@@ -48,7 +48,10 @@ struct _LdDocumentClass
/*< private >*/
GObjectClass parent_class;
+ /* FIXME: Add a selection_changed signal? */
guint changed_signal;
+
+ void (*changed) (LdDocument *self);
};
@@ -61,6 +64,9 @@ gboolean ld_document_load_from_file (LdDocument *self,
gboolean ld_document_save_to_file (LdDocument *self,
const gchar *filename, GError *error);
+gboolean ld_document_get_modified (LdDocument *self);
+void ld_document_set_modified (LdDocument *self, gboolean value);
+
GSList *ld_document_get_objects (LdDocument *self);
void ld_document_insert_object (LdDocument *self,
LdDocumentObject *object, gint pos);
--
cgit v1.2.3