Code

Moved EventLog from SPDocument to SPDesktop to prevent it from being
[inkscape.git] / src / document.cpp
index 04d3a147c3e711768c469eb9633210af8ead2efd..8731ee71c798919a1fe9be694837a17b18629d46 100644 (file)
@@ -107,9 +107,6 @@ SPDocument::SPDocument() {
     p->undo = NULL;
     p->redo = NULL;
 
-    p->undoStackObservers.add(p->event_log);
-    p->event_log.setDocument(this);
-
     priv = p;
 
     // XXX only for testing!
@@ -308,7 +305,7 @@ sp_document_create(Inkscape::XML::Document *rdoc,
         inkscape_ref();
     }
 
-    sp_document_set_undo_sensitive(document, TRUE);
+    sp_document_set_undo_sensitive(document, true);
 
     // reset undo key when selection changes, so that same-key actions on different objects are not coalesced
     if (!Inkscape::NSApplication::Application::getNewGui()) {
@@ -550,7 +547,7 @@ void sp_document_set_uri(SPDocument *document, gchar const *uri)
     Inkscape::XML::Node *repr = sp_document_repr_root(document);
     // changing uri in the document repr must not be not undoable
     bool saved = sp_document_get_undo_sensitive(document);
-    sp_document_set_undo_sensitive(document, FALSE);
+    sp_document_set_undo_sensitive(document, false);
     if (document->base)
         repr->setAttribute("sodipodi:docbase", document->base);
 
@@ -659,12 +656,6 @@ SPDocument::removeUndoObserver(Inkscape::UndoStackObserver& observer)
        this->priv->undoStackObservers.remove(observer);
 }
 
-Inkscape::EventLog&
-SPDocument::getEventLog() const
-{
-  return priv->event_log;
-}
-
 SPObject *SPDocument::getObjectById(gchar const *id) {
     g_return_val_if_fail(id != NULL, NULL);
 
@@ -767,7 +758,7 @@ SPDocument::_updateDocument()
             sp_document_setup_viewport (this, &ctx);
 
             bool saved = sp_document_get_undo_sensitive(this);
-            sp_document_set_undo_sensitive(this, FALSE);
+            sp_document_set_undo_sensitive(this, false);
 
             this->root->updateDisplay((SPCtx *)&ctx, 0);
 
@@ -914,7 +905,7 @@ upwards in z-order and returns what it has found so far (i.e. the found item is
 guaranteed to be lower than upto).
  */
 SPItem*
-find_item_at_point(unsigned int dkey, SPGroup *group, NR::Point const p, bool into_groups, bool take_insensitive = false, SPItem *upto = NULL)
+find_item_at_point(unsigned int dkey, SPGroup *group, NR::Point const p, gboolean into_groups, bool take_insensitive = false, SPItem *upto = NULL)
 {
     SPItem *seen = NULL, *newseen = NULL;
 
@@ -1015,7 +1006,7 @@ GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey
 
 SPItem *
 sp_document_item_at_point(SPDocument *document, unsigned const key, NR::Point const p,
-                          bool const into_groups, SPItem *upto)
+                          gboolean const into_groups, SPItem *upto)
 {
     g_return_val_if_fail(document != NULL, NULL);
     g_return_val_if_fail(document->priv != NULL, NULL);
@@ -1035,7 +1026,7 @@ sp_document_group_at_point(SPDocument *document, unsigned int key, NR::Point con
 
 /* Resource management */
 
-bool
+gboolean
 sp_document_add_resource(SPDocument *document, gchar const *key, SPObject *object)
 {
     GSList *rlist;
@@ -1060,7 +1051,7 @@ sp_document_add_resource(SPDocument *document, gchar const *key, SPObject *objec
     return TRUE;
 }
 
-bool
+gboolean
 sp_document_remove_resource(SPDocument *document, gchar const *key, SPObject *object)
 {
     GSList *rlist;