mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-16 13:02:27 -04:00
Fixed display of the friend status in chat window.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5014 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
499003d875
commit
fedba02d18
6 changed files with 16 additions and 4 deletions
|
@ -162,11 +162,11 @@ void AudioPopupChatDialog::sendAudioData() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioPopupChatDialog::updateStatus(const QString& peer_id,int status)
|
void AudioPopupChatDialog::updateStatus(int status)
|
||||||
{
|
{
|
||||||
audioListenToggleButton->setEnabled(true);
|
audioListenToggleButton->setEnabled(true);
|
||||||
audioMuteCaptureToggleButton->setEnabled(true);
|
audioMuteCaptureToggleButton->setEnabled(true);
|
||||||
|
|
||||||
updateStatus(peer_id,status) ;
|
PopupChatDialog::updateStatus(status) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class AudioPopupChatDialog: public PopupChatDialog
|
||||||
QtSpeex::SpeexInputProcessor* inputProcessor;
|
QtSpeex::SpeexInputProcessor* inputProcessor;
|
||||||
QtSpeex::SpeexOutputProcessor* outputProcessor;
|
QtSpeex::SpeexOutputProcessor* outputProcessor;
|
||||||
|
|
||||||
virtual void updateStatus(const QString& peer_id,int status) ;
|
virtual void updateStatus(int status) ;
|
||||||
|
|
||||||
QPushButton *audioListenToggleButton ;
|
QPushButton *audioListenToggleButton ;
|
||||||
QPushButton *audioMuteCaptureToggleButton ;
|
QPushButton *audioMuteCaptureToggleButton ;
|
||||||
|
|
|
@ -657,6 +657,7 @@ void ChatWidget::updateStatus(const QString &peer_id, int status)
|
||||||
}
|
}
|
||||||
|
|
||||||
emit infoChanged(this);
|
emit infoChanged(this);
|
||||||
|
emit statusChanged(status);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,17 +78,18 @@ private slots:
|
||||||
void clearChatHistory();
|
void clearChatHistory();
|
||||||
void deleteChatHistory();
|
void deleteChatHistory();
|
||||||
void messageHistory();
|
void messageHistory();
|
||||||
|
void updateStatus(const QString &peer_id, int status);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void infoChanged(ChatWidget*);
|
void infoChanged(ChatWidget*);
|
||||||
void newMessage(ChatWidget*);
|
void newMessage(ChatWidget*);
|
||||||
|
void statusChanged(int);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
virtual void showEvent(QShowEvent *event);
|
virtual void showEvent(QShowEvent *event);
|
||||||
virtual void resizeEvent(QResizeEvent *event);
|
virtual void resizeEvent(QResizeEvent *event);
|
||||||
void updateTitle();
|
void updateTitle();
|
||||||
virtual void updateStatus(const QString &peer_id, int status);
|
|
||||||
void resetStatusBar() ;
|
void resetStatusBar() ;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
|
@ -52,6 +52,8 @@ PopupChatDialog::PopupChatDialog(QWidget *parent, Qt::WFlags flags)
|
||||||
|
|
||||||
void PopupChatDialog::init(const std::string &peerId, const QString &title)
|
void PopupChatDialog::init(const std::string &peerId, const QString &title)
|
||||||
{
|
{
|
||||||
|
connect(ui.chatWidget, SIGNAL(statusChanged(int)), this, SLOT(statusChanged(int)));
|
||||||
|
|
||||||
ChatDialog::init(peerId, title);
|
ChatDialog::init(peerId, title);
|
||||||
|
|
||||||
/* Hide or show the avatar frames */
|
/* Hide or show the avatar frames */
|
||||||
|
@ -227,3 +229,8 @@ void PopupChatDialog::clearOfflineMessages()
|
||||||
rsMsgs->clearPrivateChatQueue(false, peerId);
|
rsMsgs->clearPrivateChatQueue(false, peerId);
|
||||||
manualDelete = false;
|
manualDelete = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PopupChatDialog::statusChanged(int status)
|
||||||
|
{
|
||||||
|
updateStatus(status);
|
||||||
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ private slots:
|
||||||
void showAvatarFrame(bool show);
|
void showAvatarFrame(bool show);
|
||||||
void clearOfflineMessages();
|
void clearOfflineMessages();
|
||||||
void chatStatusChanged(const QString &peerId, const QString &statusString, bool isPrivateChat);
|
void chatStatusChanged(const QString &peerId, const QString &statusString, bool isPrivateChat);
|
||||||
|
void statusChanged(int);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Default constructor */
|
/** Default constructor */
|
||||||
|
@ -50,6 +51,8 @@ protected:
|
||||||
virtual ChatWidget *getChatWidget();
|
virtual ChatWidget *getChatWidget();
|
||||||
virtual bool hasPeerStatus() { return true; }
|
virtual bool hasPeerStatus() { return true; }
|
||||||
|
|
||||||
|
virtual void updateStatus(int /*status*/) {}
|
||||||
|
|
||||||
void processSettings(bool load);
|
void processSettings(bool load);
|
||||||
|
|
||||||
// used by plugins
|
// used by plugins
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue