[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Btelepathy-chat-handler=5D_/=3A_Added_a_new_signal_t?=
From: Lasath Fernando <kde () lasath ! org>
Date: 2011-06-26 14:01:44
Message-ID: 20110626140144.50572A60B0 () git ! kde ! org
[Download RAW message or body]
Git commit 700a410fd23e320e21f7989ac2f9d0e41d15aea8 by Lasath Fernando.
Committed on 25/06/2011 at 12:26.
Pushed by fernando into branch 'master'.
Added a new signal to relay PgUp and PgDown events from ChatTextEdit to \
AdiumThemeView
M +10 -18 app/chat-window.cpp
M +0 -5 lib/chat-widget.cpp
M +2 -5 lib/chat-widget.h
http://commits.kde.org/telepathy-chat-handler/700a410fd23e320e21f7989ac2f9d0e41d15aea8
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 517b694..6cb7395 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -196,24 +196,16 @@ void ChatWindow::onCurrentIndexChanged(int index)
onEnableSearchActions(true);
}
- if (!currentChatTab->isGroupChat()) {
- // check which capabilities the contact and user supports
- Tp::ContactCapabilities contactCapabilites = \
currentChatTab->textChannel()->targetContact()->capabilities();
- Tp::ContactCapabilities selfCapabilities = \
currentChatTab->account()->connection()->selfContact()->capabilities();
-
- setAudioCallEnabled(selfCapabilities.streamedMediaAudioCalls() && \
contactCapabilites.streamedMediaAudioCalls());
- setFileTransferEnabled(selfCapabilities.fileTransfers() && \
contactCapabilites.fileTransfers());
- setVideoCallEnabled(selfCapabilities.streamedMediaVideoCalls() && \
contactCapabilites.streamedMediaVideoCalls());
- /// TODO re-activate check when invitation to chat has been sorted out
- setInviteToChatEnabled(false);
- } else {
- // group chats don't have these functions
- setAudioCallEnabled(false);
- setFileTransferEnabled(false);
- setVideoCallEnabled(false);
- /// TODO re-activate check when invitation to chat has been sorted out
- setInviteToChatEnabled(false);
- }
+ // check which capabilities the contact and user supports
+ Tp::ContactCapabilities contactCapabilites = \
currentChatTab->textChannel()->targetContact()->capabilities(); + \
Tp::ContactCapabilities selfCapabilities = \
currentChatTab->account()->connection()->selfContact()->capabilities(); +
+ setAudioCallEnabled(selfCapabilities.streamedMediaAudioCalls() && \
contactCapabilites.streamedMediaAudioCalls()); + \
setFileTransferEnabled(selfCapabilities.fileTransfers() && \
contactCapabilites.fileTransfers()); + \
setVideoCallEnabled(selfCapabilities.streamedMediaVideoCalls() && \
contactCapabilites.streamedMediaVideoCalls()); +
+ /// TODO re-activate check when invitation to chat has been sorted out
+ setInviteToChatEnabled(false);
}
void ChatWindow::onEnableSearchActions(bool enable)
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index 89e8c97..b12162d 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -288,11 +288,6 @@ KIcon ChatWidget::icon() const
}
}
-bool ChatWidget::isGroupChat() const
-{
- return d->isGroupChat;
-}
-
ChatSearchBar* ChatWidget::chatSearchBar() const
{
return d->ui.searchBar;
diff --git a/lib/chat-widget.h b/lib/chat-widget.h
index 06e98a1..0255beb 100644
--- a/lib/chat-widget.h
+++ b/lib/chat-widget.h
@@ -48,14 +48,11 @@ public:
/** Returns pointer to account used for chat */
Tp::AccountPtr account() const;
- /** Returns a pointer to the Chatwidget's search bar */
- ChatSearchBar *chatSearchBar() const;
-
/** Returns the icon of this chat window */
KIcon icon() const;
- /** returns wether the chat is considered a group chat */
- bool isGroupChat() const;
+ /** Returns a pointer to the Chatwidget's search bar */
+ ChatSearchBar *chatSearchBar() const;
/** invalidates the use of the chat.
* @param enable flag to validate/invalidate chatWidget
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic