From 0e2a2cc7bb4f35dbc5150de387b2e651714b6d5b Mon Sep 17 00:00:00 2001 From: mental Date: Thu, 10 May 2007 01:18:56 +0000 Subject: [PATCH] add document to action events --- src/helper/action.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/helper/action.cpp b/src/helper/action.cpp index d67bc5fc2..9b8cbfce8 100644 --- a/src/helper/action.cpp +++ b/src/helper/action.cpp @@ -17,6 +17,8 @@ #include "debug/timestamp.h" #include "debug/simple-event.h" #include "debug/event-tracker.h" +#include "ui/view/view.h" +#include "document.h" #include "helper/action.h" static void sp_action_class_init (SPActionClass *klass); @@ -129,6 +131,10 @@ public: : ActionEventBase(share_static_string("action")) { _addProperty(share_static_string("timestamp"), timestamp()); + SPDocument *document = action->view->doc(); + if (document) { + _addProperty(share_static_string("document"), document->serial()); + } _addProperty(share_static_string("verb"), action->id); } }; -- 2.30.2