summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2012-07-19 00:43:41 +0000
committerJohannes Huber <johu@gentoo.org>2012-07-19 00:43:41 +0000
commitbbbe61377c86e7b08cff4f47f7e0e65f14a77157 (patch)
tree5c8d5b5725bde7a50aa611b68aee1ac222227c29 /net-im/ktp-text-ui
parentBeta channel update (diff)
downloadgentoo-2-bbbe61377c86e7b08cff4f47f7e0e65f14a77157.tar.gz
gentoo-2-bbbe61377c86e7b08cff4f47f7e0e65f14a77157.tar.bz2
gentoo-2-bbbe61377c86e7b08cff4f47f7e0e65f14a77157.zip
Revision bump adds upstream patch to reduce message delay in ICQ/AIM related conversations based on libpurple, spotted by genstorm.
(Portage version: 2.2.0_alpha119/cvs/Linux x86_64)
Diffstat (limited to 'net-im/ktp-text-ui')
-rw-r--r--net-im/ktp-text-ui/ChangeLog11
-rw-r--r--net-im/ktp-text-ui/files/ktp-text-ui-0.4.0-reduce-libpurple-delay.patch43
-rw-r--r--net-im/ktp-text-ui/ktp-text-ui-0.4.0-r1.ebuild41
3 files changed, 93 insertions, 2 deletions
diff --git a/net-im/ktp-text-ui/ChangeLog b/net-im/ktp-text-ui/ChangeLog
index 5471b880ff4c..3110aed7b00e 100644
--- a/net-im/ktp-text-ui/ChangeLog
+++ b/net-im/ktp-text-ui/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-im/ktp-text-ui
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/ktp-text-ui/ChangeLog,v 1.4 2012/07/13 15:03:47 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/ktp-text-ui/ChangeLog,v 1.5 2012/07/19 00:43:40 johu Exp $
+
+*ktp-text-ui-0.4.0-r1 (19 Jul 2012)
+
+ 19 Jul 2012; Johannes Huber <johu@gentoo.org>
+ +files/ktp-text-ui-0.4.0-reduce-libpurple-delay.patch,
+ +ktp-text-ui-0.4.0-r1.ebuild:
+ Revision bump adds upstream patch to reduce message delay in ICQ/AIM related
+ conversations based on libpurple, spotted by genstorm.
13 Jul 2012; Johannes Huber <johu@gentoo.org> -ktp-text-ui-0.3.0.ebuild:
Remove KDE Telepathy 0.3.0.
@@ -21,4 +29,3 @@
25 Jan 2012; Johannes Huber <johu@gentoo.org> +ktp-text-ui-0.3.0.ebuild,
+metadata.xml:
Initial import from kde overlay. Add KDE Telepathy 0.3.0.
-
diff --git a/net-im/ktp-text-ui/files/ktp-text-ui-0.4.0-reduce-libpurple-delay.patch b/net-im/ktp-text-ui/files/ktp-text-ui-0.4.0-reduce-libpurple-delay.patch
new file mode 100644
index 000000000000..bc1ad87b2fc5
--- /dev/null
+++ b/net-im/ktp-text-ui/files/ktp-text-ui-0.4.0-reduce-libpurple-delay.patch
@@ -0,0 +1,43 @@
+commit 04a419887ba7102726ae4168294da613ea58a6e2
+Author: Martin Klapetek <martin.klapetek@gmail.com>
+Date: Wed Jul 18 14:58:33 2012 +0200
+
+ Don't spam the channel with Composing state if the state actually hasn't changed
+
+ This fixes delays in messages with some accounts like ICQ/AIM, however if user sends quickly too many messages,
+ they will still be delayed (by libpurple), just considerably less. Now we're on par with Empathy and Kopete,
+ that's all we can do about it.
+
+ Reviewed-by: George Kiagiadakis
+ BUG: 300655
+ FIXED-IN: 0.4.1
+
+diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
+index e3439d8..e30d7b5 100644
+--- a/lib/chat-widget.cpp
++++ b/lib/chat-widget.cpp
+@@ -862,13 +862,21 @@ void ChatWidget::onChannelInvalidated()
+ void ChatWidget::onInputBoxChanged()
+ {
+ //if the box is empty
+- bool textBoxEmpty = !d->ui.sendMessageBox->toPlainText().isEmpty();
++ bool textBoxEmpty = d->ui.sendMessageBox->toPlainText().isEmpty();
+
+- //FIXME buffer what we've sent to telepathy, make this more efficient.
+- if(textBoxEmpty) {
++ //if the timer is active, it means the user is continuously typing
++ if (d->pausedStateTimer->isActive()) {
++ //just restart the timer and don't spam with chat state changes
++ d->pausedStateTimer->start(5000);
++ return;
++ }
++
++ if(!textBoxEmpty) {
++ //if the user has typed some text, set state to Composing and start the timer
+ d->channel->requestChatState(Tp::ChannelChatStateComposing);
+ d->pausedStateTimer->start(5000);
+ } else {
++ //if the user typed no text/cleared the input field, set Active and stop the timer
+ d->channel->requestChatState(Tp::ChannelChatStateActive);
+ d->pausedStateTimer->stop();
+ }
diff --git a/net-im/ktp-text-ui/ktp-text-ui-0.4.0-r1.ebuild b/net-im/ktp-text-ui/ktp-text-ui-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..7d659be36dc0
--- /dev/null
+++ b/net-im/ktp-text-ui/ktp-text-ui-0.4.0-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ktp-text-ui/ktp-text-ui-0.4.0-r1.ebuild,v 1.1 2012/07/19 00:43:40 johu Exp $
+
+EAPI=4
+
+KDE_LINGUAS="ca cs da de el es et fi fr ga gl hu it ja km lt nb nds nl pl pt
+pt_BR sk sr sr@ijekavian sr@ijekavianlatin sr@latin sv ug uk zh_CN zh_TW"
+KDE_SCM="git"
+inherit kde4-base
+
+DESCRIPTION="KDE Telepathy text chat window"
+HOMEPAGE="http://community.kde.org/Real-Time_Communication_and_Collaboration"
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="mirror://kde/unstable/kde-telepathy/${PV}/src/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+else
+ KEYWORDS=""
+fi
+
+LICENSE="GPL-2"
+SLOT="4"
+IUSE="debug +history"
+
+DEPEND="
+ >=net-libs/telepathy-qt-0.9.1
+ history? ( net-libs/telepathy-logger-qt )
+"
+RDEPEND="${DEPEND}
+ >=net-im/ktp-contact-list-${PV}
+"
+
+PATCHES=( "${FILESDIR}/${P}-reduce-libpurple-delay.patch" )
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_with history TelepathyLoggerQt4)
+ )
+
+ cmake-utils_src_configure
+}