[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:19:20 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=c0f88cf
The following commit has been merged in the master branch:
commit c0f88cfa7affb8117ac45a0efba5f940c08b283b
Author: George Kiagiadakis <george.kiagiadakis at collabora.com>
Date: Mon Jun 6 11:18:29 2011 +0300
Show the offline icon when the connection closes.
BUG: 268693
---
lib/chat-widget.cpp | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index 99edcc1..85317bc 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -271,18 +271,22 @@ Tp::AccountPtr ChatWidget::account() const
KIcon ChatWidget::icon() const
{
- //normal chat - self and one other person.
- if (!d->isGroupChat) {
- //find the other contact which isn't self.
- foreach(const Tp::ContactPtr & contact, d->channel->groupContacts()) {
- if (contact != d->channel->groupSelfContact()) {
- return iconForPresence(contact->presence().type());
+ if (d->channel->connection()->status() == Tp::ConnectionStatusConnected) {
+ //normal chat - self and one other person.
+ if (!d->isGroupChat) {
+ //find the other contact which isn't self.
+ foreach(const Tp::ContactPtr & contact, d->channel->groupContacts()) {
+ if (contact != d->channel->groupSelfContact()) {
+ return iconForPresence(contact->presence().type());
+ }
}
}
- }
- //group chat
- return iconForPresence(Tp::ConnectionPresenceTypeAvailable);
+ //group chat
+ return iconForPresence(Tp::ConnectionPresenceTypeAvailable);
+ } else {
+ return iconForPresence(Tp::ConnectionPresenceTypeOffline);
+ }
}
ChatSearchBar* ChatWidget::chatSearchBar() const
@@ -306,6 +310,8 @@ void ChatWidget::setChatEnabled(bool enable)
statusMessage.setService(d->channel->connection()->protocolName());
statusMessage.setTime(QDateTime::currentDateTime());
d->ui.chatArea->addStatusMessage(statusMessage);
+
+ Q_EMIT iconChanged(icon());
}
void ChatWidget::setTextChannel(const Tp::TextChannelPtr &newTextChannelPtr)
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list