mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-28 00:45:34 -04:00
merged with upstream/master
This commit is contained in:
commit
9ddef9e45b
59 changed files with 1234 additions and 303 deletions
|
@ -62,7 +62,7 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
|
|||
myChatLobbyUserNotify = NULL;
|
||||
|
||||
QObject::connect( NotifyQt::getInstance(), SIGNAL(lobbyListChanged()), SLOT(lobbyChanged()));
|
||||
QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyEvent(qulonglong,int,const QString&,const QString&)), this, SLOT(displayChatLobbyEvent(qulonglong,int,const QString&,const QString&)));
|
||||
QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyEvent(qulonglong,int,const RsGxsId&,const QString&)), this, SLOT(displayChatLobbyEvent(qulonglong,int,const RsGxsId&,const QString&)));
|
||||
QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyInviteReceived()), this, SLOT(readChatLobbyInvites()));
|
||||
|
||||
QObject::connect( ui.lobbyTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(lobbyTreeWidgetCustomPopupMenu(QPoint)));
|
||||
|
@ -1054,10 +1054,10 @@ void ChatLobbyWidget::itemDoubleClicked(QTreeWidgetItem *item, int /*column*/)
|
|||
subscribeChatLobbyAtItem(item);
|
||||
}
|
||||
|
||||
void ChatLobbyWidget::displayChatLobbyEvent(qulonglong lobby_id, int event_type, const QString& gxs_id, const QString& str)
|
||||
void ChatLobbyWidget::displayChatLobbyEvent(qulonglong lobby_id, int event_type, const RsGxsId &gxs_id, const QString& str)
|
||||
{
|
||||
if (ChatLobbyDialog *cld = dynamic_cast<ChatLobbyDialog*>(ChatDialog::getExistingChat(ChatId(lobby_id)))) {
|
||||
cld->displayLobbyEvent(event_type, RsGxsId(gxs_id.toStdString()), str);
|
||||
cld->displayLobbyEvent(event_type, gxs_id, str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ protected slots:
|
|||
void unsubscribeItem();
|
||||
void itemDoubleClicked(QTreeWidgetItem *item, int column);
|
||||
void updateCurrentLobby() ;
|
||||
void displayChatLobbyEvent(qulonglong lobby_id, int event_type, const QString& gxs_id, const QString& str);
|
||||
void displayChatLobbyEvent(qulonglong lobby_id, int event_type, const RsGxsId& gxs_id, const QString& str);
|
||||
void readChatLobbyInvites();
|
||||
void showLobby(QTreeWidgetItem *lobby_item) ;
|
||||
void showBlankPage(ChatLobbyId id) ;
|
||||
|
|
|
@ -532,7 +532,9 @@ void GenCertDialog::genPerson()
|
|||
setCursor(Qt::WaitCursor) ;
|
||||
|
||||
QCoreApplication::processEvents();
|
||||
while(QAbstractEventDispatcher::instance()->processEvents(QEventLoop::AllEvents)) ;
|
||||
QAbstractEventDispatcher* ed = QAbstractEventDispatcher::instance();
|
||||
if (ed->hasPendingEvents())
|
||||
while(ed->processEvents(QEventLoop::AllEvents));
|
||||
|
||||
std::string email_str = "" ;
|
||||
RsAccounts::GeneratePGPCertificate(
|
||||
|
|
|
@ -89,6 +89,12 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -105,7 +105,6 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WindowFlags flags)
|
|||
|
||||
connect(ui.messagelineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(savestatusmessage()));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(ownAvatarChanged()), this, SLOT(updateAvatar()));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(ownStatusMessageChanged()), this, SLOT(loadmystatusmessage()));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateOwnStatus(QString,int)));
|
||||
|
||||
|
|
|
@ -247,13 +247,18 @@ void AvatarWidget::updateStatus(int status)
|
|||
|
||||
void AvatarWidget::updateAvatar(const QString &peerId)
|
||||
{
|
||||
if(mId.isPeerId() && mId.toPeerId() == RsPeerId(peerId.toStdString()))
|
||||
refreshAvatarImage() ;
|
||||
else if(mId.isDistantChatId() && mId.toDistantChatId() == DistantChatPeerId(peerId.toStdString()))
|
||||
refreshAvatarImage() ;
|
||||
else
|
||||
std::cerr << "(EE) cannot update avatar. mId has unhandled type." << std::endl;
|
||||
if(mId.isPeerId()){
|
||||
if(mId.toPeerId() == RsPeerId(peerId.toStdString()))
|
||||
refreshAvatarImage() ;
|
||||
//else not mId so pass through
|
||||
} else if(mId.isDistantChatId()) {
|
||||
if (mId.toDistantChatId() == DistantChatPeerId(peerId.toStdString()))
|
||||
refreshAvatarImage() ;
|
||||
//else not mId so pass through
|
||||
} else
|
||||
std::cerr << "(EE) cannot update avatar. mId has unhandled type." << std::endl;
|
||||
}
|
||||
|
||||
void AvatarWidget::refreshAvatarImage()
|
||||
{
|
||||
if (mGxsId.isNull()==false)
|
||||
|
|
|
@ -73,7 +73,7 @@ void Emoticons::load()
|
|||
int i = 0;
|
||||
QString smcode;
|
||||
QString smfile;
|
||||
while(sm_codes[i] != '{')
|
||||
while(i < sm_codes.length() && sm_codes[i] != '{')
|
||||
{
|
||||
++i;
|
||||
}
|
||||
|
|
|
@ -64,8 +64,6 @@ ChatMsgItem::ChatMsgItem(FeedHolder *parent, uint32_t feedId, const RsPeerId &pe
|
|||
connect( cancelButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) );
|
||||
connect( sendButton, SIGNAL( clicked( ) ), this, SLOT( sendMessage() ) );
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
|
||||
avatar->setId(ChatId(mPeerId));
|
||||
|
||||
updateItemStatic();
|
||||
|
|
|
@ -327,29 +327,32 @@ void GxsChannelPostsWidget::filterChanged(int filter)
|
|||
|
||||
bool bVisible = text.isEmpty();
|
||||
|
||||
switch(filter)
|
||||
if (!bVisible)
|
||||
{
|
||||
case FILTER_TITLE:
|
||||
bVisible = item->getTitleLabel().contains(text,Qt::CaseInsensitive);
|
||||
break;
|
||||
case FILTER_MSG:
|
||||
bVisible = item->getMsgLabel().contains(text,Qt::CaseInsensitive);
|
||||
break;
|
||||
case FILTER_FILE_NAME:
|
||||
{
|
||||
std::list<SubFileItem *> fileItems = item->getFileItems();
|
||||
std::list<SubFileItem *>::iterator lit;
|
||||
for(lit = fileItems.begin(); lit != fileItems.end(); ++lit)
|
||||
switch(filter)
|
||||
{
|
||||
SubFileItem *fi = *lit;
|
||||
QString fileName = QString::fromUtf8(fi->FileName().c_str());
|
||||
bVisible = (bVisible || fileName.contains(text,Qt::CaseInsensitive));
|
||||
case FILTER_TITLE:
|
||||
bVisible = item->getTitleLabel().contains(text,Qt::CaseInsensitive);
|
||||
break;
|
||||
case FILTER_MSG:
|
||||
bVisible = item->getMsgLabel().contains(text,Qt::CaseInsensitive);
|
||||
break;
|
||||
case FILTER_FILE_NAME:
|
||||
{
|
||||
std::list<SubFileItem *> fileItems = item->getFileItems();
|
||||
std::list<SubFileItem *>::iterator lit;
|
||||
for(lit = fileItems.begin(); lit != fileItems.end(); ++lit)
|
||||
{
|
||||
SubFileItem *fi = *lit;
|
||||
QString fileName = QString::fromUtf8(fi->FileName().c_str());
|
||||
bVisible = (bVisible || fileName.contains(text,Qt::CaseInsensitive));
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
bVisible = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
bVisible = true;
|
||||
break;
|
||||
}
|
||||
|
||||
return bVisible;
|
||||
|
|
|
@ -104,6 +104,7 @@ NotifyQt::NotifyQt() : cDialog(NULL)
|
|||
qRegisterMetaType<ChatId>("ChatId");
|
||||
qRegisterMetaType<ChatMessage>("ChatMessage");
|
||||
qRegisterMetaType<RsGxsChanges>("RsGxsChanges");
|
||||
qRegisterMetaType<RsGxsId>("RsGxsId");
|
||||
}
|
||||
|
||||
void NotifyQt::notifyErrorMsg(int list, int type, std::string msg)
|
||||
|
@ -420,29 +421,6 @@ void NotifyQt::notifyGxsChange(const RsGxsChanges& changes)
|
|||
emit gxsChange(changes);
|
||||
}
|
||||
|
||||
#ifdef REMOVE
|
||||
void NotifyQt::notifyForumMsgReadSatusChanged(const std::string& forumId, const std::string& msgId, uint32_t status)
|
||||
{
|
||||
{
|
||||
QMutexLocker m(&_mutex) ;
|
||||
if(!_enabled)
|
||||
return ;
|
||||
}
|
||||
|
||||
emit forumMsgReadSatusChanged(QString::fromStdString(forumId), QString::fromStdString(msgId), status);
|
||||
}
|
||||
|
||||
void NotifyQt::notifyChannelMsgReadSatusChanged(const std::string& channelId, const std::string& msgId, uint32_t status)
|
||||
{
|
||||
{
|
||||
QMutexLocker m(&_mutex) ;
|
||||
if(!_enabled)
|
||||
return ;
|
||||
}
|
||||
|
||||
emit channelMsgReadSatusChanged(QString::fromStdString(channelId), QString::fromStdString(msgId), status);
|
||||
}
|
||||
#endif
|
||||
void NotifyQt::notifyOwnStatusMessageChanged()
|
||||
{
|
||||
{
|
||||
|
@ -513,7 +491,7 @@ void NotifyQt::handleChatLobbyTimeShift(int /*shift*/)
|
|||
}
|
||||
}
|
||||
|
||||
void NotifyQt::notifyChatLobbyEvent(uint64_t lobby_id,uint32_t event_type,const std::string& nickname,const std::string& str)
|
||||
void NotifyQt::notifyChatLobbyEvent(uint64_t lobby_id,uint32_t event_type,const RsGxsId& nickname,const std::string& str)
|
||||
{
|
||||
{
|
||||
QMutexLocker m(&_mutex) ;
|
||||
|
@ -524,7 +502,7 @@ void NotifyQt::notifyChatLobbyEvent(uint64_t lobby_id,uint32_t event_type,const
|
|||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "notifyQt: Received chat lobby event message: lobby #" << std::hex << lobby_id << std::dec << ", event=" << event_type << ", str=\"" << str << "\"" << std::endl ;
|
||||
#endif
|
||||
emit chatLobbyEvent(lobby_id,event_type,QString::fromUtf8(nickname.c_str()),QString::fromUtf8(str.c_str())) ;
|
||||
emit chatLobbyEvent(lobby_id,event_type,nickname,QString::fromUtf8(str.c_str())) ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyChatStatus(const ChatId& chat_id,const std::string& status_string)
|
||||
|
|
|
@ -49,7 +49,7 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
virtual void notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& found_files);
|
||||
virtual void notifyPeerHasNewAvatar(std::string peer_id) ;
|
||||
virtual void notifyOwnAvatarChanged() ;
|
||||
virtual void notifyChatLobbyEvent(uint64_t /* lobby id */,uint32_t /* event type */,const std::string& /*nickname*/,const std::string& /* any string */) ;
|
||||
virtual void notifyChatLobbyEvent(uint64_t /* lobby id */, uint32_t /* event type */, const RsGxsId & /*nickname*/, const std::string& /* any string */) ;
|
||||
virtual void notifyChatLobbyTimeShift(int time_shift) ;
|
||||
|
||||
virtual void notifyOwnStatusMessageChanged() ;
|
||||
|
@ -61,10 +61,6 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
|
||||
virtual void notifyGxsChange(const RsGxsChanges& change);
|
||||
|
||||
#ifdef REMOVE
|
||||
virtual void notifyForumMsgReadSatusChanged(const std::string& forumId, const std::string& msgId, uint32_t status);
|
||||
virtual void notifyChannelMsgReadSatusChanged(const std::string& channelId, const std::string& msgId, uint32_t status);
|
||||
#endif
|
||||
virtual void notifyHistoryChanged(uint32_t msgId, int type);
|
||||
|
||||
virtual void notifyDiscInfoChanged() ;
|
||||
|
@ -107,7 +103,7 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
void transfersChanged() const ;
|
||||
void friendsChanged() const ;
|
||||
void lobbyListChanged() const ;
|
||||
void chatLobbyEvent(qulonglong,int,const QString&,const QString&) ;
|
||||
void chatLobbyEvent(qulonglong,int,const RsGxsId&,const QString&) ;
|
||||
void neighboursChanged() const ;
|
||||
void messagesChanged() const ;
|
||||
void messagesTagsChanged() const;
|
||||
|
|
|
@ -23,7 +23,16 @@
|
|||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -103,6 +112,11 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="defaultDropAction">
|
||||
<enum>Qt::IgnoreAction</enum>
|
||||
</property>
|
||||
|
@ -165,11 +179,20 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>540</width>
|
||||
<height>495</height>
|
||||
<height>517</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue