summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0540a04)
raw | patch | inline | side by side (parent: 0540a04)
author | daleharvey <daleharvey@users.sourceforge.net> | |
Mon, 4 Sep 2006 20:43:47 +0000 (20:43 +0000) | ||
committer | daleharvey <daleharvey@users.sourceforge.net> | |
Mon, 4 Sep 2006 20:43:47 +0000 (20:43 +0000) |
src/jabber_whiteboard/inkboard-node.cpp | patch | blob | history | |
src/jabber_whiteboard/inkboard-session.cpp | patch | blob | history |
index a2919315fd741e8c18423cdca44a4b4d9e0c6b3d..343b6c4c1216815fcdcd61851e726584bcd1a994 100644 (file)
XML::Node *node = this->tracker->get(target);
unsigned int elementVersion = this->tracker->getVersion(node);
- g_warning("got version %d",elementVersion);
-
- if(node && attribute != "transform")// && version == (elementVersion + 1))
+ if(node)// && version == (elementVersion + 1))
{
- //g_warning("adding history %s %s",attribute.c_str(),value.c_str());
this->tracker->incrementVersion(node);
this->tracker->addHistory(node, attribute, value.c_str());
- node->setAttribute(attribute.c_str(),value.c_str());
+
+ if(attribute != "transform")
+ node->setAttribute(attribute.c_str(),value.c_str());
}
}
diff --git a/src/jabber_whiteboard/inkboard-session.cpp b/src/jabber_whiteboard/inkboard-session.cpp
index 498e31d0f166609b1574a8b1f2e1beee6b962cc4..76307e37b05c26f5acb0a06179e46a4f4f6159dc 100644 (file)
{
XML::Node *element = (XML::Node *)&node;
+ Glib::ustring value(new_content.pointer());
+
+ Glib::ustring change = this->doc->tracker->getLastHistory(element,"text");
+
+ if(change.size() > 0 && change == value)
+ return;
+
if(new_content.pointer())
{
unsigned int version = this->doc->tracker->incrementVersion(element);
Glib::ustring change = this->doc->tracker->getLastHistory(element,attribute);
- g_warning("change %s %s to %s",attribute.c_str(), change.c_str(), value.c_str());
-
if(change.size() > 0 && change == value)
return;
- if(name && new_value.pointer())
+ if(attribute.size() > 0 && value.size() > 0)
{
unsigned int version = this->doc->tracker->incrementVersion(element);