From: mjwybrow Date: Tue, 7 Feb 2006 00:37:46 +0000 (+0000) Subject: * src/jabber_whiteboard/message-utilities.h, X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=12107abbb78a8201106786c55ec2dda6b2cdab2d;p=inkscape.git * src/jabber_whiteboard/message-utilities.h, src/jabber_whiteboard/serializer.cpp, src/jabber_whiteboard/deserializer.cpp, src/jabber_whiteboard/message-utilities.cpp, src/ui/dialog/whiteboard-connect.cpp: Some fixes to allow the codebase to compile with Inkboard support after the recent Util::shared_ptr<> and Dialog::present() changes. --- diff --git a/ChangeLog b/ChangeLog index c8a29d1e8..95281eb66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,27 @@ +2006-02-07 Michael Wybrow + + * src/jabber_whiteboard/message-utilities.h, + src/jabber_whiteboard/serializer.cpp, + src/jabber_whiteboard/deserializer.cpp, + src/jabber_whiteboard/message-utilities.cpp, + src/ui/dialog/whiteboard-connect.cpp: + + Some fixes to allow the codebase to compile with Inkboard support + after the recent Util::shared_ptr<> and Dialog::present() changes. + 2006-02-05 Marco Scholten - * src/verbs.cpp: updated to make double clicking a tool button + * src/verbs.cpp: updated to make double clicking a tool button open the new preferences dialog. - * src/ui/dialog/inkscape-preferences.cpp: updated to enable opening + * src/ui/dialog/inkscape-preferences.cpp: updated to enable opening the dialog on the correct page. - * src/ui/dialog/dialog.cpp: added virtual void present() so that + * src/ui/dialog/dialog.cpp: added virtual void present() so that InkscapePreferences::present() will be called from DialogManager::showDialog() 2006-02-05 MenTaLguY - * src/debug/event.h, src/debug/gc-heap.h, src/debug/heap.h, + * src/debug/event.h, src/debug/gc-heap.h, src/debug/heap.h, src/debug/logger.cpp, src/debug/simple-event.h, src/debug/sysv-heap.h, src/jabber_whiteboard/deserializer.cpp, src/jabber_whiteboard/message-utilities.cpp, diff --git a/src/jabber_whiteboard/deserializer.cpp b/src/jabber_whiteboard/deserializer.cpp index 8a6a464b4..066557ad5 100644 --- a/src/jabber_whiteboard/deserializer.cpp +++ b/src/jabber_whiteboard/deserializer.cpp @@ -372,7 +372,7 @@ Deserializer::deserializeEventChgAttr(Glib::ustring const& msg) // 5. If this node is in the actions queue and is marked as "new", we need to apply // _all_ received attributes to it _before_ adding it to the document tree. if (this->_newnodes.find(id) != this->_newnodes.end()) { - node->setAttribute(key.c_str(), newval.cString()); + node->setAttribute(key.c_str(), newval.pointer()); } // 6. Deserialize the event. diff --git a/src/jabber_whiteboard/message-utilities.cpp b/src/jabber_whiteboard/message-utilities.cpp index 8843b6f45..2812e303b 100644 --- a/src/jabber_whiteboard/message-utilities.cpp +++ b/src/jabber_whiteboard/message-utilities.cpp @@ -310,12 +310,12 @@ MessageUtilities::contentChangeMessage(Glib::ustring& msgbuf, std::string const // old_value msgbuf = msgbuf + "<" + MESSAGE_OLDVAL + ">"; - msgbuf += old_value.cString(); + msgbuf += old_value.pointer(); msgbuf = msgbuf + ""; // new_value msgbuf = msgbuf + "<" + MESSAGE_NEWVAL + ">"; - msgbuf += new_value.cString(); + msgbuf += new_value.pointer(); msgbuf = msgbuf + ""; // diff --git a/src/jabber_whiteboard/message-utilities.h b/src/jabber_whiteboard/message-utilities.h index 5595f435c..8fbefac18 100644 --- a/src/jabber_whiteboard/message-utilities.h +++ b/src/jabber_whiteboard/message-utilities.h @@ -26,7 +26,8 @@ namespace Inkscape { namespace Util { -class shared_ptr; +template +class shared_ptr; } @@ -80,5 +81,5 @@ private: fill-column:99 End: */ -// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : #endif diff --git a/src/jabber_whiteboard/serializer.cpp b/src/jabber_whiteboard/serializer.cpp index aae3e1378..eb5278047 100644 --- a/src/jabber_whiteboard/serializer.cpp +++ b/src/jabber_whiteboard/serializer.cpp @@ -201,19 +201,19 @@ Serializer::notifyContentChanged(XML::Node& node, Util::shared_ptr old_con return; } - if (old_content.cString() != NULL && new_content.cString() != NULL) { - if (strcmp(old_content.cString(), new_content.cString()) == 0) { + if (old_content.pointer() != NULL && new_content.pointer() != NULL) { + if (strcmp(old_content.pointer(), new_content.pointer()) == 0) { return; } } // 3. Serialize the event. - if (old_content.cString() != NULL) { - oldvalmsg = MessageUtilities::makeTagWithContent(MESSAGE_OLDVAL, old_content.cString()); + if (old_content.pointer() != NULL) { + oldvalmsg = MessageUtilities::makeTagWithContent(MESSAGE_OLDVAL, old_content.pointer()); } - if (new_content.cString() != NULL) { - newvalmsg = MessageUtilities::makeTagWithContent(MESSAGE_NEWVAL, new_content.cString()); + if (new_content.pointer() != NULL) { + newvalmsg = MessageUtilities::makeTagWithContent(MESSAGE_NEWVAL, new_content.pointer()); } Glib::ustring nodeidmsg = MessageUtilities::makeTagWithContent(MESSAGE_ID, nodeid); @@ -233,8 +233,8 @@ Serializer::notifyAttributeChanged(XML::Node& node, GQuark name, Util::shared_pt Glib::ustring key = g_quark_to_string(name); // 3. If oldval == newval, don't echo this change. - if (new_value.cString() != NULL && old_value.cString() != NULL) { - if (strcmp(new_value.cString(), old_value.cString()) == 0) { + if (new_value.pointer() != NULL && old_value.pointer() != NULL) { + if (strcmp(new_value.pointer(), old_value.pointer()) == 0) { return; } } @@ -243,12 +243,12 @@ Serializer::notifyAttributeChanged(XML::Node& node, GQuark name, Util::shared_pt Glib::ustring keymsg = MessageUtilities::makeTagWithContent(MESSAGE_KEY, key); Glib::ustring oldvalmsg, newvalmsg; - if (old_value.cString() != NULL) { - oldvalmsg = MessageUtilities::makeTagWithContent(MESSAGE_OLDVAL, old_value.cString()); + if (old_value.pointer() != NULL) { + oldvalmsg = MessageUtilities::makeTagWithContent(MESSAGE_OLDVAL, old_value.pointer()); } - if (new_value.cString() != NULL) { - newvalmsg = MessageUtilities::makeTagWithContent(MESSAGE_NEWVAL, new_value.cString()); + if (new_value.pointer() != NULL) { + newvalmsg = MessageUtilities::makeTagWithContent(MESSAGE_NEWVAL, new_value.pointer()); } Glib::ustring nodeidmsg = MessageUtilities::makeTagWithContent(MESSAGE_ID, nodeid); diff --git a/src/ui/dialog/whiteboard-connect.cpp b/src/ui/dialog/whiteboard-connect.cpp index 173e9a794..50f44e5f7 100644 --- a/src/ui/dialog/whiteboard-connect.cpp +++ b/src/ui/dialog/whiteboard-connect.cpp @@ -52,6 +52,11 @@ WhiteboardConnectDialogImpl::~WhiteboardConnectDialogImpl() { } +void WhiteboardConnectDialogImpl::present() +{ + Dialog::present(); +} + void WhiteboardConnectDialogImpl::setSessionManager() {