From f0c844d8ead418472be2e552f309c2fec46148ec Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 23 Dec 2025 15:52:41 +0100 Subject: [PATCH] finished splitting --- retroshare-gui/src/gui/FriendsDialog.cpp | 4 ++-- retroshare-gui/src/gui/MessengerWindow.cpp | 2 +- retroshare-gui/src/gui/NewsFeed.cpp | 2 ++ retroshare-gui/src/gui/chat/PopupChatWindow.cpp | 2 +- retroshare-gui/src/gui/common/AvatarWidget.cpp | 2 +- retroshare-gui/src/gui/feeds/ChatMsgItem.cpp | 2 ++ retroshare-gui/src/gui/feeds/MsgItem.cpp | 3 +++ retroshare-gui/src/gui/profile/StatusMessage.cpp | 2 +- 8 files changed, 13 insertions(+), 6 deletions(-) diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp index 573374f6e..785bbe4d9 100644 --- a/retroshare-gui/src/gui/FriendsDialog.cpp +++ b/retroshare-gui/src/gui/FriendsDialog.cpp @@ -284,14 +284,14 @@ void FriendsDialog::getAvatar() std::cerr << "Avatar image size = " << ba.size() << std::endl ; #endif - rsChats->setOwnAvatarData((unsigned char *)(ba.data()), ba.size()) ; // last char 0 included. + rsChats->setOwnNodeAvatarData((unsigned char *)(ba.data()), ba.size()) ; // last char 0 included. } } /** Loads own personal status */ void FriendsDialog::loadmypersonalstatus() { - QString statustring = QString::fromUtf8(rsChats->getCustomStateString().c_str()); + QString statustring = QString::fromUtf8(rsChats->getOwnCustomStateString().c_str()); if (statustring.isEmpty()) ui.mypersonalstatusLabel->setText(tr("Set your status message here.")); diff --git a/retroshare-gui/src/gui/MessengerWindow.cpp b/retroshare-gui/src/gui/MessengerWindow.cpp index 28199caa8..0c4c78986 100644 --- a/retroshare-gui/src/gui/MessengerWindow.cpp +++ b/retroshare-gui/src/gui/MessengerWindow.cpp @@ -223,7 +223,7 @@ void MessengerWindow::openShareManager() /** Loads own personal status message */ void MessengerWindow::loadmystatusmessage() { - ui.messagelineEdit->setEditText( QString::fromUtf8(rsChats->getCustomStateString().c_str())); + ui.messagelineEdit->setEditText( QString::fromUtf8(rsChats->getOwnCustomStateString().c_str())); } /** Save own status message */ diff --git a/retroshare-gui/src/gui/NewsFeed.cpp b/retroshare-gui/src/gui/NewsFeed.cpp index b78437184..751604d23 100644 --- a/retroshare-gui/src/gui/NewsFeed.cpp +++ b/retroshare-gui/src/gui/NewsFeed.cpp @@ -70,6 +70,8 @@ * #define NEWS_DEBUG 1 ****/ +using namespace Rs::Msgs; + static NewsFeed* instance = nullptr; /** Constructor */ diff --git a/retroshare-gui/src/gui/chat/PopupChatWindow.cpp b/retroshare-gui/src/gui/chat/PopupChatWindow.cpp index c2f7f43bb..6ba64dcaf 100644 --- a/retroshare-gui/src/gui/chat/PopupChatWindow.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatWindow.cpp @@ -384,7 +384,7 @@ void PopupChatWindow::getAvatar() if (misc::getOpenAvatarPicture(this, ba)) { std::cerr << "Avatar image size = " << ba.size() << std::endl ; - rsChats->setOwnAvatarData((unsigned char *)(ba.data()), ba.size()); // last char 0 included. + rsChats->setOwnNodeAvatarData((unsigned char *)(ba.data()), ba.size()); // last char 0 included. } } diff --git a/retroshare-gui/src/gui/common/AvatarWidget.cpp b/retroshare-gui/src/gui/common/AvatarWidget.cpp index 43eea48d2..5aa2effe7 100644 --- a/retroshare-gui/src/gui/common/AvatarWidget.cpp +++ b/retroshare-gui/src/gui/common/AvatarWidget.cpp @@ -124,7 +124,7 @@ void AvatarWidget::mouseReleaseEvent(QMouseEvent */*event*/) QByteArray newAvatar; dialog.getAvatar(newAvatar); - rsChats->setOwnAvatarData((unsigned char *)(newAvatar.data()), newAvatar.size()) ; // last char 0 included. + rsChats->setOwnNodeAvatarData((unsigned char *)(newAvatar.data()), newAvatar.size()) ; // last char 0 included. } } diff --git a/retroshare-gui/src/gui/feeds/ChatMsgItem.cpp b/retroshare-gui/src/gui/feeds/ChatMsgItem.cpp index e7e5da7d4..1306d53ec 100644 --- a/retroshare-gui/src/gui/feeds/ChatMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/ChatMsgItem.cpp @@ -43,6 +43,8 @@ * #define DEBUG_ITEM 1 ****/ +using namespace Rs::Msgs; + /** Constructor */ ChatMsgItem::ChatMsgItem(FeedHolder *parent, uint32_t feedId, const RsPeerId &peerId, const std::string &message) : FeedItem(parent,feedId,NULL), mPeerId(peerId) diff --git a/retroshare-gui/src/gui/feeds/MsgItem.cpp b/retroshare-gui/src/gui/feeds/MsgItem.cpp index 93af25cc1..0a8e1df1a 100644 --- a/retroshare-gui/src/gui/feeds/MsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/MsgItem.cpp @@ -43,6 +43,8 @@ * #define DEBUG_ITEM 1 ****/ +using namespace Rs::Msgs; + /** Constructor */ MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, const std::string &msgId, bool isHome) : FeedItem(parent,feedId,NULL), mMsgId(msgId), mIsHome(isHome) @@ -123,6 +125,7 @@ void MsgItem::handleEvent_main_thread(std::shared_ptr event) case RsMailStatusEventCode::TAG_CHANGED: case RsMailStatusEventCode::MESSAGE_RECEIVED_ACK: case RsMailStatusEventCode::SIGNATURE_FAILED: + default: break; } } diff --git a/retroshare-gui/src/gui/profile/StatusMessage.cpp b/retroshare-gui/src/gui/profile/StatusMessage.cpp index ca94176f9..4ef888c05 100644 --- a/retroshare-gui/src/gui/profile/StatusMessage.cpp +++ b/retroshare-gui/src/gui/profile/StatusMessage.cpp @@ -32,7 +32,7 @@ StatusMessage::StatusMessage(QWidget *parent) connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(save())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); - ui.txt_StatusMessage->setText(QString::fromUtf8(rsChats->getCustomStateString().c_str())); + ui.txt_StatusMessage->setText(QString::fromUtf8(rsChats->getOwnCustomStateString().c_str())); } /** Saves the changes on this page */