public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-im/ktp-text-ui/files: ktp-text-ui-0.4.0-reduce-libpurple-delay.patch
@ 2012-07-19  0:43 Johannes Huber (johu)
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Huber (johu) @ 2012-07-19  0:43 UTC (permalink / raw
  To: gentoo-commits

johu        12/07/19 00:43:41

  Added:                ktp-text-ui-0.4.0-reduce-libpurple-delay.patch
  Log:
  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)

Revision  Changes    Path
1.1                  net-im/ktp-text-ui/files/ktp-text-ui-0.4.0-reduce-libpurple-delay.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/ktp-text-ui/files/ktp-text-ui-0.4.0-reduce-libpurple-delay.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/ktp-text-ui/files/ktp-text-ui-0.4.0-reduce-libpurple-delay.patch?rev=1.1&content-type=text/plain

Index: ktp-text-ui-0.4.0-reduce-libpurple-delay.patch
===================================================================
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();
     }






^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in net-im/ktp-text-ui/files: ktp-text-ui-0.4.0-reduce-libpurple-delay.patch
@ 2012-08-28 12:27 Johannes Huber (johu)
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Huber (johu) @ 2012-08-28 12:27 UTC (permalink / raw
  To: gentoo-commits

johu        12/08/28 12:27:50

  Removed:              ktp-text-ui-0.4.0-reduce-libpurple-delay.patch
  Log:
  Remove KDE Telepathy 0.4.0.
  
  (Portage version: 2.2.0_alpha123/cvs/Linux x86_64)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-28 12:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-28 12:27 [gentoo-commits] gentoo-x86 commit in net-im/ktp-text-ui/files: ktp-text-ui-0.4.0-reduce-libpurple-delay.patch Johannes Huber (johu)
  -- strict thread matches above, loose matches on Subject: below --
2012-07-19  0:43 Johannes Huber (johu)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox