mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-24 15:05:35 -04:00
fixed popup of distant chat dialog, and display of peer names.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7406 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1c00055ea9
commit
be82951e2e
8 changed files with 32 additions and 98 deletions
|
@ -149,13 +149,10 @@ QString PopupDistantChatDialog::getPeerName(const DistantChatPeerId &id) const
|
|||
{
|
||||
RsIdentityDetails details ;
|
||||
|
||||
for(int i=0;i<3;++i)
|
||||
if(rsIdentity->getIdDetails(gxs_id,details))
|
||||
return QString::fromUtf8( details.mNickname.c_str() ) ;
|
||||
else
|
||||
usleep(500000) ; // sleep for 500 msec.
|
||||
|
||||
return QString::fromStdString(id.toStdString()) ;
|
||||
if(rsIdentity->getIdDetails(gxs_id,details))
|
||||
return QString::fromUtf8( details.mNickname.c_str() ) ;
|
||||
else
|
||||
return QString::fromStdString(gxs_id.toStdString()) ;
|
||||
}
|
||||
else
|
||||
return ChatDialog::getPeerName(id) ;
|
||||
|
|
|
@ -136,6 +136,8 @@ NotifyQt::NotifyQt() : cDialog(NULL)
|
|||
QMutexLocker m(&_mutex) ;
|
||||
_enabled = false ;
|
||||
}
|
||||
|
||||
connect(this,SIGNAL(raiseChatWindow(QString)),this,SLOT(raiseChatWindow_slot(QString)),Qt::QueuedConnection) ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyErrorMsg(int list, int type, std::string msg)
|
||||
|
@ -507,6 +509,11 @@ void NotifyQt::notifyChatLobbyEvent(uint64_t lobby_id,uint32_t event_type,const
|
|||
emit chatLobbyEvent(lobby_id,event_type,QString::fromUtf8(nickname.c_str()),QString::fromUtf8(str.c_str())) ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyChatShow(const std::string& peer_id)
|
||||
{
|
||||
emit raiseChatWindow(RsPeerId(peer_id)) ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyChatStatus(const std::string& peer_id,const std::string& status_string,bool is_private)
|
||||
{
|
||||
{
|
||||
|
@ -521,6 +528,11 @@ void NotifyQt::notifyChatStatus(const std::string& peer_id,const std::string& st
|
|||
emit chatStatusChanged(QString::fromStdString(peer_id),QString::fromUtf8(status_string.c_str()),is_private) ;
|
||||
}
|
||||
|
||||
void NotifyQt::raiseChatWindow_slot(const RsPeerId& peer_str)
|
||||
{
|
||||
ChatDialog::chatFriend(peer_str) ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& files)
|
||||
{
|
||||
{
|
||||
|
@ -1167,85 +1179,3 @@ void NotifyQt::runningTick()
|
|||
}
|
||||
}
|
||||
|
||||
//void NotifyQt::displaySearch()
|
||||
//{
|
||||
// iface->lockData(); /* Lock Interface */
|
||||
//
|
||||
//#ifdef NOTIFY_DEBUG
|
||||
// std::ostringstream out;
|
||||
// std::cerr << out.str();
|
||||
//#endif
|
||||
//
|
||||
// iface->unlockData(); /* UnLock Interface */
|
||||
//}
|
||||
|
||||
// void NotifyQt::displayChat()
|
||||
// {
|
||||
// iface->lockData(); /* Lock Interface */
|
||||
//
|
||||
// #ifdef NOTIFY_DEBUG
|
||||
// std::ostringstream out;
|
||||
// std::cerr << out.str();
|
||||
// #endif
|
||||
//
|
||||
// iface->unlockData(); /* UnLock Interface */
|
||||
//
|
||||
// if (hDialog)
|
||||
// hDialog -> insertChat();
|
||||
// }
|
||||
//
|
||||
//
|
||||
//void NotifyQt::displayChannels()
|
||||
//{
|
||||
// iface->lockData(); /* Lock Interface */
|
||||
//
|
||||
//#ifdef NOTIFY_DEBUG
|
||||
// std::ostringstream out;
|
||||
// std::cerr << out.str();
|
||||
//#endif
|
||||
//
|
||||
// iface->unlockData(); /* UnLock Interface */
|
||||
//
|
||||
// if (sDialog)
|
||||
// sDialog -> insertChannels();
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void NotifyQt::displayTransfers()
|
||||
//{
|
||||
// /* Do the GUI */
|
||||
// if (tDialog)
|
||||
// tDialog->insertTransfers();
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void NotifyQt::preDisplayNeighbours()
|
||||
//{
|
||||
//
|
||||
//}
|
||||
//
|
||||
//void NotifyQt::preDisplayFriends()
|
||||
//{
|
||||
//
|
||||
//}
|
||||
|
||||
//void NotifyQt::preDisplaySearch()
|
||||
//{
|
||||
//
|
||||
//}
|
||||
//
|
||||
//void NotifyQt::preDisplayMessages()
|
||||
//{
|
||||
//
|
||||
//}
|
||||
//
|
||||
//void NotifyQt::preDisplayChannels()
|
||||
//{
|
||||
//
|
||||
//}
|
||||
//
|
||||
//void NotifyQt::preDisplayTransfers()
|
||||
//{
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
|
|
@ -42,6 +42,7 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
virtual void notifyListChange(int list, int type);
|
||||
virtual void notifyErrorMsg(int list, int sev, std::string msg);
|
||||
virtual void notifyChatStatus(const std::string& peer_id,const std::string& status_string,bool is_private);
|
||||
virtual void notifyChatShow(const std::string& peer_id) ;
|
||||
virtual void notifyCustomState(const std::string& peer_id, const std::string& status_string);
|
||||
virtual void notifyHashingInfo(uint32_t type, const std::string& fileinfo);
|
||||
virtual void notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& found_files);
|
||||
|
@ -117,6 +118,7 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
void peerStatusChangedSummary() const;
|
||||
void publicChatChanged(int type) const ;
|
||||
void privateChatChanged(int list, int type) const ;
|
||||
void raiseChatWindow(const RsPeerId&) const ;
|
||||
void groupsChanged(int type) const ;
|
||||
void discInfoChanged() const ;
|
||||
void downloadComplete(const QString& /* fileHash */);
|
||||
|
@ -141,6 +143,7 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
void runningTick();
|
||||
void handleSignatureEvent() ;
|
||||
void handleChatLobbyTimeShift(int) ;
|
||||
void raiseChatWindow_slot(const RsPeerId&) ;
|
||||
|
||||
private:
|
||||
NotifyQt();
|
||||
|
|
|
@ -373,10 +373,12 @@ int main(int argc, char *argv[])
|
|||
//
|
||||
|
||||
qRegisterMetaType<FileDetail>("FileDetail") ;
|
||||
qRegisterMetaType<RsPeerId>("RsPeerId") ;
|
||||
|
||||
std::cerr << "connecting signals and slots" << std::endl ;
|
||||
QObject::connect(notify,SIGNAL(gotTurtleSearchResult(qulonglong,FileDetail)),w->transfersDialog->searchDialog ,SLOT(updateFiles(qulonglong,FileDetail))) ;
|
||||
QObject::connect(notify,SIGNAL(deferredSignatureHandlingRequested()),notify,SLOT(handleSignatureEvent()),Qt::QueuedConnection) ;
|
||||
QObject::connect(notify,SIGNAL(raiseChatWindow(const RsPeerId&)),notify,SLOT(raiseChatWindow_slot(const RsPeerId&)),Qt::QueuedConnection) ;
|
||||
QObject::connect(notify,SIGNAL(chatLobbyTimeShift(int)),notify,SLOT(handleChatLobbyTimeShift(int)),Qt::QueuedConnection) ;
|
||||
QObject::connect(notify,SIGNAL(diskFull(int,int)) ,w ,SLOT(displayDiskSpaceWarning(int,int))) ;
|
||||
QObject::connect(notify,SIGNAL(filesPostModChanged(bool)) ,w ,SLOT(postModDirectories(bool) )) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue