summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ccd8521)
raw | patch | inline | side by side (parent: ccd8521)
author | mental <mental@users.sourceforge.net> | |
Sun, 6 May 2007 21:30:31 +0000 (21:30 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Sun, 6 May 2007 21:30:31 +0000 (21:30 +0000) |
src/helper/action.cpp | patch | blob | history |
diff --git a/src/helper/action.cpp b/src/helper/action.cpp
index 1c8c7ec1532a813769ff6319364e1f5c5e10d6b1..908c636380c1cf453b2c8b86b27de998ca86de20 100644 (file)
--- a/src/helper/action.cpp
+++ b/src/helper/action.cpp
#include <string.h>
+#include "debug/logger.h"
+#include "debug/timestamp.h"
+#include "debug/simple-event.h"
#include "helper/action.h"
static void sp_action_class_init (SPActionClass *klass);
return action;
}
+namespace {
+
+using Inkscape::Debug::SimpleEvent;
+using Inkscape::Debug::Event;
+using Inkscape::Util::share_static_string;
+using Inkscape::Debug::timestamp;
+
+typedef SimpleEvent<Event::INTERACTION> ActionEventBase;
+
+class ActionEvent : public ActionEventBase {
+public:
+ ActionEvent(SPAction const *action)
+ : ActionEventBase(share_static_string("action"))
+ {
+ _addProperty(share_static_string("timestamp"), timestamp());
+ _addProperty(share_static_string("verb"), action->id);
+ }
+};
+
+}
+
/**
\return None
\brief Executes an action
nr_return_if_fail (action != NULL);
nr_return_if_fail (SP_IS_ACTION (action));
+ Inkscape::Debug::Logger::write<ActionEvent>(action);
+
aobject = NR_ACTIVE_OBJECT(action);
if (aobject->callbacks) {
unsigned int i;