mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-01-13 22:41:04 -05:00
Merge branch 'master' into DisplayEngineVersion
This commit is contained in:
commit
28c28afdca
74 changed files with 385 additions and 337 deletions
2
.github/workflows/ci-mingw64.yml
vendored
2
.github/workflows/ci-mingw64.yml
vendored
|
|
@ -66,5 +66,5 @@ jobs:
|
|||
|
||||
- name: CI-Build
|
||||
run: |
|
||||
qmake . -r -spec win32-g++ "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_sam3_libsam3"
|
||||
qmake-qt5.exe . -r -spec win32-g++ "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_sam3_libsam3"
|
||||
mingw32-make -j3
|
||||
|
|
|
|||
2
.github/workflows/ci-ucrt64.yml
vendored
2
.github/workflows/ci-ucrt64.yml
vendored
|
|
@ -66,5 +66,5 @@ jobs:
|
|||
|
||||
- name: CI-Build
|
||||
run: |
|
||||
qmake . -r -spec win32-g++ "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_sam3_libsam3"
|
||||
qmake-qt5.exe . -r -spec win32-g++ "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=no_rs_sam3" "CONFIG+=no_rs_sam3_libsam3"
|
||||
mingw32-make -j3
|
||||
|
|
|
|||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -35,3 +35,7 @@ Thumbs.db
|
|||
/retroshare-gui/src/temp/
|
||||
/retroshare-service/src/retroshare-service
|
||||
/*.tar.?z
|
||||
|
||||
# Build artifacts
|
||||
build/
|
||||
.vscode/
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 7643654403b5779e56dd20c5e73e4e47583f27e6
|
||||
Subproject commit cb57e66e2741ad985cdf31b8f92ef9b0a4cfebd0
|
||||
|
|
@ -71,7 +71,7 @@ AboutWidget::AboutWidget(QWidget* parent)
|
|||
void AboutWidget::installAWidget() {
|
||||
assert(tWidget == NULL);
|
||||
aWidget = new AWidget();
|
||||
QVBoxLayout* l = (QVBoxLayout*)specialFrame->layout();
|
||||
QHBoxLayout* l = (QHBoxLayout*)specialFrame->layout();
|
||||
l->insertWidget(0, aWidget);
|
||||
l->setStretchFactor(aWidget, 100);
|
||||
aWidget->setFocus();
|
||||
|
|
@ -87,7 +87,7 @@ void AboutWidget::installTWidget() {
|
|||
tWidget->setNextPieceLabel(npLabel);
|
||||
|
||||
QWidget* pan = new QWidget();
|
||||
QVBoxLayout* vl = new QVBoxLayout(pan);
|
||||
QHBoxLayout* vl = new QHBoxLayout(pan);
|
||||
QLabel* topRecLabel = new QLabel(tr("Max score: %1").arg(tWidget->getMaxScore()));
|
||||
QLabel* scoreLabel = new QLabel(pan);
|
||||
QLabel* levelLabel = new QLabel(pan);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#include "util/qtthreadsutils.h"
|
||||
#include "util/RsQtVersion.h"
|
||||
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rschats.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsidentity.h"
|
||||
|
||||
|
|
@ -484,7 +484,7 @@ void ChatLobbyWidget::addChatPage(ChatLobbyDialog *d)
|
|||
_lobby_infos[id].last_typing_event = time(nullptr) ;
|
||||
|
||||
ChatLobbyInfo linfo ;
|
||||
if(rsMsgs->getChatLobbyInfo(id,linfo))
|
||||
if(rsChats->getChatLobbyInfo(id,linfo))
|
||||
_lobby_infos[id].default_icon = (linfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(IMAGE_PUBLIC):FilesDefs::getIconFromQtResourcePath(IMAGE_PRIVATE) ;
|
||||
else
|
||||
std::cerr << "(EE) cannot find info for room " << std::hex << id << std::dec << std::endl;
|
||||
|
|
@ -528,10 +528,10 @@ void ChatLobbyWidget::updateDisplay()
|
|||
std::cerr << "updating chat room display!" << std::endl;
|
||||
#endif
|
||||
std::vector<VisibleChatLobbyRecord> visibleLobbies;
|
||||
rsMsgs->getListOfNearbyChatLobbies(visibleLobbies);
|
||||
rsChats->getListOfNearbyChatLobbies(visibleLobbies);
|
||||
|
||||
std::list<ChatLobbyId> lobbies;
|
||||
rsMsgs->getChatLobbyList(lobbies);
|
||||
rsChats->getChatLobbyList(lobbies);
|
||||
|
||||
#ifdef CHAT_LOBBY_GUI_DEBUG
|
||||
std::cerr << "got " << visibleLobbies.size() << " visible lobbies" << std::endl;
|
||||
|
|
@ -683,7 +683,7 @@ void ChatLobbyWidget::updateDisplay()
|
|||
// In the new model (after lobby save to disk) the auto-subscribe flag is used to automatically join lobbies that where
|
||||
// previously being used when the t software quits.
|
||||
|
||||
bool autoSubscribe = rsMsgs->getLobbyAutoSubscribe(lobby.lobby_id);
|
||||
bool autoSubscribe = rsChats->getLobbyAutoSubscribe(lobby.lobby_id);
|
||||
|
||||
if (autoSubscribe && subscribed && _lobby_infos.find(lobby.lobby_id) == _lobby_infos.end())
|
||||
{
|
||||
|
|
@ -702,7 +702,7 @@ void ChatLobbyWidget::updateDisplay()
|
|||
for (lobbyIt = lobbies.begin(); lobbyIt != lobbies.end(); ++lobbyIt)
|
||||
{
|
||||
ChatLobbyInfo lobby ;
|
||||
rsMsgs->getChatLobbyInfo(*lobbyIt,lobby) ;
|
||||
rsChats->getChatLobbyInfo(*lobbyIt,lobby) ;
|
||||
|
||||
#ifdef CHAT_LOBBY_GUI_DEBUG
|
||||
std::cerr << "adding " << lobby.lobby_name << "topic " << lobby.lobby_topic << " #" << std::hex << lobby.lobby_id << std::dec << " private " << lobby.nick_names.size() << " peers." << std::endl;
|
||||
|
|
@ -745,7 +745,7 @@ void ChatLobbyWidget::updateDisplay()
|
|||
item->setIcon(COLUMN_NAME, icon);
|
||||
}
|
||||
|
||||
bool autoSubscribe = rsMsgs->getLobbyAutoSubscribe(lobby.lobby_id);
|
||||
bool autoSubscribe = rsChats->getLobbyAutoSubscribe(lobby.lobby_id);
|
||||
|
||||
updateItem(ui.lobbyTreeWidget, item, lobby.lobby_id, lobby.lobby_name,lobby.lobby_topic, lobby.gxs_ids.size(), true, autoSubscribe,lobby_flags);
|
||||
|
||||
|
|
@ -753,7 +753,7 @@ void ChatLobbyWidget::updateDisplay()
|
|||
|
||||
// look for chat rooms that are subscribed but not displayed as such
|
||||
|
||||
if(it == _lobby_infos.end() && rsMsgs->joinVisibleChatLobby(lobby.lobby_id,lobby.gxs_id))
|
||||
if(it == _lobby_infos.end() && rsChats->joinVisibleChatLobby(lobby.lobby_id,lobby.gxs_id))
|
||||
{
|
||||
std::cerr << "Adding back ChatLobbyDialog for subscribed lobby " << std::hex << lobby.lobby_id << std::dec << std::endl;
|
||||
ChatDialog::chatFriend(ChatId(lobby.lobby_id),true) ;
|
||||
|
|
@ -819,7 +819,7 @@ void ChatLobbyWidget::createIdentityAndSubscribe()
|
|||
if(!rsIdentity->getOwnIds(own_ids) || own_ids.empty())
|
||||
return;
|
||||
|
||||
if(rsMsgs->joinVisibleChatLobby(id,own_ids.front()))
|
||||
if(rsChats->joinVisibleChatLobby(id,own_ids.front()))
|
||||
ChatDialog::chatFriend(ChatId(id),true) ;
|
||||
}
|
||||
|
||||
|
|
@ -839,7 +839,7 @@ void ChatLobbyWidget::subscribeChatLobbyAs()
|
|||
RsGxsId gxs_id(action->data().toString().toStdString());
|
||||
//uint32_t error_code ;
|
||||
|
||||
if(rsMsgs->joinVisibleChatLobby(id,gxs_id))
|
||||
if(rsChats->joinVisibleChatLobby(id,gxs_id))
|
||||
ChatDialog::chatFriend(ChatId(id),true) ;
|
||||
}
|
||||
|
||||
|
|
@ -879,7 +879,7 @@ void ChatLobbyWidget::subscribeChatLobbyAtItem(QTreeWidgetItem *item)
|
|||
RsGxsId gxs_id ;
|
||||
|
||||
std::list<RsGxsId> own_ids;
|
||||
// not using rsMsgs->getDefaultIdentityForChatLobby(), to check if we have an identity
|
||||
// not using rsChats->getDefaultIdentityForChatLobby(), to check if we have an identity
|
||||
// to work around the case when the identity was deleted and is invalid
|
||||
// (the chatservice does not know if a default identity was deleted)
|
||||
// only rsIdentity knows the truth at the moment!
|
||||
|
|
@ -902,7 +902,7 @@ void ChatLobbyWidget::subscribeChatLobbyAtItem(QTreeWidgetItem *item)
|
|||
}
|
||||
else
|
||||
{
|
||||
rsMsgs->getDefaultIdentityForChatLobby(gxs_id);
|
||||
rsChats->getDefaultIdentityForChatLobby(gxs_id);
|
||||
|
||||
RsIdentityDetails idd ;
|
||||
if(!rsIdentity->getIdDetails(gxs_id,idd))
|
||||
|
|
@ -915,7 +915,7 @@ void ChatLobbyWidget::subscribeChatLobbyAtItem(QTreeWidgetItem *item)
|
|||
}
|
||||
}
|
||||
|
||||
if(rsMsgs->joinVisibleChatLobby(id,gxs_id))
|
||||
if(rsChats->joinVisibleChatLobby(id,gxs_id))
|
||||
ChatDialog::chatFriend(ChatId(id),true) ;
|
||||
}
|
||||
|
||||
|
|
@ -926,8 +926,8 @@ void ChatLobbyWidget::autoSubscribeLobby(QTreeWidgetItem *item)
|
|||
}
|
||||
|
||||
ChatLobbyId id = item->data(COLUMN_DATA, ROLE_ID).toULongLong();
|
||||
bool isAutoSubscribe = rsMsgs->getLobbyAutoSubscribe(id);
|
||||
rsMsgs->setLobbyAutoSubscribe(id, !isAutoSubscribe);
|
||||
bool isAutoSubscribe = rsChats->getLobbyAutoSubscribe(id);
|
||||
rsChats->setLobbyAutoSubscribe(id, !isAutoSubscribe);
|
||||
if (!isAutoSubscribe && !item->data(COLUMN_DATA, ROLE_SUBSCRIBED).toBool())
|
||||
subscribeChatLobbyAtItem(item);
|
||||
}
|
||||
|
|
@ -939,7 +939,7 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id, bool subscribed /*= false*/)
|
|||
|
||||
// Update information
|
||||
std::vector<VisibleChatLobbyRecord> lobbies;
|
||||
rsMsgs->getListOfNearbyChatLobbies(lobbies);
|
||||
rsChats->getListOfNearbyChatLobbies(lobbies);
|
||||
|
||||
std::list<RsGxsId> my_ids ;
|
||||
rsIdentity->getOwnIds(my_ids) ;
|
||||
|
|
@ -1122,9 +1122,9 @@ void ChatLobbyWidget::unsubscribeChatLobby(ChatLobbyId id)
|
|||
|
||||
// Unsubscribe the chat lobby
|
||||
ChatDialog::closeChat(ChatId(id));
|
||||
rsMsgs->unsubscribeChatLobby(id);
|
||||
bool isAutoSubscribe = rsMsgs->getLobbyAutoSubscribe(id);
|
||||
if (isAutoSubscribe) rsMsgs->setLobbyAutoSubscribe(id, !isAutoSubscribe);
|
||||
rsChats->unsubscribeChatLobby(id);
|
||||
bool isAutoSubscribe = rsChats->getLobbyAutoSubscribe(id);
|
||||
if (isAutoSubscribe) rsChats->setLobbyAutoSubscribe(id, !isAutoSubscribe);
|
||||
|
||||
ChatLobbyDialog *cldCW=NULL ;
|
||||
if (NULL != (cldCW = dynamic_cast<ChatLobbyDialog *>(ui.stackedWidget->currentWidget())))
|
||||
|
|
@ -1205,13 +1205,13 @@ void ChatLobbyWidget::handleChatLobbyEvent(uint64_t lobby_id, RsChatLobbyEventCo
|
|||
void ChatLobbyWidget::readChatLobbyInvites()
|
||||
{
|
||||
std::list<ChatLobbyInvite> invites;
|
||||
rsMsgs->getPendingChatLobbyInvites(invites);
|
||||
rsChats->getPendingChatLobbyInvites(invites);
|
||||
|
||||
RsGxsId default_id ;
|
||||
rsMsgs->getDefaultIdentityForChatLobby(default_id) ;
|
||||
rsChats->getDefaultIdentityForChatLobby(default_id) ;
|
||||
|
||||
std::list<ChatLobbyId> subscribed_lobbies ;
|
||||
rsMsgs->getChatLobbyList(subscribed_lobbies) ;
|
||||
rsChats->getChatLobbyList(subscribed_lobbies) ;
|
||||
|
||||
for(std::list<ChatLobbyInvite>::const_iterator it(invites.begin());it!=invites.end();++it)
|
||||
{
|
||||
|
|
@ -1265,7 +1265,7 @@ void ChatLobbyWidget::readChatLobbyInvites()
|
|||
|
||||
if (res == QMessageBox::No)
|
||||
{
|
||||
rsMsgs->denyLobbyInvite((*it).lobby_id);
|
||||
rsChats->denyLobbyInvite((*it).lobby_id);
|
||||
continue ;
|
||||
}
|
||||
|
||||
|
|
@ -1274,11 +1274,11 @@ void ChatLobbyWidget::readChatLobbyInvites()
|
|||
|
||||
if(chosen_id.isNull())
|
||||
{
|
||||
rsMsgs->denyLobbyInvite((*it).lobby_id);
|
||||
rsChats->denyLobbyInvite((*it).lobby_id);
|
||||
continue ;
|
||||
}
|
||||
|
||||
if(rsMsgs->acceptLobbyInvite((*it).lobby_id,chosen_id))
|
||||
if(rsChats->acceptLobbyInvite((*it).lobby_id,chosen_id))
|
||||
ChatDialog::chatFriend(ChatId((*it).lobby_id),true);
|
||||
else
|
||||
std::cerr << "Can't join chat room with id 0x" << std::hex << (*it).lobby_id << std::dec << std::endl;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "util/FontSizeHandler.h"
|
||||
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QTreeWidget>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rshistory.h>
|
||||
#include <retroshare/rsinit.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
#include "chat/ChatUserNotify.h"
|
||||
#include "connect/ConnectFriendWizard.h"
|
||||
|
|
@ -283,14 +284,14 @@ void FriendsDialog::getAvatar()
|
|||
std::cerr << "Avatar image size = " << ba.size() << std::endl ;
|
||||
#endif
|
||||
|
||||
rsMsgs->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(rsMsgs->getCustomStateString().c_str());
|
||||
QString statustring = QString::fromUtf8(rsChats->getOwnCustomStateString().c_str());
|
||||
|
||||
if (statustring.isEmpty())
|
||||
ui.mypersonalstatusLabel->setText(tr("Set your status message here."));
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
#include "util/DateTime.h"
|
||||
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rschats.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsservicecontrol.h"
|
||||
|
||||
|
|
@ -1917,7 +1917,7 @@ QString IdDialog::createUsageString(const RsIdentityUsage& u) const
|
|||
{
|
||||
ChatId id = ChatId(ChatLobbyId(u.mAdditionalId));
|
||||
ChatLobbyInfo linfo ;
|
||||
rsMsgs->getChatLobbyInfo(ChatLobbyId(u.mAdditionalId),linfo);
|
||||
rsChats->getChatLobbyInfo(ChatLobbyId(u.mAdditionalId),linfo);
|
||||
RetroShareLink l = RetroShareLink::createChatRoom(id, QString::fromUtf8(linfo.lobby_name.c_str()));
|
||||
return tr("Message in chat room %1").arg(l.toHtml()) ;
|
||||
}
|
||||
|
|
@ -2456,7 +2456,7 @@ void IdDialog::chatIdentity(const RsGxsId& toGxsId)
|
|||
uint32_t error_code;
|
||||
DistantChatPeerId did;
|
||||
|
||||
if(!rsMsgs->initiateDistantChatConnexion(toGxsId, fromGxsId, did, error_code))
|
||||
if(!rsChats->initiateDistantChatConnexion(toGxsId, fromGxsId, did, error_code))
|
||||
QMessageBox::information(
|
||||
nullptr, tr("Distant chat cannot work")
|
||||
, QString("%1 %2: %3")
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#include <QColor>
|
||||
|
||||
#include "retroshare/rsstatus.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rschats.h"
|
||||
#include "retroshare/rsmail.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsidentity.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "common/StatusDefs.h"
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rsstatus.h>
|
||||
|
||||
#include "rshare.h"
|
||||
|
|
@ -223,13 +223,13 @@ void MessengerWindow::openShareManager()
|
|||
/** Loads own personal status message */
|
||||
void MessengerWindow::loadmystatusmessage()
|
||||
{
|
||||
ui.messagelineEdit->setEditText( QString::fromUtf8(rsMsgs->getCustomStateString().c_str()));
|
||||
ui.messagelineEdit->setEditText( QString::fromUtf8(rsChats->getOwnCustomStateString().c_str()));
|
||||
}
|
||||
|
||||
/** Save own status message */
|
||||
void MessengerWindow::savestatusmessage()
|
||||
{
|
||||
rsMsgs->setCustomStateString(ui.messagelineEdit->currentText().toUtf8().constData());
|
||||
rsChats->setCustomStateString(ui.messagelineEdit->currentText().toUtf8().constData());
|
||||
}
|
||||
|
||||
void MessengerWindow::updateOwnStatus(const QString &peer_id, RsStatusValue status)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include <retroshare/rsiface.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
||||
#include "common/vmessagebox.h"
|
||||
#include "common/RSTreeWidgetItem.h"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include <retroshare/rsiface.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
||||
bool pgpid_item_proxy::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@
|
|||
#include <retroshare/rsbanlist.h>
|
||||
#include <retroshare/rsgxschannels.h>
|
||||
#include <retroshare/rsgxsforums.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsplugin.h>
|
||||
#include <retroshare/rsposted.h>
|
||||
|
|
@ -69,6 +70,8 @@
|
|||
* #define NEWS_DEBUG 1
|
||||
****/
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
static NewsFeed* instance = nullptr;
|
||||
|
||||
/** Constructor */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include <math.h>
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
#include <QPainter>
|
||||
#include <QMessageBox>
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@
|
|||
#include "retroshare/rsidentity.h"
|
||||
#include "retroshare/rsgxscircles.h"
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rsids.h"
|
||||
#include "retroshare/rsmail.h"
|
||||
#include "retroshare/rschats.h"
|
||||
#include "retroshare/rsids.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <QMenu>
|
||||
|
|
@ -604,7 +605,7 @@ void PeopleDialog::chatIdentity()
|
|||
|
||||
DistantChatPeerId dpid ;
|
||||
|
||||
if(!rsMsgs->initiateDistantChatConnexion(RsGxsId(gxs_id), from_gxs_id, dpid,error_code))
|
||||
if(!rsChats->initiateDistantChatConnexion(RsGxsId(gxs_id), from_gxs_id, dpid,error_code))
|
||||
QMessageBox::information(NULL, tr("Distant chat cannot work"), QString("%1 %2: %3").arg(tr("Distant chat refused with this person.")).arg(tr("Error code")).arg(error_code)) ;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include <retroshare/rsfiles.h>
|
||||
#include <retroshare/rsgxsforums.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
|
||||
#include <QApplication>
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@
|
|||
//
|
||||
|
||||
#include <retroshare/rsgxsifacetypes.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rstypes.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rsinit.h>
|
||||
#include <util/rsdir.h>
|
||||
#include <util/qtthreadsutils.h>
|
||||
|
|
@ -259,8 +260,8 @@ void RsGUIEventManager::async_handleIncomingEvent(std::shared_ptr<const RsEvent>
|
|||
{
|
||||
for(auto msgid:ev1->mChangedMsgIds)
|
||||
{
|
||||
Rs::Msgs::MessageInfo msgInfo;
|
||||
if(rsMsgs->getMessage(msgid, msgInfo))
|
||||
Rs::Mail::MessageInfo msgInfo;
|
||||
if(rsMail->getMessage(msgid, msgInfo))
|
||||
insertToaster(new ToasterItem(new MessageToaster(msgInfo.from.toStdString(), QString::fromUtf8(msgInfo.title.c_str()), QString::fromUtf8(msgInfo.msg.c_str()))));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
|
||||
#include <retroshare/rsiface.h>
|
||||
#include <retroshare/rsturtle.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <QObject>
|
||||
#include <QMutex>
|
||||
#include <QPoint>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
#include "util/DateTime.h"
|
||||
|
||||
#include <retroshare/rswiki.h>
|
||||
#include "util/qtthreadsutils.h"
|
||||
|
||||
|
||||
// These should be in retroshare/ folder.
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
|
|
@ -79,60 +81,68 @@
|
|||
|
||||
|
||||
/** Constructor */
|
||||
WikiDialog::WikiDialog(QWidget *parent) : RsGxsUpdateBroadcastPage(rsWiki, parent)
|
||||
WikiDialog::WikiDialog(QWidget *parent) :
|
||||
RsGxsUpdateBroadcastPage(rsWiki, parent),
|
||||
mEventHandlerId(0) // Initialize handler ID
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
mAddPageDialog = NULL;
|
||||
mAddGroupDialog = NULL;
|
||||
mEditDialog = NULL;
|
||||
mAddPageDialog = NULL;
|
||||
mAddGroupDialog = NULL;
|
||||
mEditDialog = NULL;
|
||||
|
||||
connect( ui.toolButton_NewPage, SIGNAL(clicked()), this, SLOT(OpenOrShowAddPageDialog()));
|
||||
connect( ui.toolButton_Edit, SIGNAL(clicked()), this, SLOT(OpenOrShowEditDialog()));
|
||||
connect( ui.toolButton_Republish, SIGNAL(clicked()), this, SLOT(OpenOrShowRepublishDialog()));
|
||||
connect( ui.toolButton_NewPage, SIGNAL(clicked()), this, SLOT(OpenOrShowAddPageDialog()));
|
||||
connect( ui.toolButton_Edit, SIGNAL(clicked()), this, SLOT(OpenOrShowEditDialog()));
|
||||
connect( ui.toolButton_Republish, SIGNAL(clicked()), this, SLOT(OpenOrShowRepublishDialog()));
|
||||
|
||||
// Usurped until Refresh works normally
|
||||
connect( ui.toolButton_Delete, SIGNAL(clicked()), this, SLOT(insertWikiGroups()));
|
||||
connect( ui.pushButton, SIGNAL(clicked()), this, SLOT(todo()));
|
||||
connect( ui.treeWidget_Pages, SIGNAL(itemSelectionChanged()), this, SLOT(groupTreeChanged()));
|
||||
|
||||
connect( ui.treeWidget_Pages, SIGNAL(itemSelectionChanged()), this, SLOT(groupTreeChanged()));
|
||||
// GroupTreeWidget.
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(groupListCustomPopupMenu(QPoint)));
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(wikiGroupChanged(QString)));
|
||||
|
||||
// GroupTreeWidget.
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(groupListCustomPopupMenu(QPoint)));
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(wikiGroupChanged(QString)));
|
||||
/* setup TokenQueue */
|
||||
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
|
||||
|
||||
/* setup TokenQueue */
|
||||
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
|
||||
// Set initial size of the splitter
|
||||
ui.listSplitter->setStretchFactor(0, 0);
|
||||
ui.listSplitter->setStretchFactor(1, 1);
|
||||
|
||||
// Set initial size of the splitter
|
||||
ui.listSplitter->setStretchFactor(0, 0);
|
||||
ui.listSplitter->setStretchFactor(1, 1);
|
||||
/* Setup Group Tree */
|
||||
mYourGroups = ui.groupTreeWidget->addCategoryItem(tr("My Groups"), QIcon(), true);
|
||||
mSubscribedGroups = ui.groupTreeWidget->addCategoryItem(tr("Subscribed Groups"), QIcon(), true);
|
||||
mPopularGroups = ui.groupTreeWidget->addCategoryItem(tr("Popular Groups"), QIcon(), false);
|
||||
mOtherGroups = ui.groupTreeWidget->addCategoryItem(tr("Other Groups"), QIcon(), false);
|
||||
|
||||
/* Add the New Group button */
|
||||
QToolButton *newGroupButton = new QToolButton(this);
|
||||
newGroupButton->setIcon(QIcon(":/icons/png/add.png"));
|
||||
newGroupButton->setToolTip(tr("Create Group"));
|
||||
connect(newGroupButton, SIGNAL(clicked()), this, SLOT(OpenOrShowAddGroupDialog()));
|
||||
ui.groupTreeWidget->addToolButton(newGroupButton);
|
||||
|
||||
/* Setup Group Tree */
|
||||
mYourGroups = ui.groupTreeWidget->addCategoryItem(tr("My Groups"), QIcon(), true);
|
||||
mSubscribedGroups = ui.groupTreeWidget->addCategoryItem(tr("Subscribed Groups"), QIcon(), true);
|
||||
mPopularGroups = ui.groupTreeWidget->addCategoryItem(tr("Popular Groups"), QIcon(), false);
|
||||
mOtherGroups = ui.groupTreeWidget->addCategoryItem(tr("Other Groups"), QIcon(), false);
|
||||
|
||||
/* Add the New Group button */
|
||||
QToolButton *newGroupButton = new QToolButton(this);
|
||||
newGroupButton->setIcon(QIcon(":/icons/png/add.png"));
|
||||
newGroupButton->setToolTip(tr("Create Group"));
|
||||
connect(newGroupButton, SIGNAL(clicked()), this, SLOT(OpenOrShowAddGroupDialog()));
|
||||
ui.groupTreeWidget->addToolButton(newGroupButton);
|
||||
// load settings
|
||||
processSettings(true);
|
||||
updateDisplay(true);
|
||||
|
||||
//QTimer *timer = new QTimer(this);
|
||||
//timer->connect(timer, SIGNAL(timeout()), this, SLOT(insertWikiGroups()));
|
||||
//timer->start(5000);
|
||||
/* Get dynamic event type ID for Wiki. This avoids hardcoding IDs in rsevents.h */
|
||||
RsEventType wikiEventType = (RsEventType)rsEvents->getDynamicEventType("GXS_WIKI");
|
||||
|
||||
// load settings
|
||||
processSettings(true);
|
||||
updateDisplay(true);
|
||||
/* Register events handler using the dynamic type */
|
||||
rsEvents->registerEventsHandler(
|
||||
[this](std::shared_ptr<const RsEvent> event) {
|
||||
RsQThreadUtils::postToObject([=]() {
|
||||
handleEvent_main_thread(event);
|
||||
}, this );
|
||||
},
|
||||
mEventHandlerId, wikiEventType);
|
||||
}
|
||||
|
||||
WikiDialog::~WikiDialog()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
||||
|
|
@ -158,6 +168,7 @@ void WikiDialog::processSettings(bool load)
|
|||
Settings->endGroup();
|
||||
}
|
||||
|
||||
|
||||
void WikiDialog::OpenOrShowAddPageDialog()
|
||||
{
|
||||
RsGxsGroupId groupId = getSelectedGroup();
|
||||
|
|
@ -722,13 +733,6 @@ void WikiDialog::GroupMetaDataToGroupItemInfo(const RsGroupMetaData &groupInfo,
|
|||
groupItemInfo.icon = QIcon(IMAGE_WIKI);
|
||||
|
||||
}
|
||||
void WikiDialog::todo()
|
||||
{
|
||||
QMessageBox::information(this, "Todo",
|
||||
"<b>Open points:</b><ul>"
|
||||
"<li>Auto update Group trees"
|
||||
"</ul>");
|
||||
}
|
||||
|
||||
void WikiDialog::updateDisplay(bool complete)
|
||||
{
|
||||
|
|
@ -751,3 +755,26 @@ void WikiDialog::insertWikiGroups()
|
|||
{
|
||||
updateDisplay(true);
|
||||
}
|
||||
|
||||
void WikiDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
// Cast to the specific Wiki event
|
||||
const RsGxsWikiEvent *e = dynamic_cast<const RsGxsWikiEvent*>(event.get());
|
||||
|
||||
if(e) {
|
||||
std::cerr << "WikiDialog: Received event for group " << e->mWikiGroupId.toStdString() << std::endl;
|
||||
|
||||
switch(e->mWikiEventCode) {
|
||||
case RsWikiEventCode::UPDATED_COLLECTION:
|
||||
updateDisplay(true); // Refresh global list
|
||||
break;
|
||||
case RsWikiEventCode::UPDATED_SNAPSHOT:
|
||||
// Only refresh if we are currently looking at the changed group
|
||||
if (e->mWikiGroupId == mGroupId) {
|
||||
wikiGroupChanged(QString::fromStdString(mGroupId.toStdString()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
class WikiAddDialog;
|
||||
class WikiEditDialog;
|
||||
class UserNotify;
|
||||
|
||||
class WikiDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
|
||||
{
|
||||
|
|
@ -54,6 +55,8 @@ public:
|
|||
public:
|
||||
virtual void updateDisplay(bool complete);
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
|
||||
void OpenOrShowAddPageDialog();
|
||||
|
|
@ -73,7 +76,6 @@ private slots:
|
|||
void unsubscribeToGroup();
|
||||
void wikiGroupChanged(const QString &groupId);
|
||||
|
||||
void todo();
|
||||
void insertWikiGroups();
|
||||
|
||||
private:
|
||||
|
|
@ -87,6 +89,9 @@ private:
|
|||
std::string getSelectedPage();
|
||||
const RsGxsGroupId &getSelectedGroup();
|
||||
|
||||
uint32_t mEventHandlerId;
|
||||
void handleEvent_main_thread(std::shared_ptr<const RsEvent> event);
|
||||
|
||||
// Using GroupTreeWidget.
|
||||
void wikiSubscribe(bool subscribe);
|
||||
void GroupMetaDataToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo);
|
||||
|
|
|
|||
|
|
@ -196,14 +196,14 @@ void ChatDialog::init(const ChatId &id, const QString &title)
|
|||
|
||||
uint32_t distant_peer_status ;
|
||||
|
||||
if(rsMsgs->getDistantChatStatus(RsGxsId(peerId),distant_peer_status))
|
||||
if(rsChats->getDistantChatStatus(RsGxsId(peerId),distant_peer_status))
|
||||
{
|
||||
getChat(peerId, forceFocus ? RS_CHAT_OPEN | RS_CHAT_FOCUS : RS_CHAT_OPEN ); // use own flags
|
||||
return ;
|
||||
}
|
||||
|
||||
ChatLobbyId lid;
|
||||
if (rsMsgs->isLobbyId(peerId, lid)) {
|
||||
if (rsChats->isLobbyId(peerId, lid)) {
|
||||
getChat(peerId, (forceFocus ? (RS_CHAT_OPEN | RS_CHAT_FOCUS) : RS_CHAT_OPEN));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include "retroshare/rsstatus.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
#include "gui/chat/ChatWidget.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -165,11 +165,11 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
|||
getChatWidget()->addTitleBarWidget(inviteFriendsButton) ;
|
||||
|
||||
RsGxsId current_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, current_id);
|
||||
rsChats->getIdentityForChatLobby(lobbyId, current_id);
|
||||
|
||||
uint32_t idChooserFlag = IDCHOOSER_ID_REQUIRED;
|
||||
ChatLobbyInfo lobbyInfo ;
|
||||
if(rsMsgs->getChatLobbyInfo(lobbyId,lobbyInfo)) {
|
||||
if(rsChats->getChatLobbyInfo(lobbyId,lobbyInfo)) {
|
||||
if (lobbyInfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED) {
|
||||
idChooserFlag |= IDCHOOSER_NON_ANONYMOUS;
|
||||
}
|
||||
|
|
@ -236,7 +236,7 @@ void ChatLobbyDialog::inviteFriends()
|
|||
{
|
||||
std::cerr << " " << *it << std::endl;
|
||||
|
||||
rsMsgs->invitePeerToLobby(mChatId.toLobbyId(),*it) ;
|
||||
rsChats->invitePeerToLobby(mChatId.toLobbyId(),*it) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ void ChatLobbyDialog::init(const ChatId &/*id*/, const QString &/*title*/)
|
|||
|
||||
QString title;
|
||||
|
||||
if(rsMsgs->getChatLobbyInfo(lobbyId,linfo))
|
||||
if(rsChats->getChatLobbyInfo(lobbyId,linfo))
|
||||
{
|
||||
title = QString::fromUtf8(linfo.lobby_name.c_str());
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ void ChatLobbyDialog::init(const ChatId &/*id*/, const QString &/*title*/)
|
|||
ChatDialog::init(ChatId(lobbyId), title);
|
||||
|
||||
RsGxsId gxs_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||
rsChats->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||
|
||||
RsIdentityDetails details ;
|
||||
|
||||
|
|
@ -443,7 +443,7 @@ ChatLobbyDialog::~ChatLobbyDialog()
|
|||
// check that the lobby still exists.
|
||||
// announce leaving of lobby
|
||||
if (mChatId.isLobbyId())
|
||||
rsMsgs->sendLobbyStatusPeerLeaving(mChatId.toLobbyId());
|
||||
rsChats->sendLobbyStatusPeerLeaving(mChatId.toLobbyId());
|
||||
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
|
@ -494,12 +494,12 @@ void ChatLobbyDialog::processSettings(bool load)
|
|||
*/
|
||||
void ChatLobbyDialog::setIdentity(const RsGxsId& gxs_id)
|
||||
{
|
||||
rsMsgs->setIdentityForChatLobby(lobbyId, gxs_id) ;
|
||||
rsChats->setIdentityForChatLobby(lobbyId, gxs_id) ;
|
||||
|
||||
// get new nick name
|
||||
RsGxsId newid;
|
||||
|
||||
if (rsMsgs->getIdentityForChatLobby(lobbyId, newid))
|
||||
if (rsChats->getIdentityForChatLobby(lobbyId, newid))
|
||||
{
|
||||
RsIdentityDetails details ;
|
||||
rsIdentity->getIdDetails(gxs_id,details) ;
|
||||
|
|
@ -514,7 +514,7 @@ void ChatLobbyDialog::setIdentity(const RsGxsId& gxs_id)
|
|||
void ChatLobbyDialog::changeNickname()
|
||||
{
|
||||
RsGxsId current_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, current_id);
|
||||
rsChats->getIdentityForChatLobby(lobbyId, current_id);
|
||||
|
||||
RsGxsId new_id ;
|
||||
ownIdChooser->getChosenId(new_id) ;
|
||||
|
|
@ -583,7 +583,7 @@ void ChatLobbyDialog::updateParticipantsList()
|
|||
{
|
||||
ChatLobbyInfo linfo;
|
||||
|
||||
if(rsMsgs->getChatLobbyInfo(lobbyId,linfo))
|
||||
if(rsChats->getChatLobbyInfo(lobbyId,linfo))
|
||||
{
|
||||
ChatLobbyInfo cliInfo=linfo;
|
||||
QList<QTreeWidgetItem*> qlOldParticipants=ui.participantsList->findItems("*",Qt::MatchWildcard,COLUMN_ID);
|
||||
|
|
@ -643,7 +643,7 @@ void ChatLobbyDialog::updateParticipantsList()
|
|||
widgetitem->setIcon(COLUMN_ICON, bullet_green_128);
|
||||
|
||||
RsGxsId gxs_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||
rsChats->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||
|
||||
if (RsGxsId(participant.toStdString()) == gxs_id) widgetitem->setIcon(COLUMN_ICON, bullet_blue_128);
|
||||
|
||||
|
|
@ -739,12 +739,12 @@ void ChatLobbyDialog::distantChatParticipant()
|
|||
return;
|
||||
|
||||
RsGxsId own_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, own_id);
|
||||
rsChats->getIdentityForChatLobby(lobbyId, own_id);
|
||||
|
||||
DistantChatPeerId tunnel_id;
|
||||
uint32_t error_code ;
|
||||
|
||||
if(! rsMsgs->initiateDistantChatConnexion(gxs_id,own_id,tunnel_id,error_code))
|
||||
if(! rsChats->initiateDistantChatConnexion(gxs_id,own_id,tunnel_id,error_code))
|
||||
{
|
||||
QString error_str ;
|
||||
switch(error_code)
|
||||
|
|
@ -791,7 +791,7 @@ void ChatLobbyDialog::muteParticipant(const RsGxsId& nickname)
|
|||
std::cerr << " Mute " << std::endl;
|
||||
|
||||
RsGxsId gxs_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||
rsChats->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||
|
||||
if (gxs_id!=nickname)
|
||||
mutedParticipants.insert(nickname);
|
||||
|
|
@ -810,7 +810,7 @@ bool ChatLobbyDialog::isNicknameInLobby(const RsGxsId& nickname)
|
|||
{
|
||||
ChatLobbyInfo clinfo;
|
||||
|
||||
if(! rsMsgs->getChatLobbyInfo(lobbyId,clinfo))
|
||||
if(! rsChats->getChatLobbyInfo(lobbyId,clinfo))
|
||||
return false ;
|
||||
|
||||
return clinfo.gxs_ids.find(nickname) != clinfo.gxs_ids.end() ;
|
||||
|
|
@ -917,7 +917,7 @@ bool ChatLobbyDialog::canClose()
|
|||
// check that the lobby still exists.
|
||||
/* TODO
|
||||
ChatLobbyId lid;
|
||||
if (!rsMsgs->isLobbyId(getPeerId(), lid)) {
|
||||
if (!rsChats->isLobbyId(getPeerId(), lid)) {
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ void ChatLobbyUserNotify::iconClicked()
|
|||
{
|
||||
#if defined(Q_OS_DARWIN)
|
||||
std::list<ChatLobbyId> lobbies;
|
||||
rsMsgs->getChatLobbyList(lobbies);
|
||||
rsChats->getChatLobbyList(lobbies);
|
||||
bool doUpdate=false;
|
||||
|
||||
for (lobby_map::iterator itCL=_listMsg.begin(); itCL!=_listMsg.end();)
|
||||
|
|
@ -160,7 +160,7 @@ void ChatLobbyUserNotify::iconClicked()
|
|||
ChatLobbyId clId = *lobbyIt;
|
||||
if (clId==itCL->first) {
|
||||
ChatLobbyInfo clInfo;
|
||||
if (rsMsgs->getChatLobbyInfo(clId,clInfo))
|
||||
if (rsChats->getChatLobbyInfo(clId,clInfo))
|
||||
strLobbyName=QString::fromUtf8(clInfo.lobby_name.c_str()) ;
|
||||
bFound=true;
|
||||
break;
|
||||
|
|
@ -188,7 +188,7 @@ void ChatLobbyUserNotify::iconClicked()
|
|||
/// Tray icon Menu ///
|
||||
QMenu* trayMenu = createMenu();
|
||||
std::list<ChatLobbyId> lobbies;
|
||||
rsMsgs->getChatLobbyList(lobbies);
|
||||
rsChats->getChatLobbyList(lobbies);
|
||||
bool doUpdate=false;
|
||||
|
||||
for (lobby_map::iterator itCL=_listMsg.begin(); itCL!=_listMsg.end();)
|
||||
|
|
@ -202,7 +202,7 @@ void ChatLobbyUserNotify::iconClicked()
|
|||
ChatLobbyId clId = *lobbyIt;
|
||||
if (clId==itCL->first) {
|
||||
ChatLobbyInfo clInfo;
|
||||
if (rsMsgs->getChatLobbyInfo(clId,clInfo))
|
||||
if (rsChats->getChatLobbyInfo(clId,clInfo))
|
||||
strLobbyName=QString::fromUtf8(clInfo.lobby_name.c_str()) ;
|
||||
icoLobby=(clInfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(":/images/chat_red24.png") : FilesDefs::getIconFromQtResourcePath(":/images/chat_x24.png");
|
||||
bFound=true;
|
||||
|
|
@ -289,7 +289,7 @@ void ChatLobbyUserNotify::chatLobbyNewMessage(ChatLobbyId lobby_id, QDateTime ti
|
|||
bool bGetNickName = false;
|
||||
if (_bCheckForNickName) {
|
||||
RsGxsId gxs_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobby_id,gxs_id);
|
||||
rsChats->getIdentityForChatLobby(lobby_id,gxs_id);
|
||||
RsIdentityDetails details ;
|
||||
rsIdentity->getIdDetails(gxs_id,details) ;
|
||||
bGetNickName = checkWord(msg, QString::fromUtf8(details.mNickname.c_str()));
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#define CHATLOBBYUSERNOTIFY_H
|
||||
|
||||
#include "gui/common/UserNotify.h"
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <QDateTime>
|
||||
#include <QMetaType>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "util/qtthreadsutils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
static std::map<ChatId, int> waitingChats;
|
||||
static ChatUserNotify* instance = 0;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#ifndef CHATUSERNOTIFY_H
|
||||
#define CHATUSERNOTIFY_H
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include "gui/common/UserNotify.h"
|
||||
|
||||
// this class uses lots of global state
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rshistory.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rsplugin.h>
|
||||
|
||||
#include <QApplication>
|
||||
|
|
@ -398,7 +398,7 @@ void ChatWidget::init(const ChatId &chat_id, const QString &title)
|
|||
updateStatus(chatId, peerStatusInfo.status);
|
||||
|
||||
// initialize first custom state string
|
||||
QString customStateString = QString::fromUtf8(rsMsgs->getCustomStateString(chatId.toPeerId()).c_str());
|
||||
QString customStateString = QString::fromUtf8(rsChats->getCustomStateString(chatId.toPeerId()).c_str());
|
||||
updatePeersCustomStateString(chatId, customStateString);
|
||||
} else if (chatType() == CHATTYPE_DISTANT){
|
||||
hist_chat_type = RS_HISTORY_TYPE_DISTANT ;
|
||||
|
|
@ -517,13 +517,13 @@ uint32_t ChatWidget::maxMessageSize()
|
|||
case CHATTYPE_UNKNOWN:
|
||||
break;
|
||||
case CHATTYPE_PRIVATE:
|
||||
maxMessageSize = rsMsgs->getMaxMessageSecuritySize(RS_CHAT_TYPE_PRIVATE);
|
||||
maxMessageSize = rsChats->getMaxMessageSecuritySize(RS_CHAT_TYPE_PRIVATE);
|
||||
break;
|
||||
case CHATTYPE_LOBBY:
|
||||
maxMessageSize = rsMsgs->getMaxMessageSecuritySize(RS_CHAT_TYPE_LOBBY);
|
||||
maxMessageSize = rsChats->getMaxMessageSecuritySize(RS_CHAT_TYPE_LOBBY);
|
||||
break;
|
||||
case CHATTYPE_DISTANT:
|
||||
maxMessageSize = rsMsgs->getMaxMessageSecuritySize(RS_CHAT_TYPE_DISTANT);
|
||||
maxMessageSize = rsChats->getMaxMessageSecuritySize(RS_CHAT_TYPE_DISTANT);
|
||||
break;
|
||||
}
|
||||
return maxMessageSize;
|
||||
|
|
@ -810,7 +810,7 @@ void ChatWidget::completeNickname(bool reverse)
|
|||
// Find lobby we belong to
|
||||
ChatLobbyInfo lobby;
|
||||
|
||||
if (! rsMsgs->getChatLobbyInfo(chatId.toLobbyId(),lobby))
|
||||
if (! rsChats->getChatLobbyInfo(chatId.toLobbyId(),lobby))
|
||||
return;
|
||||
|
||||
QTextCursor cursor = ui->chatTextEdit->textCursor();
|
||||
|
|
@ -905,7 +905,7 @@ QAbstractItemModel *ChatWidget::modelFromPeers()
|
|||
// Find lobby we belong to
|
||||
ChatLobbyInfo lobby ;
|
||||
|
||||
if(! rsMsgs->getChatLobbyInfo(chatId.toLobbyId(),lobby))
|
||||
if(! rsChats->getChatLobbyInfo(chatId.toLobbyId(),lobby))
|
||||
return new QStringListModel(completer);
|
||||
|
||||
#ifndef QT_NO_CURSOR
|
||||
|
|
@ -1256,7 +1256,7 @@ void ChatWidget::updateStatusTyping()
|
|||
#ifdef ONLY_FOR_LINGUIST
|
||||
tr("is typing...");
|
||||
#endif
|
||||
rsMsgs->sendStatusString(chatId, "is typing...");
|
||||
rsChats->sendStatusString(chatId, "is typing...");
|
||||
lastStatusSendTime = time(NULL) ;
|
||||
}
|
||||
}
|
||||
|
|
@ -1322,7 +1322,7 @@ void ChatWidget::sendChat()
|
|||
#ifdef CHAT_DEBUG
|
||||
std::cout << "ChatWidget:sendChat " << std::endl;
|
||||
#endif
|
||||
rsMsgs->sendChat(chatId, msg);
|
||||
rsChats->sendChat(chatId, msg);
|
||||
|
||||
chatWidget->clear();
|
||||
// workaround for Qt bug - http://bugreports.qt.nokia.com/browse/QTBUG-2533
|
||||
|
|
@ -1673,7 +1673,7 @@ void ChatWidget::sendSticker()
|
|||
if (RsHtml::makeEmbeddedImage(sticker, encodedImage, 640*480, maxMessageSize() - 200)) { //-200 for the html stuff
|
||||
RsHtml::optimizeHtml(encodedImage, 0);
|
||||
std::string msg = encodedImage.toUtf8().constData();
|
||||
rsMsgs->sendChat(chatId, msg);
|
||||
rsChats->sendChat(chatId, msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1685,7 +1685,7 @@ void ChatWidget::clearChatHistory()
|
|||
if (chatType() == CHATTYPE_LOBBY) {
|
||||
if (notify) notify->chatLobbyCleared(chatId.toLobbyId(),"");
|
||||
}
|
||||
rsMsgs->clearChatLobby(chatId);
|
||||
rsChats->clearChatLobby(chatId);
|
||||
}
|
||||
|
||||
void ChatWidget::deleteChatHistory()
|
||||
|
|
@ -1847,7 +1847,7 @@ void ChatWidget::updateStatus(const ChatId& cid, RsStatusValue status)
|
|||
DistantChatPeerInfo dcpinfo ;
|
||||
RsIdentityDetails details ;
|
||||
|
||||
if(rsMsgs->getDistantChatStatus(chatId.toDistantChatId(),dcpinfo))
|
||||
if(rsChats->getDistantChatStatus(chatId.toDistantChatId(),dcpinfo))
|
||||
{
|
||||
if(rsIdentity->getIdDetails(dcpinfo.to_id,details))
|
||||
peerName = QString::fromUtf8( details.mNickname.c_str() ) ;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "gui/common/RsButtonOnText.h"
|
||||
#include "gui/style/RSStyle.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rsfiles.h>
|
||||
#include <retroshare/rsstatus.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <QPushButton>
|
||||
#include <algorithm>
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rstypes.h>
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::set<RsPeerId>& peer_list, int pr
|
|||
ui->headerFrame->setHeaderText(tr("Create Chat Room"));
|
||||
|
||||
RsGxsId default_identity ;
|
||||
rsMsgs->getDefaultIdentityForChatLobby(default_identity) ;
|
||||
rsChats->getDefaultIdentityForChatLobby(default_identity) ;
|
||||
|
||||
ui->idChooser_CB->loadIds(IDCHOOSER_ID_REQUIRED, default_identity);
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ void CreateLobbyDialog::createLobby()
|
|||
if(ui->pgp_signed_CB->isChecked())
|
||||
lobby_flags |= RS_CHAT_LOBBY_FLAGS_PGP_SIGNED ;
|
||||
|
||||
ChatLobbyId id = rsMsgs->createChatLobby(lobby_name,gxs_id, lobby_topic, shareList, lobby_flags);
|
||||
ChatLobbyId id = rsChats->createChatLobby(lobby_name,gxs_id, lobby_topic, shareList, lobby_flags);
|
||||
|
||||
std::cerr << "gui: Created chat room " << std::hex << id << std::dec << std::endl ;
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ void PopupChatDialog::clearOfflineMessages()
|
|||
manualDelete = true;
|
||||
// TODO
|
||||
#ifdef REMOVE
|
||||
rsMsgs->clearPrivateChatQueue(false, peerId);
|
||||
rsChats->clearPrivateChatQueue(false, peerId);
|
||||
#endif
|
||||
manualDelete = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include "ui_PopupChatDialog.h"
|
||||
#include "ChatDialog.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
class PopupChatDialog : public ChatDialog
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "rshare.h"
|
||||
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
|
||||
#define IMAGE_TYPING ":/images/white-bubble-64.png"
|
||||
|
|
@ -134,7 +134,7 @@ void PopupChatWindow::showContextMenu(QPoint)
|
|||
if (ch_id.isDistantChatId()) {
|
||||
DistantChatPeerId dc_id = ch_id.toDistantChatId();
|
||||
DistantChatPeerInfo dc_info;
|
||||
if(rsMsgs->getDistantChatStatus(dc_id, dc_info)) {
|
||||
if(rsChats->getDistantChatStatus(dc_id, dc_info)) {
|
||||
RsGxsId gxs_id = dc_info.to_id;
|
||||
if(!gxs_id.isNull() && !rsIdentity->isOwnId(gxs_id)) {
|
||||
contextMnu.addAction(votePositive);
|
||||
|
|
@ -384,7 +384,7 @@ void PopupChatWindow::getAvatar()
|
|||
if (misc::getOpenAvatarPicture(this, ba)) {
|
||||
std::cerr << "Avatar image size = " << ba.size() << std::endl ;
|
||||
|
||||
rsMsgs->setOwnAvatarData((unsigned char *)(ba.data()), ba.size()); // last char 0 included.
|
||||
rsChats->setOwnNodeAvatarData((unsigned char *)(ba.data()), ba.size()); // last char 0 included.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <QTimer>
|
||||
#include "ui_PopupChatWindow.h"
|
||||
#include <retroshare/rstypes.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
#include "gui/chat/ChatWidget.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ void PopupDistantChatDialog::init(const ChatId &chat_id, const QString &/*title*
|
|||
_tunnel_id = chat_id.toDistantChatId();
|
||||
DistantChatPeerInfo tinfo;
|
||||
|
||||
if(!rsMsgs->getDistantChatStatus(_tunnel_id,tinfo))
|
||||
if(!rsChats->getDistantChatStatus(_tunnel_id,tinfo))
|
||||
return ;
|
||||
|
||||
RsIdentityDetails iddetails ;
|
||||
|
|
@ -160,7 +160,7 @@ void PopupDistantChatDialog::handleEvent_main_thread(std::shared_ptr<const RsEve
|
|||
|
||||
{
|
||||
DistantChatPeerInfo tinfo;
|
||||
rsMsgs->getDistantChatStatus(_tunnel_id,tinfo) ;
|
||||
rsChats->getDistantChatStatus(_tunnel_id,tinfo) ;
|
||||
|
||||
if(tinfo.pending_items > 0)
|
||||
msg += QObject::tr("(some undelivered messages)") ; // we cannot use the pending_items count because it accounts for ACKS and keep alive packets as well.
|
||||
|
|
@ -190,14 +190,14 @@ void PopupDistantChatDialog::closeEvent(QCloseEvent *e)
|
|||
{
|
||||
DistantChatPeerInfo tinfo ;
|
||||
|
||||
rsMsgs->getDistantChatStatus(_tunnel_id,tinfo) ;
|
||||
rsChats->getDistantChatStatus(_tunnel_id,tinfo) ;
|
||||
|
||||
if(tinfo.status != RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED)
|
||||
{
|
||||
QString msg = tr("Closing this window will end the conversation. Unsent messages will be dropped.") ;
|
||||
|
||||
if(QMessageBox::Ok == QMessageBox::critical(NULL,tr("Close conversation?"),msg, QMessageBox::Ok | QMessageBox::Cancel))
|
||||
rsMsgs->closeDistantChatConnexion(_tunnel_id) ;
|
||||
rsChats->closeDistantChatConnexion(_tunnel_id) ;
|
||||
else
|
||||
{
|
||||
e->ignore() ;
|
||||
|
|
@ -214,7 +214,7 @@ QString PopupDistantChatDialog::getPeerName(const ChatId& /*id*/, QString& addit
|
|||
{
|
||||
DistantChatPeerInfo tinfo;
|
||||
|
||||
rsMsgs->getDistantChatStatus(_tunnel_id,tinfo) ;
|
||||
rsChats->getDistantChatStatus(_tunnel_id,tinfo) ;
|
||||
|
||||
additional_info = QString("Identity ID: ") + QString::fromStdString(tinfo.to_id.toStdString());
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ QString PopupDistantChatDialog::getOwnName() const
|
|||
{
|
||||
DistantChatPeerInfo tinfo;
|
||||
|
||||
rsMsgs->getDistantChatStatus(_tunnel_id,tinfo) ;
|
||||
rsChats->getDistantChatStatus(_tunnel_id,tinfo) ;
|
||||
|
||||
RsIdentityDetails details ;
|
||||
if(rsIdentity->getIdDetails(tinfo.own_id,details))
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <QPixmap>
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <gui/gxs/GxsIdDetails.h>
|
||||
|
|
@ -34,7 +34,7 @@ void AvatarDefs::getOwnAvatar(QPixmap &avatar, const QString& defaultImage)
|
|||
int size = 0;
|
||||
|
||||
/* get avatar */
|
||||
rsMsgs->getOwnAvatarData(data, size);
|
||||
rsChats->getOwnNodeAvatarData(data, size);
|
||||
|
||||
if (size == 0) {
|
||||
avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
|
||||
|
|
@ -52,7 +52,7 @@ bool AvatarDefs::getAvatarFromSslId(const RsPeerId& sslId, QPixmap &avatar, cons
|
|||
int size = 0;
|
||||
|
||||
/* get avatar */
|
||||
rsMsgs->getAvatarData(RsPeerId(sslId), data, size);
|
||||
rsChats->getAvatarData(RsPeerId(sslId), data, size);
|
||||
if (size == 0) {
|
||||
if (!defaultImage.isEmpty()) {
|
||||
avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
|
||||
|
|
@ -94,14 +94,14 @@ bool AvatarDefs::getAvatarFromGpgId(const RsPgpId& gpgId, QPixmap &avatar, const
|
|||
|
||||
if (gpgId == rsPeers->getGPGOwnId()) {
|
||||
/* Its me */
|
||||
rsMsgs->getOwnAvatarData(data,size);
|
||||
rsChats->getOwnNodeAvatarData(data,size);
|
||||
} else {
|
||||
/* get the first available avatar of one of the ssl ids */
|
||||
std::list<RsPeerId> sslIds;
|
||||
if (rsPeers->getAssociatedSSLIds(gpgId, sslIds)) {
|
||||
std::list<RsPeerId>::iterator sslId;
|
||||
for (sslId = sslIds.begin(); sslId != sslIds.end(); ++sslId) {
|
||||
rsMsgs->getAvatarData(*sslId, data, size);
|
||||
rsChats->getAvatarData(*sslId, data, size);
|
||||
if (size) {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <rshare.h>
|
||||
#include <retroshare/rsstatus.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
#include "util/misc.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
|
|
@ -124,7 +124,7 @@ void AvatarWidget::mouseReleaseEvent(QMouseEvent */*event*/)
|
|||
QByteArray newAvatar;
|
||||
dialog.getAvatar(newAvatar);
|
||||
|
||||
rsMsgs->setOwnAvatarData((unsigned char *)(newAvatar.data()), newAvatar.size()) ; // last char 0 included.
|
||||
rsChats->setOwnNodeAvatarData((unsigned char *)(newAvatar.data()), newAvatar.size()) ; // last char 0 included.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ void AvatarWidget::refreshStatus()
|
|||
{
|
||||
DistantChatPeerInfo dcpinfo ;
|
||||
|
||||
if(rsMsgs->getDistantChatStatus(mId.toDistantChatId(),dcpinfo))
|
||||
if(rsChats->getDistantChatStatus(mId.toDistantChatId(),dcpinfo))
|
||||
{
|
||||
switch (dcpinfo.status)
|
||||
{
|
||||
|
|
@ -321,7 +321,7 @@ void AvatarWidget::refreshAvatarImage()
|
|||
|
||||
DistantChatPeerInfo dcpinfo ;
|
||||
|
||||
if(rsMsgs->getDistantChatStatus(mId.toDistantChatId(),dcpinfo))
|
||||
if(rsChats->getDistantChatStatus(mId.toDistantChatId(),dcpinfo))
|
||||
{
|
||||
if(mFlag.isOwnId)
|
||||
AvatarDefs::getAvatarFromGxsId(dcpinfo.own_id, avatar, defaultAvatar);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include <stdint.h>
|
||||
#include <retroshare/rstypes.h>
|
||||
#include <retroshare/rsevents.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rsstatus.h>
|
||||
|
||||
namespace Ui {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "gui/gxs/GxsIdTreeWidgetItem.h"
|
||||
#include "retroshare/rsexpr.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rschats.h"
|
||||
|
||||
//#define DEBUG_MODEL
|
||||
//#define DEBUG_MODEL_INDEX
|
||||
|
|
@ -775,7 +775,7 @@ QVariant RsFriendListModel::displayRole(const EntryIndex& e, int col) const
|
|||
return QVariant(QString::fromStdString(node->node_info.id.toStdString()));
|
||||
|
||||
{
|
||||
std::string css = rsMsgs->getCustomStateString(node->node_info.id);
|
||||
std::string css = rsChats->getCustomStateString(node->node_info.id);
|
||||
|
||||
if (mDisplayStatusString)
|
||||
if(!css.empty())
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#include <QColor>
|
||||
|
||||
#include "retroshare/rsstatus.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rschats.h"
|
||||
#include "retroshare/rsmail.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
|
||||
typedef uint32_t ForumModelIndex;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <QCoreApplication>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
#include "PeerDefs.h"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <QCoreApplication>
|
||||
#include <QColor>
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
|
||||
#include "TagDefs.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rsiface.h>
|
||||
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
|
@ -163,7 +163,7 @@ void ConfCertDialog::load()
|
|||
ui.version->setText(QString::fromStdString(version));
|
||||
|
||||
/* Custom state string */
|
||||
QString statustring = QString::fromUtf8(rsMsgs->getCustomStateString(detail.id).c_str());
|
||||
QString statustring = QString::fromUtf8(rsChats->getCustomStateString(detail.id).c_str());
|
||||
ui.statusmessage->setText(statustring);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rsinit.h>
|
||||
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "gui/settings/rsharesettings.h"
|
||||
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
|
||||
#include "gui/msgs/MessageInterface.h"
|
||||
|
|
@ -43,6 +43,8 @@
|
|||
* #define DEBUG_ITEM 1
|
||||
****/
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
/** Constructor */
|
||||
ChatMsgItem::ChatMsgItem(FeedHolder *parent, uint32_t feedId, const RsPeerId &peerId, const std::string &message) :
|
||||
FeedItem(parent,feedId,NULL), mPeerId(peerId)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@
|
|||
#include "gui/common/FilesDefs.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
|
|
@ -42,6 +43,8 @@
|
|||
* #define DEBUG_ITEM 1
|
||||
****/
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
/** Constructor */
|
||||
MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, const std::string &msgId, bool isHome) :
|
||||
FeedItem(parent,feedId,NULL), mMsgId(msgId), mIsHome(isHome)
|
||||
|
|
@ -122,6 +125,7 @@ void MsgItem::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
|
|||
case RsMailStatusEventCode::TAG_CHANGED:
|
||||
case RsMailStatusEventCode::MESSAGE_RECEIVED_ACK:
|
||||
case RsMailStatusEventCode::SIGNATURE_FAILED:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "util/qtthreadsutils.h"
|
||||
#include "util/DateTime.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsrtt.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include "util/DateTime.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
|
||||
/*****
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <QDialog>
|
||||
#include <QThread>
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include "gui/chat/ChatStyle.h"
|
||||
|
||||
#include "ui_ImHistoryBrowser.h"
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#include <retroshare/rsiface.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rsstatus.h>
|
||||
#include <retroshare/rsfiles.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
|
@ -99,6 +99,8 @@
|
|||
|
||||
static const uint32_t MAX_ALLOWED_GXS_MESSAGE_SIZE = 199000;
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
class MessageItemDelegate : public QItemDelegate
|
||||
{
|
||||
public:
|
||||
|
|
@ -678,7 +680,7 @@ void MessageComposer::addConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId
|
|||
std::list<MsgInfoSummary> msgList;
|
||||
std::list<MsgInfoSummary>::const_iterator it;
|
||||
|
||||
rsMail->getMessageSummaries(Rs::Msgs::BoxName::BOX_INBOX,msgList);
|
||||
rsMail->getMessageSummaries(Rs::Mail::BoxName::BOX_INBOX,msgList);
|
||||
|
||||
// do not re-add an existing request.
|
||||
// note: the test with name() is very unsecure. We should use the ID instead.
|
||||
|
|
@ -1502,7 +1504,7 @@ bool MessageComposer::buildMessage(MessageInfo& mi)
|
|||
}
|
||||
|
||||
if(!at_least_one_gxsid)
|
||||
mi.from = Rs::Msgs::MsgAddress(rsPeers->getOwnId(),MsgAddress::MSG_ADDRESS_MODE_TO);
|
||||
mi.from = Rs::Mail::MsgAddress(rsPeers->getOwnId(),MsgAddress::MSG_ADDRESS_MODE_TO);
|
||||
else
|
||||
{
|
||||
auto gxs_id_from = RsGxsId(ui.respond_to_CB->itemData(ui.respond_to_CB->currentIndex()).toString().toStdString());
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <QMainWindow>
|
||||
#include <retroshare/rstypes.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include "ui_MessageComposer.h"
|
||||
|
||||
|
|
@ -172,8 +172,8 @@ private slots:
|
|||
void checkLength();
|
||||
|
||||
private:
|
||||
static QString buildReplyHeader(const MessageInfo &msgInfo);
|
||||
bool buildMessage(MessageInfo& mi);
|
||||
static QString buildReplyHeader(const Rs::Mail::MessageInfo &msgInfo);
|
||||
bool buildMessage(Rs::Mail::MessageInfo& mi);
|
||||
|
||||
void processSettings(bool bLoad);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,23 +29,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define USE_OLD_MAIL 1
|
||||
|
||||
#ifdef USE_OLD_MAIL
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
||||
using namespace Rs::Msgs;
|
||||
|
||||
#define rsMail rsMsgs
|
||||
|
||||
#else
|
||||
|
||||
#include <retroshare/rsmail.h>
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
#endif
|
||||
|
||||
#include <retroshare/rsmail.h>
|
||||
|
||||
#endif // MRK_MESSAGE_INTERFACE
|
||||
|
|
|
|||
|
|
@ -34,10 +34,12 @@
|
|||
#include "gui/gxs/GxsIdTreeWidgetItem.h"
|
||||
#include "MessageModel.h"
|
||||
#include "retroshare/rsexpr.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rsmail.h"
|
||||
|
||||
//#define DEBUG_MESSAGE_MODEL
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
#define IS_MESSAGE_UNREAD(flags) (flags & (RS_MSG_NEW | RS_MSG_UNREAD_BY_USER))
|
||||
|
||||
#define IMAGE_STAR_ON ":/images/star-on-16.png"
|
||||
|
|
@ -53,7 +55,7 @@ const QString RsMessageModel::FilterString("filtered");
|
|||
RsMessageModel::RsMessageModel(QObject *parent)
|
||||
: QAbstractItemModel(parent)
|
||||
{
|
||||
mCurrentBox = Rs::Msgs::BoxName::BOX_NONE;
|
||||
mCurrentBox = Rs::Mail::BoxName::BOX_NONE;
|
||||
mQuickViewFilter = QUICK_VIEW_ALL;
|
||||
mFilterType = FILTER_TYPE_NONE;
|
||||
mFilterStrings.clear();
|
||||
|
|
@ -92,7 +94,7 @@ int RsMessageModel::columnCount(const QModelIndex &/*parent*/) const
|
|||
return COLUMN_THREAD_NB_COLUMNS;
|
||||
}
|
||||
|
||||
bool RsMessageModel::getMessageData(const QModelIndex& i,Rs::Msgs::MessageInfo& fmpe) const
|
||||
bool RsMessageModel::getMessageData(const QModelIndex& i,Rs::Mail::MessageInfo& fmpe) const
|
||||
{
|
||||
if(!i.isValid())
|
||||
return true;
|
||||
|
|
@ -103,7 +105,7 @@ bool RsMessageModel::getMessageData(const QModelIndex& i,Rs::Msgs::MessageInfo&
|
|||
if(!convertInternalIdToMsgIndex(ref,index) || index >= mMessages.size())
|
||||
return false ;
|
||||
|
||||
return rsMsgs->getMessage(mMessages[index].msgId,fmpe);
|
||||
return rsMail->getMessage(mMessages[index].msgId,fmpe);
|
||||
}
|
||||
|
||||
bool RsMessageModel::hasChildren(const QModelIndex &parent) const
|
||||
|
|
@ -245,7 +247,7 @@ QVariant RsMessageModel::data(const QModelIndex &index, int role) const
|
|||
return QVariant() ;
|
||||
}
|
||||
|
||||
const Rs::Msgs::MsgInfoSummary& fmpe(mMessages[entry]);
|
||||
const Rs::Mail::MsgInfoSummary& fmpe(mMessages[entry]);
|
||||
|
||||
if(role == Qt::FontRole)
|
||||
{
|
||||
|
|
@ -288,10 +290,10 @@ QVariant RsMessageModel::data(const QModelIndex &index, int role) const
|
|||
}
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::textColorRole(const Rs::Msgs::MsgInfoSummary& fmpe,int /*column*/) const
|
||||
QVariant RsMessageModel::textColorRole(const Rs::Mail::MsgInfoSummary& fmpe,int /*column*/) const
|
||||
{
|
||||
Rs::Msgs::MsgTagType tags;
|
||||
rsMsgs->getMessageTagTypes(tags);
|
||||
Rs::Mail::MsgTagType tags;
|
||||
rsMail->getMessageTagTypes(tags);
|
||||
|
||||
for(auto it(fmpe.msgtags.begin());it!=fmpe.msgtags.end();++it)
|
||||
for(auto it2(tags.types.begin());it2!=tags.types.end();++it2)
|
||||
|
|
@ -301,7 +303,7 @@ QVariant RsMessageModel::textColorRole(const Rs::Msgs::MsgInfoSummary& fmpe,int
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::statusRole(const Rs::Msgs::MsgInfoSummary& /*fmpe*/,int /*column*/) const
|
||||
QVariant RsMessageModel::statusRole(const Rs::Mail::MsgInfoSummary& /*fmpe*/,int /*column*/) const
|
||||
{
|
||||
// if(column != COLUMN_THREAD_DATA)
|
||||
// return QVariant();
|
||||
|
|
@ -309,7 +311,7 @@ QVariant RsMessageModel::statusRole(const Rs::Msgs::MsgInfoSummary& /*fmpe*/,int
|
|||
return QVariant();//fmpe.mMsgStatus);
|
||||
}
|
||||
|
||||
bool RsMessageModel::passesFilter(const Rs::Msgs::MsgInfoSummary& fmpe,int /*column*/) const
|
||||
bool RsMessageModel::passesFilter(const Rs::Mail::MsgInfoSummary& fmpe,int /*column*/) const
|
||||
{
|
||||
QString s ;
|
||||
bool passes_strings = true ;
|
||||
|
|
@ -333,8 +335,8 @@ bool RsMessageModel::passesFilter(const Rs::Msgs::MsgInfoSummary& fmpe,int /*col
|
|||
case FILTER_TYPE_DATE: s = displayRole(fmpe,COLUMN_THREAD_DATE).toString();
|
||||
break;
|
||||
case FILTER_TYPE_CONTENT: {
|
||||
Rs::Msgs::MessageInfo minfo;
|
||||
rsMsgs->getMessage(fmpe.msgId,minfo);
|
||||
Rs::Mail::MessageInfo minfo;
|
||||
rsMail->getMessage(fmpe.msgId,minfo);
|
||||
s = QTextDocument(QString::fromUtf8(minfo.msg.c_str())).toPlainText();
|
||||
}
|
||||
break;
|
||||
|
|
@ -343,8 +345,8 @@ bool RsMessageModel::passesFilter(const Rs::Msgs::MsgInfoSummary& fmpe,int /*col
|
|||
|
||||
case FILTER_TYPE_ATTACHMENTS:
|
||||
{
|
||||
Rs::Msgs::MessageInfo minfo;
|
||||
rsMsgs->getMessage(fmpe.msgId,minfo);
|
||||
Rs::Mail::MessageInfo minfo;
|
||||
rsMail->getMessage(fmpe.msgId,minfo);
|
||||
|
||||
for(auto it(minfo.files.begin());it!=minfo.files.end();++it)
|
||||
s += QString::fromUtf8((*it).fname.c_str())+" ";
|
||||
|
|
@ -375,7 +377,7 @@ bool RsMessageModel::passesFilter(const Rs::Msgs::MsgInfoSummary& fmpe,int /*col
|
|||
return passes_quick_view && passes_strings;
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::filterRole(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
||||
QVariant RsMessageModel::filterRole(const Rs::Mail::MsgInfoSummary& fmpe,int column) const
|
||||
{
|
||||
if(passesFilter(fmpe,column))
|
||||
return QVariant(FilterString);
|
||||
|
|
@ -414,7 +416,7 @@ void RsMessageModel::setFont(const QFont &font)
|
|||
}
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::toolTipRole(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
||||
QVariant RsMessageModel::toolTipRole(const Rs::Mail::MsgInfoSummary& fmpe,int column) const
|
||||
{
|
||||
if(column == COLUMN_THREAD_AUTHOR || column == COLUMN_THREAD_TO)
|
||||
{
|
||||
|
|
@ -443,7 +445,7 @@ QVariant RsMessageModel::toolTipRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::backgroundRole(const Rs::Msgs::MsgInfoSummary &/*fmpe*/, int /*column*/) const
|
||||
QVariant RsMessageModel::backgroundRole(const Rs::Mail::MsgInfoSummary &/*fmpe*/, int /*column*/) const
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
|
|
@ -462,12 +464,12 @@ QVariant RsMessageModel::sizeHintRole(int col) const
|
|||
}
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::authorRole(const Rs::Msgs::MsgInfoSummary& /*fmpe*/,int /*column*/) const
|
||||
QVariant RsMessageModel::authorRole(const Rs::Mail::MsgInfoSummary& /*fmpe*/,int /*column*/) const
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::sortRole(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
||||
QVariant RsMessageModel::sortRole(const Rs::Mail::MsgInfoSummary& fmpe,int column) const
|
||||
{
|
||||
switch(column)
|
||||
{
|
||||
|
|
@ -493,7 +495,7 @@ QVariant RsMessageModel::sortRole(const Rs::Msgs::MsgInfoSummary& fmpe,int colum
|
|||
}
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int col) const
|
||||
QVariant RsMessageModel::displayRole(const Rs::Mail::MsgInfoSummary& fmpe,int col) const
|
||||
{
|
||||
switch(col)
|
||||
{
|
||||
|
|
@ -511,11 +513,11 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
|||
|
||||
case COLUMN_THREAD_TAGS:{
|
||||
// Tags
|
||||
Rs::Msgs::MsgTagInfo tagInfo;
|
||||
rsMsgs->getMessageTag(fmpe.msgId, tagInfo);
|
||||
Rs::Mail::MsgTagInfo tagInfo;
|
||||
rsMail->getMessageTag(fmpe.msgId, tagInfo);
|
||||
|
||||
Rs::Msgs::MsgTagType Tags;
|
||||
rsMsgs->getMessageTagTypes(Tags);
|
||||
Rs::Mail::MsgTagType Tags;
|
||||
rsMail->getMessageTagTypes(Tags);
|
||||
|
||||
QString text;
|
||||
|
||||
|
|
@ -539,9 +541,9 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
|||
|
||||
switch(mCurrentBox)
|
||||
{
|
||||
case Rs::Msgs::BoxName::BOX_DRAFTS: // in this case, we display the full list of destinations
|
||||
case Rs::Msgs::BoxName::BOX_TRASH: // in this case, we display the full list of destinations
|
||||
case Rs::Msgs::BoxName::BOX_SENT: // in this case, we display the full list of destinations
|
||||
case Rs::Mail::BoxName::BOX_DRAFTS: // in this case, we display the full list of destinations
|
||||
case Rs::Mail::BoxName::BOX_TRASH: // in this case, we display the full list of destinations
|
||||
case Rs::Mail::BoxName::BOX_SENT: // in this case, we display the full list of destinations
|
||||
{
|
||||
for(auto d:fmpe.destinations)
|
||||
{
|
||||
|
|
@ -556,9 +558,9 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
|||
return name;
|
||||
}
|
||||
break;
|
||||
case Rs::Msgs::BoxName::BOX_NONE: // in these cases, we display the actual destination
|
||||
case Rs::Msgs::BoxName::BOX_INBOX: // in these cases, we display the actual destination
|
||||
case Rs::Msgs::BoxName::BOX_OUTBOX:
|
||||
case Rs::Mail::BoxName::BOX_NONE: // in these cases, we display the actual destination
|
||||
case Rs::Mail::BoxName::BOX_INBOX: // in these cases, we display the actual destination
|
||||
case Rs::Mail::BoxName::BOX_OUTBOX:
|
||||
{
|
||||
RsGxsId id = RsGxsId(fmpe.to.toStdString()); // use "to" field, which is populated in Outbox, .
|
||||
if(id.isNull())
|
||||
|
|
@ -592,7 +594,7 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
|||
return QVariant("[ERROR]");
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::userRole(const Rs::Msgs::MsgInfoSummary& fmpe,int col) const
|
||||
QVariant RsMessageModel::userRole(const Rs::Mail::MsgInfoSummary& fmpe,int col) const
|
||||
{
|
||||
switch(col)
|
||||
{
|
||||
|
|
@ -615,7 +617,7 @@ QVariant RsMessageModel::userRole(const Rs::Msgs::MsgInfoSummary& fmpe,int col)
|
|||
}
|
||||
}
|
||||
|
||||
QVariant RsMessageModel::decorationRole(const Rs::Msgs::MsgInfoSummary& fmpe,int col) const
|
||||
QVariant RsMessageModel::decorationRole(const Rs::Mail::MsgInfoSummary& fmpe,int col) const
|
||||
{
|
||||
bool exist=false;
|
||||
switch(col)
|
||||
|
|
@ -674,7 +676,7 @@ void RsMessageModel::clear()
|
|||
emit messagesLoaded();
|
||||
}
|
||||
|
||||
void RsMessageModel::setMessages(const std::list<Rs::Msgs::MsgInfoSummary>& msgs)
|
||||
void RsMessageModel::setMessages(const std::list<Rs::Mail::MsgInfoSummary>& msgs)
|
||||
{
|
||||
|
||||
clear();
|
||||
|
|
@ -700,7 +702,7 @@ void RsMessageModel::setMessages(const std::list<Rs::Msgs::MsgInfoSummary>& msgs
|
|||
emit messagesLoaded();
|
||||
}
|
||||
|
||||
void RsMessageModel::setCurrentBox(Rs::Msgs::BoxName bn)
|
||||
void RsMessageModel::setCurrentBox(Rs::Mail::BoxName bn)
|
||||
{
|
||||
if(mCurrentBox != bn)
|
||||
{
|
||||
|
|
@ -709,7 +711,7 @@ void RsMessageModel::setCurrentBox(Rs::Msgs::BoxName bn)
|
|||
}
|
||||
}
|
||||
|
||||
Rs::Msgs::BoxName RsMessageModel::currentBox() const
|
||||
Rs::Mail::BoxName RsMessageModel::currentBox() const
|
||||
{
|
||||
return mCurrentBox;
|
||||
}
|
||||
|
|
@ -732,9 +734,9 @@ void RsMessageModel::updateMessages()
|
|||
{
|
||||
emit messagesAboutToLoad();
|
||||
|
||||
std::list<Rs::Msgs::MsgInfoSummary> msgs;
|
||||
std::list<Rs::Mail::MsgInfoSummary> msgs;
|
||||
|
||||
rsMsgs->getMessageSummaries(mCurrentBox,msgs);
|
||||
rsMail->getMessageSummaries(mCurrentBox,msgs);
|
||||
setMessages(msgs);
|
||||
|
||||
emit messagesLoaded();
|
||||
|
|
@ -746,7 +748,7 @@ void RsMessageModel::setMsgReadStatus(const QModelIndex& i,bool read_status)
|
|||
return ;
|
||||
|
||||
preMods();
|
||||
rsMsgs->MessageRead(i.data(MsgIdRole).toString().toStdString(),!read_status);
|
||||
rsMail->MessageRead(i.data(MsgIdRole).toString().toStdString(),!read_status);
|
||||
|
||||
emit dataChanged(i,i);
|
||||
}
|
||||
|
|
@ -766,7 +768,7 @@ void RsMessageModel::setMsgsReadStatus(const QModelIndexList& mil,bool read_stat
|
|||
|
||||
preMods();
|
||||
for(auto& it : list)
|
||||
rsMsgs->MessageRead(it,!read_status);
|
||||
rsMail->MessageRead(it,!read_status);
|
||||
|
||||
emit dataChanged(createIndex(start,0),createIndex(stop,RsMessageModel::columnCount()-1));
|
||||
}
|
||||
|
|
@ -777,7 +779,7 @@ void RsMessageModel::setMsgStar(const QModelIndex& i,bool star)
|
|||
return ;
|
||||
|
||||
preMods();
|
||||
rsMsgs->MessageStar(i.data(MsgIdRole).toString().toStdString(),star);
|
||||
rsMail->MessageStar(i.data(MsgIdRole).toString().toStdString(),star);
|
||||
|
||||
emit dataChanged(i,i);
|
||||
}
|
||||
|
|
@ -797,7 +799,7 @@ void RsMessageModel::setMsgsStar(const QModelIndexList& mil,bool star)
|
|||
|
||||
preMods();
|
||||
for(auto& it : list)
|
||||
rsMsgs->MessageStar(it,star);
|
||||
rsMail->MessageStar(it,star);
|
||||
|
||||
emit dataChanged(createIndex(start,0),createIndex(stop,RsMessageModel::columnCount()-1));
|
||||
}
|
||||
|
|
@ -808,7 +810,7 @@ void RsMessageModel::setMsgJunk(const QModelIndex& i,bool junk)
|
|||
return ;
|
||||
|
||||
preMods();
|
||||
rsMsgs->MessageJunk(i.data(MsgIdRole).toString().toStdString(),junk);
|
||||
rsMail->MessageJunk(i.data(MsgIdRole).toString().toStdString(),junk);
|
||||
|
||||
emit dataChanged(i,i);
|
||||
}
|
||||
|
|
@ -828,7 +830,7 @@ void RsMessageModel::setMsgsJunk(const QModelIndexList& mil,bool junk)
|
|||
|
||||
preMods();
|
||||
for(auto& it : list)
|
||||
rsMsgs->MessageJunk(it,junk);
|
||||
rsMail->MessageJunk(it,junk);
|
||||
|
||||
emit dataChanged(createIndex(start,0),createIndex(stop,RsMessageModel::columnCount()-1));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <QColor>
|
||||
#include <QFont>
|
||||
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rsmail.h"
|
||||
|
||||
// This class holds the actual hierarchy of posts, represented by identifiers
|
||||
// It is responsible for auto-updating when necessary and holds a mutex to allow the Model to
|
||||
|
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
enum QuickViewFilter {
|
||||
QUICK_VIEW_ALL = 0x00,
|
||||
QUICK_VIEW_IMPORTANT = 0x01, // These numbers have been carefuly chosen to match the ones in rsmsgs.h
|
||||
QUICK_VIEW_IMPORTANT = 0x01, // These numbers have been carefuly chosen to match the ones in rsmail.h
|
||||
QUICK_VIEW_WORK = 0x02,
|
||||
QUICK_VIEW_PERSONAL = 0x03,
|
||||
QUICK_VIEW_TODO = 0x04,
|
||||
|
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
enum FilterType {
|
||||
FILTER_TYPE_NONE = 0x00,
|
||||
FILTER_TYPE_SUBJECT = 0x01, // These numbers have been carefuly chosen to match the ones in rsmsgs.h
|
||||
FILTER_TYPE_SUBJECT = 0x01, // These numbers have been carefuly chosen to match the ones in rsmail.h
|
||||
FILTER_TYPE_FROM = 0x02,
|
||||
FILTER_TYPE_TO = 0x03,
|
||||
FILTER_TYPE_DATE = 0x04,
|
||||
|
|
@ -100,8 +100,8 @@ public:
|
|||
|
||||
// This method will asynchroneously update the data
|
||||
|
||||
void setCurrentBox(Rs::Msgs::BoxName bn) ;
|
||||
Rs::Msgs::BoxName currentBox() const ;
|
||||
void setCurrentBox(Rs::Mail::BoxName bn) ;
|
||||
Rs::Mail::BoxName currentBox() const ;
|
||||
void setQuickViewFilter(QuickViewFilter fn) ;
|
||||
|
||||
void setFilter(FilterType filter_type, const QStringList& strings) ;
|
||||
|
|
@ -118,22 +118,22 @@ public:
|
|||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
bool getMessageData(const QModelIndex& i,Rs::Msgs::MessageInfo& fmpe) const;
|
||||
bool getMessageData(const QModelIndex& i,Rs::Mail::MessageInfo& fmpe) const;
|
||||
void clear() ;
|
||||
|
||||
QVariant sizeHintRole (int col) const;
|
||||
|
||||
QVariant displayRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant decorationRole(const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant toolTipRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant userRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant statusRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant authorRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant sortRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant fontRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant filterRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant textColorRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant backgroundRole(const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant displayRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant decorationRole(const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant toolTipRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant userRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant statusRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant authorRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant sortRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant fontRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant filterRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant textColorRole (const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
QVariant backgroundRole(const Rs::Mail::MsgInfoSummary& fmpe, int col) const;
|
||||
|
||||
#ifdef DEBUG_MESSAGE_MODEL
|
||||
/*!
|
||||
|
|
@ -159,7 +159,7 @@ signals:
|
|||
void messagesAboutToLoad();
|
||||
|
||||
private:
|
||||
bool passesFilter(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const;
|
||||
bool passesFilter(const Rs::Mail::MsgInfoSummary& fmpe,int column) const;
|
||||
|
||||
void preMods() ;
|
||||
void postMods() ;
|
||||
|
|
@ -174,7 +174,7 @@ private:
|
|||
|
||||
uint32_t updateFilterStatus(ForumModelIndex i,int column,const QStringList& strings);
|
||||
|
||||
void setMessages(const std::list<Rs::Msgs::MsgInfoSummary>& msgs);
|
||||
void setMessages(const std::list<Rs::Mail::MsgInfoSummary>& msgs);
|
||||
|
||||
QColor mTextColorRead ;
|
||||
QColor mTextColorUnread ;
|
||||
|
|
@ -182,12 +182,12 @@ private:
|
|||
QColor mTextColorNotSubscribed ;
|
||||
QColor mTextColorMissing ;
|
||||
|
||||
Rs::Msgs::BoxName mCurrentBox ;
|
||||
Rs::Mail::BoxName mCurrentBox ;
|
||||
QuickViewFilter mQuickViewFilter ;
|
||||
QStringList mFilterStrings;
|
||||
FilterType mFilterType;
|
||||
QFont mFont;
|
||||
|
||||
std::vector<Rs::Msgs::MsgInfoSummary> mMessages;
|
||||
std::vector<Rs::Mail::MsgInfoSummary> mMessages;
|
||||
std::map<std::string,uint32_t> mMessagesMap;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsfiles.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
|
||||
/* Images for context menu icons */
|
||||
#define IMAGE_DOWNLOAD ":/icons/png/download.png"
|
||||
|
|
@ -62,6 +62,8 @@
|
|||
|
||||
#include "gui/msgs/MessageInterface.h"
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
class RsHtmlMsg : public RsHtml
|
||||
{
|
||||
public:
|
||||
|
|
@ -687,7 +689,7 @@ void MessageWidget::fill(const std::string &msgId)
|
|||
// link.createMessage(ownId, "");
|
||||
// }
|
||||
|
||||
if(msgInfo.from.type()==Rs::Msgs::MsgAddress::MSG_ADDRESS_TYPE_RSGXSID) // distant message
|
||||
if(msgInfo.from.type()==Rs::Mail::MsgAddress::MSG_ADDRESS_TYPE_RSGXSID) // distant message
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.from.toGxsId()) ;
|
||||
link = RetroShareLink::createMessage(msgInfo.from.toGxsId(), "");
|
||||
|
|
|
|||
|
|
@ -25,10 +25,12 @@
|
|||
#include "TagsMenu.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
|
||||
#include "gui/msgs/MessageInterface.h"
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
/** Constructor */
|
||||
MessageWindow::MessageWindow(QWidget *parent, Qt::WindowFlags flags)
|
||||
: RWindow("MessageWindow", parent, flags)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
#include "util/RsProtectedTimer.h"
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
@ -96,6 +96,8 @@
|
|||
|
||||
// #define DEBUG_MESSAGES_DIALOG 1
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
class MessageSortFilterProxyModel: public QSortFilterProxyModel
|
||||
{
|
||||
public:
|
||||
|
|
@ -929,18 +931,18 @@ void MessagesDialog::changeBox(int box_row)
|
|||
QString placeholderText = tr("No message available in your %1.").arg(item->text());
|
||||
switch(box_row)
|
||||
{
|
||||
case ROW_INBOX: mMessageModel->setCurrentBox(Rs::Msgs::BoxName::BOX_INBOX );
|
||||
case ROW_INBOX: mMessageModel->setCurrentBox(Rs::Mail::BoxName::BOX_INBOX );
|
||||
break;
|
||||
case ROW_OUTBOX: mMessageModel->setCurrentBox(Rs::Msgs::BoxName::BOX_OUTBOX);
|
||||
case ROW_OUTBOX: mMessageModel->setCurrentBox(Rs::Mail::BoxName::BOX_OUTBOX);
|
||||
break;
|
||||
case ROW_DRAFTBOX: mMessageModel->setCurrentBox(Rs::Msgs::BoxName::BOX_DRAFTS);
|
||||
case ROW_DRAFTBOX: mMessageModel->setCurrentBox(Rs::Mail::BoxName::BOX_DRAFTS);
|
||||
break;
|
||||
case ROW_SENTBOX: mMessageModel->setCurrentBox(Rs::Msgs::BoxName::BOX_SENT );
|
||||
case ROW_SENTBOX: mMessageModel->setCurrentBox(Rs::Mail::BoxName::BOX_SENT );
|
||||
break;
|
||||
case ROW_TRASHBOX: mMessageModel->setCurrentBox(Rs::Msgs::BoxName::BOX_TRASH );
|
||||
case ROW_TRASHBOX: mMessageModel->setCurrentBox(Rs::Mail::BoxName::BOX_TRASH );
|
||||
break;
|
||||
default:
|
||||
mMessageModel->setCurrentBox(Rs::Msgs::BoxName::BOX_NONE);
|
||||
mMessageModel->setCurrentBox(Rs::Mail::BoxName::BOX_NONE);
|
||||
}
|
||||
|
||||
insertMsgTxtAndFiles(ui.messageTreeWidget->currentIndex());
|
||||
|
|
@ -955,7 +957,7 @@ void MessagesDialog::changeBox(int box_row)
|
|||
}
|
||||
else
|
||||
{
|
||||
mMessageModel->setCurrentBox(Rs::Msgs::BoxName::BOX_NONE);
|
||||
mMessageModel->setCurrentBox(Rs::Mail::BoxName::BOX_NONE);
|
||||
}
|
||||
inChange = false;
|
||||
|
||||
|
|
@ -1320,7 +1322,7 @@ void MessagesDialog::updateMessageSummaryList()
|
|||
/* calculating the new messages */
|
||||
|
||||
std::list<MsgInfoSummary> msgList;
|
||||
rsMail->getMessageSummaries(Rs::Msgs::BoxName::BOX_ALL,msgList);
|
||||
rsMail->getMessageSummaries(Rs::Mail::BoxName::BOX_ALL,msgList);
|
||||
|
||||
QMap<int, int> tagCount;
|
||||
|
||||
|
|
@ -1566,8 +1568,8 @@ void MessagesDialog::tagSet(int tagId, bool set)
|
|||
|
||||
void MessagesDialog::emptyTrash()
|
||||
{
|
||||
std::list<Rs::Msgs::MsgInfoSummary> msgs ;
|
||||
rsMsgs->getMessageSummaries(Rs::Msgs::BoxName::BOX_TRASH,msgs);
|
||||
std::list<Rs::Mail::MsgInfoSummary> msgs ;
|
||||
rsMail->getMessageSummaries(Rs::Mail::BoxName::BOX_TRASH,msgs);
|
||||
|
||||
for(auto it(msgs.begin());it!=msgs.end();++it)
|
||||
rsMail->MessageDelete(it->msgId);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
|
||||
#include "TagsMenu.h"
|
||||
#include "gui/common/TagDefs.h"
|
||||
|
|
@ -42,6 +42,8 @@
|
|||
#define ACTION_TAGS_TAG 1
|
||||
#define ACTION_TAGS_NEWTAG 2
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
TagsMenu::TagsMenu(const QString &title, QWidget *parent)
|
||||
: QMenu (title, parent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "StatusMessage.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
/** Default constructor */
|
||||
StatusMessage::StatusMessage(QWidget *parent)
|
||||
|
|
@ -32,13 +32,13 @@ 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(rsMsgs->getCustomStateString().c_str()));
|
||||
ui.txt_StatusMessage->setText(QString::fromUtf8(rsChats->getOwnCustomStateString().c_str()));
|
||||
}
|
||||
|
||||
/** Saves the changes on this page */
|
||||
void StatusMessage::save()
|
||||
{
|
||||
rsMsgs->setCustomStateString(ui.txt_StatusMessage->text().toUtf8().constData());
|
||||
rsChats->setCustomStateString(ui.txt_StatusMessage->text().toUtf8().constData());
|
||||
|
||||
accept();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "retroshare/rsconfig.h"
|
||||
#include "retroshare/rshistory.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rschats.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
|
||||
#include <QColorDialog>
|
||||
|
|
@ -153,7 +153,7 @@ void ChatPage::updateDefaultLobbyIdentity()
|
|||
{
|
||||
case GxsIdChooser::KnowId:
|
||||
case GxsIdChooser::UnKnowId:
|
||||
rsMsgs->setDefaultIdentityForChatLobby(chosen_id) ;
|
||||
rsChats->setDefaultIdentityForChatLobby(chosen_id) ;
|
||||
break ;
|
||||
|
||||
default:;
|
||||
|
|
@ -395,7 +395,7 @@ ChatPage::load()
|
|||
|
||||
// state of distant Chat combobox
|
||||
|
||||
switch(rsMsgs->getDistantChatPermissionFlags())
|
||||
switch(rsChats->getDistantChatPermissionFlags())
|
||||
{
|
||||
default:
|
||||
case RS_DISTANT_CHAT_CONTACT_PERMISSION_FLAG_FILTER_NONE:
|
||||
|
|
@ -466,7 +466,7 @@ ChatPage::load()
|
|||
historyStylePath = loadStyleInfo(ChatStyle::TYPE_HISTORY, ui.historyStyle, ui.historyComboBoxVariant, historyStyleVariant);
|
||||
|
||||
RsGxsId gxs_id ;
|
||||
rsMsgs->getDefaultIdentityForChatLobby(gxs_id) ;
|
||||
rsChats->getDefaultIdentityForChatLobby(gxs_id) ;
|
||||
|
||||
ui.chatLobbyIdentity_IC->setFlags(IDCHOOSER_ID_REQUIRED) ;
|
||||
|
||||
|
|
@ -700,13 +700,13 @@ void ChatPage::distantChatComboBoxChanged(int i)
|
|||
switch(i)
|
||||
{
|
||||
default:
|
||||
case 0: rsMsgs->setDistantChatPermissionFlags(RS_DISTANT_CHAT_CONTACT_PERMISSION_FLAG_FILTER_NONE) ;
|
||||
case 0: rsChats->setDistantChatPermissionFlags(RS_DISTANT_CHAT_CONTACT_PERMISSION_FLAG_FILTER_NONE) ;
|
||||
break ;
|
||||
|
||||
case 1: rsMsgs->setDistantChatPermissionFlags(RS_DISTANT_CHAT_CONTACT_PERMISSION_FLAG_FILTER_NON_CONTACTS) ;
|
||||
case 1: rsChats->setDistantChatPermissionFlags(RS_DISTANT_CHAT_CONTACT_PERMISSION_FLAG_FILTER_NON_CONTACTS) ;
|
||||
break ;
|
||||
|
||||
case 2: rsMsgs->setDistantChatPermissionFlags(RS_DISTANT_CHAT_CONTACT_PERMISSION_FLAG_FILTER_EVERYBODY) ;
|
||||
case 2: rsChats->setDistantChatPermissionFlags(RS_DISTANT_CHAT_CONTACT_PERMISSION_FLAG_FILTER_EVERYBODY) ;
|
||||
break ;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
|
||||
#include "rshare.h"
|
||||
#include "rsharesettings.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rschats.h"
|
||||
#include "retroshare/rsmail.h"
|
||||
|
||||
#include "MessagePage.h"
|
||||
#include "util/misc.h"
|
||||
|
|
@ -32,6 +33,8 @@
|
|||
#include "NewTag.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
MessagePage::MessagePage(QWidget * parent, Qt::WindowFlags flags)
|
||||
: ConfigPage(parent, flags)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ private:
|
|||
void handleEvent_main_thread(std::shared_ptr<const RsEvent> event);
|
||||
void fillTags();
|
||||
|
||||
/* Pointer for not include of rsmsgs.h */
|
||||
MsgTagType *m_pTags;
|
||||
/* Pointer for not include of rsmail.h */
|
||||
Rs::Mail::MsgTagType *m_pTags;
|
||||
std::list<uint32_t> m_changedTagIds;
|
||||
RsEventsHandlerId_t mTagEventHandlerId;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,12 @@
|
|||
|
||||
#include "NewTag.h"
|
||||
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rsmail.h"
|
||||
|
||||
#include <QColorDialog>
|
||||
|
||||
using namespace Rs::Mail;
|
||||
|
||||
/** Default constructor */
|
||||
NewTag::NewTag(MsgTagType &Tags, uint32_t nId /* = 0*/, QWidget *parent, Qt::WindowFlags flags)
|
||||
: QDialog(parent, flags), m_Tags(Tags)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class NewTag : public QDialog
|
|||
|
||||
public:
|
||||
/** Default constructor */
|
||||
NewTag(MsgTagType &Tags, uint32_t nId = 0, QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
NewTag(Rs::Mail::MsgTagType &Tags, uint32_t nId = 0, QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
|
||||
uint32_t m_nId;
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ private slots:
|
|||
private:
|
||||
void showColor(QRgb color);
|
||||
|
||||
MsgTagType &m_Tags;
|
||||
Rs::Mail::MsgTagType &m_Tags;
|
||||
QRgb m_Color;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <retroshare/rsinit.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
#include "RsharePeerSettings.h"
|
||||
#include "rsharesettings.h"
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
#include <QSettings>
|
||||
#include <retroshare/rstypes.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
||||
class RSStyle;
|
||||
class ChatId;
|
||||
|
||||
/** Handles saving and restoring RShares's settings for peers */
|
||||
class RsharePeerSettings : public QSettings
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#include "util/HandleRichText.h"
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rschats.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
|
||||
ChatLobbyToaster::ChatLobbyToaster(const ChatLobbyId &lobby_id, const RsGxsId &sender_id, const QString &message):
|
||||
QWidget(NULL), mLobbyId(lobby_id)
|
||||
|
|
@ -51,7 +52,7 @@ ChatLobbyToaster::ChatLobbyToaster(const ChatLobbyId &lobby_id, const RsGxsId &s
|
|||
QString lobbyName = RsHtml::plainText(idd.mNickname);
|
||||
|
||||
ChatLobbyInfo clinfo ;
|
||||
if(rsMsgs->getChatLobbyInfo(mLobbyId,clinfo))
|
||||
if(rsChats->getChatLobbyInfo(mLobbyId,clinfo))
|
||||
lobbyName += "@" + RsHtml::plainText(clinfo.lobby_name);
|
||||
|
||||
ui.toasterLabel->setText(lobbyName);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "ui_ChatLobbyToaster.h"
|
||||
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rsmail.h"
|
||||
|
||||
/**
|
||||
* Shows a toaster when a chat is incoming.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include "MessageToaster.h"
|
||||
#include "../MainWindow.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ MessageToaster::MessageToaster(const std::string &peerId, const QString &title,
|
|||
ui.textLabel->setText(message);
|
||||
ui.textLabel->setToolTip(message);
|
||||
|
||||
MessageInfo mi;
|
||||
Rs::Mail::MessageInfo mi;
|
||||
|
||||
if (!rsMail->getMessage(peerId, mi))
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#include "gui/common/AvatarDefs.h"
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsmail.h>
|
||||
#include <retroshare/rschats.h>
|
||||
|
||||
//#include <QContextMenuEvent>
|
||||
#include <QMenu>
|
||||
|
|
|
|||
|
|
@ -432,7 +432,6 @@ HEADERS += rshare.h \
|
|||
util/RsNetUtil.h \
|
||||
util/DateTime.h \
|
||||
util/RetroStyleLabel.h \
|
||||
util/dllexport.h \
|
||||
util/NonCopyable.h \
|
||||
util/rsutildll.h \
|
||||
util/dllexport.h \
|
||||
|
|
@ -1179,27 +1178,31 @@ gxsphotoshare {
|
|||
|
||||
|
||||
wikipoos {
|
||||
DEFINES += RS_USE_WIKI
|
||||
|
||||
DEPENDPATH += ../../supportlibs/pegmarkdown
|
||||
INCLUDEPATH += ../../supportlibs/pegmarkdown
|
||||
|
||||
HEADERS += gui/WikiPoos/WikiDialog.h \
|
||||
gui/WikiPoos/WikiAddDialog.h \
|
||||
gui/WikiPoos/WikiEditDialog.h \
|
||||
gui/gxs/WikiGroupDialog.h \
|
||||
message(Including WikiPoos)
|
||||
DEFINES += RS_USE_WIKI
|
||||
INCLUDEPATH += ../../supportlibs/pegmarkdown
|
||||
|
||||
FORMS += gui/WikiPoos/WikiDialog.ui \
|
||||
gui/WikiPoos/WikiAddDialog.ui \
|
||||
gui/WikiPoos/WikiEditDialog.ui \
|
||||
|
||||
SOURCES += gui/WikiPoos/WikiDialog.cpp \
|
||||
gui/WikiPoos/WikiAddDialog.cpp \
|
||||
gui/WikiPoos/WikiEditDialog.cpp \
|
||||
gui/gxs/WikiGroupDialog.cpp \
|
||||
HEADERS += gui/WikiPoos/WikiDialog.h \
|
||||
gui/WikiPoos/WikiAddDialog.h \
|
||||
gui/WikiPoos/WikiEditDialog.h \
|
||||
gui/gxs/WikiGroupDialog.h \
|
||||
gui/gxs/RsGxsUpdateBroadcastBase.h \
|
||||
gui/gxs/RsGxsUpdateBroadcastWidget.h \
|
||||
gui/gxs/RsGxsUpdateBroadcastPage.h
|
||||
|
||||
RESOURCES += gui/WikiPoos/Wiki_images.qrc
|
||||
SOURCES += gui/WikiPoos/WikiDialog.cpp \
|
||||
gui/WikiPoos/WikiAddDialog.cpp \
|
||||
gui/WikiPoos/WikiEditDialog.cpp \
|
||||
gui/gxs/WikiGroupDialog.cpp \
|
||||
gui/gxs/RsGxsUpdateBroadcastBase.cpp \
|
||||
gui/gxs/RsGxsUpdateBroadcastWidget.cpp \
|
||||
gui/gxs/RsGxsUpdateBroadcastPage.cpp
|
||||
|
||||
FORMS += gui/WikiPoos/WikiDialog.ui \
|
||||
gui/WikiPoos/WikiAddDialog.ui \
|
||||
gui/WikiPoos/WikiEditDialog.ui
|
||||
|
||||
RESOURCES += gui/WikiPoos/Wiki_images.qrc
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1474,18 +1477,6 @@ gxsgui {
|
|||
}
|
||||
|
||||
|
||||
wikipoos {
|
||||
HEADERS += \
|
||||
gui/gxs/RsGxsUpdateBroadcastBase.h \
|
||||
gui/gxs/RsGxsUpdateBroadcastWidget.h \
|
||||
gui/gxs/RsGxsUpdateBroadcastPage.h
|
||||
|
||||
SOURCES += \
|
||||
gui/gxs/RsGxsUpdateBroadcastBase.cpp \
|
||||
gui/gxs/RsGxsUpdateBroadcastWidget.cpp \
|
||||
gui/gxs/RsGxsUpdateBroadcastPage.cpp \
|
||||
}
|
||||
|
||||
################################################################
|
||||
#Define qmake_info.h file so GUI can get wath was used to compil
|
||||
# This must be at end to get all informations
|
||||
|
|
|
|||
|
|
@ -227,6 +227,10 @@ CONFIG *= rs_sam3_libsam3
|
|||
no_rs_sam3_libsam3:CONFIG -= rs_sam3_libsam3
|
||||
|
||||
|
||||
|
||||
#Wikipoos
|
||||
#CONFIG *= wikipoos
|
||||
|
||||
# Specify host precompiled jsonapi-generator path, appending the following
|
||||
# assignation to qmake command line
|
||||
# 'JSONAPI_GENERATOR_EXE=/myBuildDir/jsonapi-generator'. Required for JSON API
|
||||
|
|
@ -334,7 +338,7 @@ DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_001
|
|||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_002
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_003
|
||||
|
||||
#CONFIG += rs_v07_changes
|
||||
#CONFIG *= wikipoos rs_v07_changes
|
||||
rs_v07_changes {
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_001
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_002
|
||||
|
|
@ -532,7 +536,7 @@ versionAtLeast(CMAKE_VERSION, 3.5) {
|
|||
}
|
||||
|
||||
gxsdistsync:DEFINES *= RS_USE_GXS_DISTANT_SYNC
|
||||
wikipoos:DEFINES *= RS_USE_WIKI
|
||||
#wikipoos:DEFINES *= RS_USE_WIKI
|
||||
rs_gxs:DEFINES *= RS_ENABLE_GXS
|
||||
rs_gxs_send_all:DEFINES *= RS_GXS_SEND_ALL
|
||||
rs_service_webui_terminal_password:DEFINES *= RS_SERVICE_TERMINAL_WEBUI_PASSWORD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue