[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:17:45 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=f4df0fe
The following commit has been merged in the master branch:
commit f4df0fe936738a91d3c978b24c15dc671185a356
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Tue Sep 21 16:49:05 2010 +0000
Inform telepathy when our local user is composing a message
svn path=/trunk/playground/network/telepathy-chat-handler/; revision=1177911
---
lib/chatwindow.cpp | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/lib/chatwindow.cpp b/lib/chatwindow.cpp
index ca2d4bc..648c47f 100644
--- a/lib/chatwindow.cpp
+++ b/lib/chatwindow.cpp
@@ -48,6 +48,7 @@ ChatWindow::ChatWindow(ChatConnection* chat, QWidget *parent) :
connect(ui->sendMessageButton, SIGNAL(released()), SLOT(sendMessage()));
connect(ui->chatArea, SIGNAL(loadFinished(bool)), SLOT(chatViewReady()));
+ connect(ui->sendMessageBox, SIGNAL(textChanged()), SLOT(onInputBoxChanged()));
messageBoxEventFilter = new MessageBoxEventFilter(this);
ui->sendMessageBox->installEventFilter(messageBoxEventFilter);
connect(messageBoxEventFilter, SIGNAL(returnKeyPressed()), SLOT(sendMessage()));
@@ -120,6 +121,12 @@ void ChatWindow::sendMessage()
void ChatWindow::updateChatStatus(Tp::ContactPtr contact, ChannelChatState state)
{
+ //don't show our own status changes.
+ if (contact.data() == m_chatConnection->connection()->selfContact())
+ {
+ return;
+ }
+
switch (state) {
case ChannelChatStateGone: {
TelepathyChatMessageInfo statusMessage(TelepathyChatMessageInfo::Status);
@@ -198,7 +205,6 @@ void ChatWindow::updateEnabledState(bool enable)
if (enable) {
TelepathyChatInfo info;
Tp::Contacts allContacts = m_chatConnection->channel()->groupContacts();
-
//normal chat - self and one other person.
if (allContacts.size() == 2) {
//find the other contact which isn't self.
@@ -233,9 +239,18 @@ void ChatWindow::updateEnabledState(bool enable)
void ChatWindow::onInputBoxChanged()
{
//if the box is empty
- bool currentlyTyping = ui->sendMessageBox->toPlainText().isEmpty();
-
+ bool currentlyTyping = ! ui->sendMessageBox->toPlainText().isEmpty();
+ //FIXME buffer what we've sent to telepathy, make this more efficient.
+ //FIXME check spec (with olly) as to whether we have to handle idle state etc.
+ if(currentlyTyping)
+ {
+ m_chatConnection->channel()->requestChatState(Tp::ChannelChatStateComposing);
+ }
+ else
+ {
+ m_chatConnection->channel()->requestChatState(Tp::ChannelChatStateActive);
+ }
}
bool MessageBoxEventFilter::eventFilter(QObject *obj, QEvent *event)
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list