pidgin: 3c6138e8: This patch from kkszysiu and tomkiewicz ...
rekkanoryo at pidgin.im
rekkanoryo at pidgin.im
Wed Apr 6 22:25:53 EDT 2011
----------------------------------------------------------------------
Revision: 3c6138e8de4359530c9a5bde39b23349f754281c
Parent: 86cc5a457dee4c2ec3959a16039fb3d445b511b7
Author: rekkanoryo at pidgin.im
Date: 04/06/11 21:29:17
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3c6138e8de4359530c9a5bde39b23349f754281c
Changelog:
This patch from kkszysiu and tomkiewicz implements full typing notification
support for Gadu-Gadu. Fixes #13590.
Changes against parent 86cc5a457dee4c2ec3959a16039fb3d445b511b7
patched ChangeLog
patched libpurple/protocols/gg/gg.c
-------------- next part --------------
============================================================
--- ChangeLog 1aaa32132e453e44d23b484aa0a2e712ee0c2133
+++ ChangeLog b379a53cd76c6795d0e06dffcbf9ebe56de16d8c
@@ -30,7 +30,8 @@ version 2.8.0 (??/??/????):
images. (Tomasz Wasilczyk) (#13554)
* Fix sending inline images to remote users, don't crash when
trying to send large (> 256kB) images. (Tomasz Wasilczyk) (#13580)
- * Support incoming typing notifications. (Jan Zachorowski) (#13362)
+ * Support typing notifications. (Jan Zachorowski, Tomasz Wasilczyk,
+ Krzysztof Klinikowski) (#13362, #13590)
* Require libgadu 1.10.1 to avoid using internal libgadu.
ICQ:
============================================================
--- libpurple/protocols/gg/gg.c 4ce3b37979be3737113ee163382036f938e79b8a
+++ libpurple/protocols/gg/gg.c b1a5c5902afeb2c68471212fd94fe6705dd135ac
@@ -1610,7 +1610,7 @@ static void ggp_typing_notification_hand
if (length)
serv_got_typing(gc, from, 0, PURPLE_TYPING);
else
- serv_got_typing(gc, from, 0, PURPLE_NOT_TYPING);
+ serv_got_typing_stopped(gc, from);
g_free(from);
}
@@ -2241,6 +2241,26 @@ static int ggp_send_im(PurpleConnection
return ret;
}
+static unsigned int ggp_send_typing(PurpleConnection *gc, const char *name, PurpleTypingState state)
+{
+ int dummy_length; // we don't send real length of typed message
+
+ if (state == PURPLE_TYPED) // not supported
+ return 1;
+
+ if (state == PURPLE_TYPING)
+ dummy_length = (int)g_random_int();
+ else // PURPLE_NOT_TYPING
+ dummy_length = 0;
+
+ gg_typing_notification(
+ ((GGPInfo*)gc->proto_data)->session,
+ ggp_str_to_uin(name),
+ dummy_length);
+
+ return 1; // wait 1 second before another notification
+}
+
static void ggp_get_info(PurpleConnection *gc, const char *name)
{
GGPInfo *info = gc->proto_data;
@@ -2546,7 +2566,7 @@ static PurplePluginProtocolInfo prpl_inf
ggp_close, /* close */
ggp_send_im, /* send_im */
NULL, /* set_info */
- NULL, /* send_typing */
+ ggp_send_typing, /* send_typing */
ggp_get_info, /* get_info */
ggp_set_status, /* set_away */
NULL, /* set_idle */
More information about the Commits
mailing list