index 343b6c4c1216815fcdcd61851e726584bcd1a994..f64d0f2128036eac31155c1dea0579a968a79476 100644 (file)
#include "pedro/pedrodom.h"
+#include "xml/node.h"
#include "xml/attribute-record.h"
#include "xml/element-node.h"
#include "xml/text-node.h"
{
Glib::ustring parentKey;
Glib::ustring key = this->tracker->get(node);
- Inkscape::XML::Node *parent = node->parent();
Glib::ustring tempParentKey = this->tracker->get(node->parent());
if(tempParentKey.size() < 1)
else
parentKey = tempParentKey;
- unsigned int index = parent->_childPosition(*node);
+ unsigned int index = node->position();
Message::Message nodeMessage = MessageUtilities::objectToString(node);
Message::Message message = String::ucompose(Vars::NEW_MESSAGE,parentKey,key,index,0,nodeMessage);
}
void
-InkboardDocument::changeConfigureText(Glib::ustring target, unsigned int version,
- Glib::ustring text)
+InkboardDocument::changeConfigureText(Glib::ustring target,
+ unsigned int /*version*/,
+ Glib::ustring text)
{
XML::Node *node = this->tracker->get(target);
- unsigned int elementVersion = this->tracker->getVersion(node);
+ //unsigned int elementVersion = this->tracker->getVersion(node);
if(node)// && version == (elementVersion + 1))
{
@@ -75,11 +76,13 @@ InkboardDocument::changeConfigureText(Glib::ustring target, unsigned int version
}
void
-InkboardDocument::changeConfigure(Glib::ustring target, unsigned int version,
- Glib::ustring attribute, Glib::ustring value)
+InkboardDocument::changeConfigure(Glib::ustring target,
+ unsigned int /*version*/,
+ Glib::ustring attribute,
+ Glib::ustring value)
{
XML::Node *node = this->tracker->get(target);
- unsigned int elementVersion = this->tracker->getVersion(node);
+ //unsigned int elementVersion = this->tracker->getVersion(node);
if(node)// && version == (elementVersion + 1))
{
void
InkboardDocument::changeNew(Glib::ustring parentid, Glib::ustring id,
- signed int index, Pedro::Element* data)
+ signed int /*index*/, Pedro::Element* data)
{
Glib::ustring name(data->getName());
if(name == "text")
{
XML::Node *parent = this->tracker->get(parentid);
- XML::Node *node = new XML::TextNode(Util::share_string(data->getValue().c_str()));
+ XML::Node *node = new XML::TextNode(Util::share_string(data->getValue().c_str()), this);
if(parent && node)
{
}
}else
{
- XML::Node *node = new XML::ElementNode(g_quark_from_string(name.c_str()));
+ XML::Node *node = new XML::ElementNode(g_quark_from_string(name.c_str()), this);
this->tracker->put(id,node);
XML::Node *parent = (parentid != "ROOT")
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :