Code

add document to action events
authormental <mental@users.sourceforge.net>
Thu, 10 May 2007 01:18:56 +0000 (01:18 +0000)
committermental <mental@users.sourceforge.net>
Thu, 10 May 2007 01:18:56 +0000 (01:18 +0000)
src/helper/action.cpp

index d67bc5fc2a8e08d25caf0145e056371e8ff09141..9b8cbfce80e3500e26cedd4c499f209957496609 100644 (file)
@@ -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);
     }
 };