Sun, 24 Feb 2008 18:21:02 +0000
merge of '1645a2a1b3fb1203c369db51ff9668e2ce3cd9f1'
and '458640401515810f0ebb68460e4f3272daa660b9'
| 11475 | 1 | /* |
| 15884 | 2 | * purple |
| 11475 | 3 | * |
| 15884 | 4 | * Purple is the legal property of its developers, whose names are too numerous |
| 11475 | 5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 6 | * source distribution. | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19064
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 11475 | 21 | * |
| 22 | */ | |
| 23 | ||
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
24 | /****************************************************************************** |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
25 | * INCLUDES |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
26 | *****************************************************************************/ |
| 11475 | 27 | #include "internal.h" |
| 28 | ||
| 29 | #include "account.h" | |
| 30 | #include "accountopt.h" | |
| 31 | #include "blist.h" | |
| 32 | #include "cipher.h" | |
| 33 | #include "cmds.h" | |
| 34 | #include "debug.h" | |
| 35 | #include "notify.h" | |
| 36 | #include "privacy.h" | |
| 37 | #include "prpl.h" | |
| 38 | #include "proxy.h" | |
| 39 | #include "request.h" | |
| 40 | #include "server.h" | |
| 41 | #include "util.h" | |
| 42 | #include "version.h" | |
| 43 | ||
| 44 | #include "yahoo.h" | |
| 45 | #include "yahoo_packet.h" | |
| 46 | #include "yahoo_friend.h" | |
| 47 | #include "yahoochat.h" | |
| 48 | #include "ycht.h" | |
| 49 | #include "yahoo_auth.h" | |
| 50 | #include "yahoo_filexfer.h" | |
| 51 | #include "yahoo_picture.h" | |
| 52 | ||
| 53 | #include "whiteboard.h" | |
| 54 | #include "yahoo_doodle.h" | |
| 55 | ||
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
56 | /****************************************************************************** |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
57 | * Globals |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
58 | *****************************************************************************/ |
|
14904
cab89db4854c
[gaim-migrate @ 17611]
Henning Norén <henning.noren@gmail.com>
parents:
14254
diff
changeset
|
59 | #if 0 |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
60 | const int DefaultColorRGB24[] = |
| 11475 | 61 | { |
| 62 | DOODLE_COLOR_RED, | |
| 63 | DOODLE_COLOR_ORANGE, | |
| 64 | DOODLE_COLOR_YELLOW, | |
| 65 | DOODLE_COLOR_GREEN, | |
| 66 | DOODLE_COLOR_CYAN, | |
| 67 | DOODLE_COLOR_BLUE, | |
| 68 | DOODLE_COLOR_VIOLET, | |
| 69 | DOODLE_COLOR_PURPLE, | |
| 70 | DOODLE_COLOR_TAN, | |
| 71 | DOODLE_COLOR_BROWN, | |
| 72 | DOODLE_COLOR_BLACK, | |
| 73 | DOODLE_COLOR_GREY, | |
| 74 | DOODLE_COLOR_WHITE | |
| 75 | }; | |
|
14904
cab89db4854c
[gaim-migrate @ 17611]
Henning Norén <henning.noren@gmail.com>
parents:
14254
diff
changeset
|
76 | #endif |
| 11475 | 77 | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
78 | /****************************************************************************** |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
79 | * Functions |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
80 | *****************************************************************************/ |
| 15884 | 81 | PurpleCmdRet yahoo_doodle_purple_cmd_start(PurpleConversation *conv, const char *cmd, char **args, char **error, void *data) |
| 11475 | 82 | { |
| 15884 | 83 | PurpleAccount *account; |
| 84 | PurpleConnection *gc; | |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
85 | const gchar *name; |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
86 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
87 | if(*args && args[0]) |
| 15884 | 88 | return PURPLE_CMD_RET_FAILED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
89 | |
| 15884 | 90 | account = purple_conversation_get_account(conv); |
| 91 | gc = purple_account_get_connection(account); | |
| 92 | name = purple_conversation_get_name(conv); | |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
93 | yahoo_doodle_initiate(gc, name); |
|
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
94 | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
95 | /* Write a local message to this conversation showing that a request for a |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
96 | * Doodle session has been made |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
97 | */ |
| 15884 | 98 | purple_conv_im_write(PURPLE_CONV_IM(conv), "", _("Sent Doodle request."), |
| 99 | PURPLE_MESSAGE_NICK | PURPLE_MESSAGE_RECV, time(NULL)); | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
100 | |
| 15884 | 101 | return PURPLE_CMD_RET_OK; |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
102 | } |
|
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
103 | |
| 15884 | 104 | void yahoo_doodle_initiate(PurpleConnection *gc, const char *name) |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
105 | { |
| 15884 | 106 | PurpleAccount *account; |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
107 | char *to = (char*)name; |
| 15884 | 108 | PurpleWhiteboard *wb; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
109 | |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
110 | g_return_if_fail(gc); |
|
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
111 | g_return_if_fail(name); |
|
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
112 | |
| 15884 | 113 | account = purple_connection_get_account(gc); |
| 114 | wb = purple_whiteboard_get_session(account, to); | |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
115 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
116 | if(wb == NULL) |
| 11475 | 117 | { |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
118 | /* Insert this 'session' in the list. At this point, it's only a |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
119 | * requested session. |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
120 | */ |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
121 | wb = purple_whiteboard_create(account, to, DOODLE_STATE_REQUESTING); |
| 11475 | 122 | } |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
123 | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
124 | /* NOTE Perhaps some careful handling of remote assumed established |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
125 | * sessions |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
126 | */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
127 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
128 | yahoo_doodle_command_send_ready(gc, to, DOODLE_IMV_KEY); |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
129 | yahoo_doodle_command_send_request(gc, to, DOODLE_IMV_KEY); |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
130 | |
| 11475 | 131 | } |
| 132 | ||
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
133 | static void yahoo_doodle_command_got_request(PurpleConnection *gc, const char *from, const char *imv_key) |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
134 | { |
| 15884 | 135 | PurpleAccount *account; |
| 136 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
137 | |
| 15884 | 138 | purple_debug_info("yahoo", "doodle: Got Request (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
139 | |
| 15884 | 140 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
141 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
142 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
143 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
144 | */ |
| 15884 | 145 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
146 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
147 | /* If a session with the remote user doesn't exist */ |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
148 | if(wb == NULL) |
| 11475 | 149 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
150 | doodle_session *ds; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
151 | /* Ask user if they wish to accept the request for a doodle session */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
152 | /* TODO Ask local user to start Doodle session with remote user */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
153 | /* NOTE This if/else statement won't work right--must use dialog |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
154 | * results |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
155 | */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
156 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
157 | /* char dialog_message[64]; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
158 | g_sprintf(dialog_message, "%s is requesting to start a Doodle session with you.", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
159 | |
| 15884 | 160 | purple_notify_message(NULL, PURPLE_NOTIFY_MSG_INFO, "Doodle", |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
161 | dialog_message, NULL, NULL, NULL); |
| 11475 | 162 | */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
163 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
164 | wb = purple_whiteboard_create(account, from, DOODLE_STATE_REQUESTED); |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
165 | ds = wb->proto_data; |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
166 | ds->imv_key = g_strdup(imv_key); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
167 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
168 | yahoo_doodle_command_send_ready(gc, from, imv_key); |
| 11475 | 169 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
170 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
171 | /* TODO Might be required to clear the canvas of an existing doodle |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
172 | * session at this point |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
173 | */ |
| 11475 | 174 | } |
| 175 | ||
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
176 | static void yahoo_doodle_command_got_ready(PurpleConnection *gc, const char *from, const char *imv_key) |
| 11475 | 177 | { |
| 15884 | 178 | PurpleAccount *account; |
| 179 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
180 | |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
181 | purple_debug_info("yahoo", "doodle: Got Ready(%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
182 | |
| 15884 | 183 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
184 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
185 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
186 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
187 | */ |
| 15884 | 188 | wb = purple_whiteboard_get_session(account, from); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
189 | |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
190 | if(wb == NULL) |
| 11475 | 191 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
192 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
193 | if(wb->state == DOODLE_STATE_REQUESTING) |
| 11475 | 194 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
195 | doodle_session *ds = wb->proto_data; |
| 15884 | 196 | purple_whiteboard_start(wb); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
197 | |
| 11475 | 198 | wb->state = DOODLE_STATE_ESTABLISHED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
199 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
200 | yahoo_doodle_command_send_confirm(gc, from, imv_key); |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
201 | /* Let's steal the imv_key and reuse it */ |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
202 | g_free(ds->imv_key); |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
203 | ds->imv_key = g_strdup(imv_key); |
| 11475 | 204 | } |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
205 | else if(wb->state == DOODLE_STATE_ESTABLISHED) |
| 11475 | 206 | { |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
207 | /* TODO Ask whether to save picture too */ |
| 15884 | 208 | purple_whiteboard_clear(wb); |
| 11475 | 209 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
210 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
211 | /* NOTE Not sure about this... I am trying to handle if the remote user |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
212 | * already thinks we're in a session with them (when their chat message |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
213 | * contains the doodle imv key) |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
214 | */ |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
215 | else if(wb->state == DOODLE_STATE_REQUESTED) |
| 11475 | 216 | { |
| 15884 | 217 | /* purple_whiteboard_start(wb); */ |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
218 | yahoo_doodle_command_send_ready(gc, from, imv_key); |
| 11475 | 219 | } |
| 220 | } | |
| 221 | ||
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
222 | static void yahoo_doodle_command_got_draw(PurpleConnection *gc, const char *from, const char *message) |
| 11475 | 223 | { |
| 15884 | 224 | PurpleAccount *account; |
| 225 | PurpleWhiteboard *wb; | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
226 | char **tokens; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
227 | int i; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
228 | GList *d_list = NULL; /* a local list of drawing info */ |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
229 | |
|
13461
914eb11fd354
[gaim-migrate @ 15835]
Daniel Atallah <datallah@pidgin.im>
parents:
13460
diff
changeset
|
230 | g_return_if_fail(message != NULL); |
|
914eb11fd354
[gaim-migrate @ 15835]
Daniel Atallah <datallah@pidgin.im>
parents:
13460
diff
changeset
|
231 | |
| 15884 | 232 | purple_debug_info("yahoo", "doodle: Got Draw (%s)\n", from); |
| 233 | purple_debug_info("yahoo", "doodle: Draw message: %s\n", message); | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
234 | |
| 15884 | 235 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
236 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
237 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
238 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
239 | */ |
| 15884 | 240 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
241 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
242 | if(wb == NULL) |
| 11475 | 243 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
244 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
245 | /* TODO Functionalize |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
246 | * Convert drawing packet message to an integer list |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
247 | */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
248 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
249 | /* Check to see if the message begans and ends with quotes */ |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
250 | if((message[0] != '\"') || (message[strlen(message) - 1] != '\"')) |
| 11475 | 251 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
252 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
253 | /* Ignore the inital quotation mark. */ |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
254 | message += 1; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
255 | |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
256 | tokens = g_strsplit(message, ",", 0); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
257 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
258 | /* Traverse and extract all integers divided by commas */ |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
259 | for (i = 0; tokens[i] != NULL; i++) |
| 11475 | 260 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
261 | int last = strlen(tokens[i]) - 1; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
262 | if (tokens[i][last] == '"') |
|
11916
ae83625b925a
[gaim-migrate @ 14207]
Mark Doliner <markdoliner@pidgin.im>
parents:
11914
diff
changeset
|
263 | tokens[i][last] = '\0'; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
264 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
265 | d_list = g_list_prepend(d_list, GINT_TO_POINTER(atoi(tokens[i]))); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
266 | } |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
267 | d_list = g_list_reverse(d_list); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
268 | |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
269 | g_strfreev(tokens); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
270 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
271 | yahoo_doodle_draw_stroke(wb, d_list); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
272 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
273 | /* goodle_doodle_session_set_canvas_as_icon(ds); */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
274 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
275 | g_list_free(d_list); |
| 11475 | 276 | } |
| 277 | ||
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
278 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
279 | static void yahoo_doodle_command_got_clear(PurpleConnection *gc, const char *from) |
| 11475 | 280 | { |
| 15884 | 281 | PurpleAccount *account; |
| 282 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
283 | |
| 15884 | 284 | purple_debug_info("yahoo", "doodle: Got Clear (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
285 | |
| 15884 | 286 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
287 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
288 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
289 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
290 | */ |
| 15884 | 291 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
292 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
293 | if(wb == NULL) |
| 11475 | 294 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
295 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
296 | if(wb->state == DOODLE_STATE_ESTABLISHED) |
| 11475 | 297 | { |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
298 | /* TODO Ask user whether to save the image before clearing it */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
299 | |
| 15884 | 300 | purple_whiteboard_clear(wb); |
| 11475 | 301 | } |
| 302 | } | |
| 303 | ||
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
304 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
305 | static void |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
306 | yahoo_doodle_command_got_extra(PurpleConnection *gc, const char *from, const char *message, const char *imv_key) |
| 11475 | 307 | { |
| 15884 | 308 | purple_debug_info("yahoo", "doodle: Got Extra (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
309 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
310 | /* I do not like these 'extra' features, so I'll only handle them in one |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
311 | * way, which is returning them with the command/packet to turn them off |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
312 | */ |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
313 | yahoo_doodle_command_send_extra(gc, from, DOODLE_EXTRA_NONE, imv_key); |
| 11475 | 314 | } |
| 315 | ||
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
316 | static void yahoo_doodle_command_got_confirm(PurpleConnection *gc, const char *from) |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
317 | { |
| 15884 | 318 | PurpleAccount *account; |
| 319 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
320 | |
| 15884 | 321 | purple_debug_info("yahoo", "doodle: Got Confirm (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
322 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
323 | /* Get the doodle session */ |
| 15884 | 324 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
325 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
326 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
327 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
328 | */ |
| 15884 | 329 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
330 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
331 | if(wb == NULL) |
| 11475 | 332 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
333 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
334 | /* TODO Combine the following IF's? */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
335 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
336 | /* Check if we requested a doodle session */ |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
337 | /*if(wb->state == DOODLE_STATE_REQUESTING) |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
338 | { |
| 11475 | 339 | wb->state = DOODLE_STATE_ESTABLISHED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
340 | |
| 15884 | 341 | purple_whiteboard_start(wb); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
342 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
343 | yahoo_doodle_command_send_confirm(gc, from); |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
344 | }*/ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
345 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
346 | /* Check if we accepted a request for a doodle session */ |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
347 | if(wb->state == DOODLE_STATE_REQUESTED) |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
348 | { |
| 11475 | 349 | wb->state = DOODLE_STATE_ESTABLISHED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
350 | |
| 15884 | 351 | purple_whiteboard_start(wb); |
| 11475 | 352 | } |
| 353 | } | |
| 354 | ||
| 15884 | 355 | void yahoo_doodle_command_got_shutdown(PurpleConnection *gc, const char *from) |
| 11475 | 356 | { |
| 15884 | 357 | PurpleAccount *account; |
| 358 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
359 | |
|
13460
5dcbdea05df4
[gaim-migrate @ 15834]
Daniel Atallah <datallah@pidgin.im>
parents:
12022
diff
changeset
|
360 | g_return_if_fail(from != NULL); |
|
5dcbdea05df4
[gaim-migrate @ 15834]
Daniel Atallah <datallah@pidgin.im>
parents:
12022
diff
changeset
|
361 | |
| 15884 | 362 | purple_debug_info("yahoo", "doodle: Got Shutdown (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
363 | |
| 15884 | 364 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
365 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
366 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
367 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
368 | */ |
| 15884 | 369 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
370 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
371 | if(wb == NULL) |
| 11475 | 372 | return; |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
373 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
374 | /* TODO Ask if user wants to save picture before the session is closed */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
375 | |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
376 | wb->state = DOODLE_STATE_CANCELED; |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
377 | purple_whiteboard_destroy(wb); |
| 11475 | 378 | } |
| 379 | ||
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
380 | static void yahoo_doodle_command_send_generic(const char *type, |
| 15884 | 381 | PurpleConnection *gc, |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
382 | const char *to, |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
383 | const char *message, |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
384 | int command, |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
385 | const char *imv, |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
386 | const char *sixtyfour) |
| 11475 | 387 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
388 | struct yahoo_data *yd; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
389 | struct yahoo_packet *pkt; |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
390 | |
| 15884 | 391 | purple_debug_info("yahoo", "doodle: Sent %s (%s)\n", type, to); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
392 | |
| 11475 | 393 | yd = gc->proto_data; |
| 394 | ||
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
395 | /* Make and send an acknowledge (ready) Doodle packet */ |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
396 | pkt = yahoo_packet_new(YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, 0); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
397 | yahoo_packet_hash_str(pkt, 49, "IMVIRONMENT"); |
| 15884 | 398 | yahoo_packet_hash_str(pkt, 1, purple_account_get_username(gc->account)); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
399 | yahoo_packet_hash_str(pkt, 14, message); |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
400 | yahoo_packet_hash_int(pkt, 13, command); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
401 | yahoo_packet_hash_str(pkt, 5, to); |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
402 | yahoo_packet_hash_str(pkt, 63, imv ? imv : DOODLE_IMV_KEY); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
403 | yahoo_packet_hash_str(pkt, 64, sixtyfour); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
404 | yahoo_packet_hash_str(pkt, 1002, "1"); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
405 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
406 | yahoo_packet_send_and_free(pkt, yd); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
407 | } |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
408 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
409 | void yahoo_doodle_command_send_ready(PurpleConnection *gc, const char *to, const char *imv_key) |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
410 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
411 | yahoo_doodle_command_send_generic("Ready", gc, to, "1", DOODLE_CMD_READY, imv_key, "1"); |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
412 | } |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
413 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
414 | void yahoo_doodle_command_send_request(PurpleConnection *gc, const char *to, const char *imv_key) |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
415 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
416 | yahoo_doodle_command_send_generic("Request", gc, to, "", DOODLE_CMD_REQUEST, imv_key, "0"); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
417 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
418 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
419 | void yahoo_doodle_command_send_draw(PurpleConnection *gc, const char *to, const char *message, const char *imv_key) |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
420 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
421 | yahoo_doodle_command_send_generic("Draw", gc, to, message, DOODLE_CMD_DRAW, imv_key, "1"); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
422 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
423 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
424 | void yahoo_doodle_command_send_clear(PurpleConnection *gc, const char *to, const char *imv_key) |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
425 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
426 | yahoo_doodle_command_send_generic("Clear", gc, to, " ", DOODLE_CMD_CLEAR, imv_key, "1"); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
427 | } |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
428 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
429 | void yahoo_doodle_command_send_extra(PurpleConnection *gc, const char *to, const char *message, const char *imv_key) |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
430 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
431 | yahoo_doodle_command_send_generic("Extra", gc, to, message, DOODLE_CMD_EXTRA, imv_key, "1"); |
| 11475 | 432 | } |
| 433 | ||
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
434 | void yahoo_doodle_command_send_confirm(PurpleConnection *gc, const char *to, const char *imv_key) |
| 11475 | 435 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
436 | yahoo_doodle_command_send_generic("Confirm", gc, to, "1", DOODLE_CMD_CONFIRM, imv_key, "1"); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
437 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
438 | |
| 15884 | 439 | void yahoo_doodle_command_send_shutdown(PurpleConnection *gc, const char *to) |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
440 | { |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
441 | yahoo_doodle_command_send_generic("Shutdown", gc, to, "", DOODLE_CMD_SHUTDOWN, ";0", "0"); |
| 11475 | 442 | } |
| 443 | ||
| 15884 | 444 | void yahoo_doodle_start(PurpleWhiteboard *wb) |
| 11475 | 445 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
446 | doodle_session *ds = g_new0(doodle_session, 1); |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
447 | |
| 15884 | 448 | /* purple_debug_debug("yahoo", "doodle: yahoo_doodle_start()\n"); */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
449 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
450 | /* Set default brush size and color */ |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
451 | ds->brush_size = DOODLE_BRUSH_SMALL; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
452 | ds->brush_color = DOODLE_COLOR_RED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
453 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
454 | wb->proto_data = ds; |
| 11475 | 455 | } |
| 456 | ||
| 15884 | 457 | void yahoo_doodle_end(PurpleWhiteboard *wb) |
| 11475 | 458 | { |
| 15884 | 459 | PurpleConnection *gc = purple_account_get_connection(wb->account); |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
460 | doodle_session *ds = wb->proto_data; |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
461 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
462 | /* g_debug_debug("yahoo", "doodle: yahoo_doodle_end()\n"); */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
463 | |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
464 | if (gc && wb->state != DOODLE_STATE_CANCELED) |
|
18206
8c6268ce4e99
Fix #1726. ('Crash when closing doodle with yahoo not connected')
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15884
diff
changeset
|
465 | yahoo_doodle_command_send_shutdown(gc, wb->who); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
466 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
467 | g_free(ds->imv_key); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
468 | g_free(wb->proto_data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
469 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
470 | |
| 15884 | 471 | void yahoo_doodle_get_dimensions(const PurpleWhiteboard *wb, int *width, int *height) |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
472 | { |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
473 | /* standard Doodle canvases are of one size: 368x256 */ |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
474 | *width = DOODLE_CANVAS_WIDTH; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
475 | *height = DOODLE_CANVAS_HEIGHT; |
| 11475 | 476 | } |
| 477 | ||
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
478 | static char *yahoo_doodle_build_draw_string(doodle_session *ds, GList *draw_list) |
| 11475 | 479 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
480 | GString *message; |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
481 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
482 | g_return_val_if_fail(draw_list != NULL, NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
483 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
484 | message = g_string_new(""); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
485 | g_string_printf(message, "\"%d,%d", ds->brush_color, ds->brush_size); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
486 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
487 | for(; draw_list != NULL; draw_list = draw_list->next) |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
488 | { |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
489 | g_string_append_printf(message, ",%d", GPOINTER_TO_INT(draw_list->data)); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
490 | } |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
491 | g_string_append_c(message, '"'); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
492 | |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
493 | return g_string_free(message, FALSE); |
| 11475 | 494 | } |
| 495 | ||
| 15884 | 496 | void yahoo_doodle_send_draw_list(PurpleWhiteboard *wb, GList *draw_list) |
| 11475 | 497 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
498 | doodle_session *ds = wb->proto_data; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
499 | char *message; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
500 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
501 | g_return_if_fail(draw_list != NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
502 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
503 | message = yahoo_doodle_build_draw_string(ds, draw_list); |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
504 | yahoo_doodle_command_send_draw(wb->account->gc, wb->who, message, ds->imv_key); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
505 | g_free(message); |
| 11475 | 506 | } |
| 507 | ||
| 15884 | 508 | void yahoo_doodle_clear(PurpleWhiteboard *wb) |
| 11475 | 509 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
510 | doodle_session *ds = wb->proto_data; |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
511 | yahoo_doodle_command_send_clear(wb->account->gc, wb->who, ds->imv_key); |
| 11475 | 512 | } |
| 513 | ||
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
514 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
515 | /* Traverse through the list and draw the points and lines */ |
| 15884 | 516 | void yahoo_doodle_draw_stroke(PurpleWhiteboard *wb, GList *draw_list) |
| 11475 | 517 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
518 | int brush_color; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
519 | int brush_size; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
520 | int x; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
521 | int y; |
| 11475 | 522 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
523 | g_return_if_fail(draw_list != NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
524 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
525 | brush_color = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
526 | draw_list = draw_list->next; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
527 | g_return_if_fail(draw_list != NULL); |
| 11475 | 528 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
529 | brush_size = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
530 | draw_list = draw_list->next; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
531 | g_return_if_fail(draw_list != NULL); |
| 11475 | 532 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
533 | x = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
534 | draw_list = draw_list->next; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
535 | g_return_if_fail(draw_list != NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
536 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
537 | y = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
538 | draw_list = draw_list->next; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
539 | g_return_if_fail(draw_list != NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
540 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
541 | /* |
| 15884 | 542 | purple_debug_debug("yahoo", "doodle: Drawing: color=%d, size=%d, (%d,%d)\n", brush_color, brush_size, x, y); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
543 | */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
544 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
545 | while(draw_list != NULL && draw_list->next != NULL) |
| 11475 | 546 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
547 | int dx = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
548 | int dy = GPOINTER_TO_INT(draw_list->next->data); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
549 | |
| 15884 | 550 | purple_whiteboard_draw_line(wb, |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
551 | x, y, |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
552 | x + dx, y + dy, |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
553 | brush_color, brush_size); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
554 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
555 | x += dx; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
556 | y += dy; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
557 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
558 | draw_list = draw_list->next->next; |
| 11475 | 559 | } |
| 560 | } | |
| 561 | ||
| 15884 | 562 | void yahoo_doodle_get_brush(const PurpleWhiteboard *wb, int *size, int *color) |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11916
diff
changeset
|
563 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
564 | doodle_session *ds = wb->proto_data; |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
565 | *size = ds->brush_size; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
566 | *color = ds->brush_color; |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11916
diff
changeset
|
567 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
568 | |
| 15884 | 569 | void yahoo_doodle_set_brush(PurpleWhiteboard *wb, int size, int color) |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
570 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
571 | doodle_session *ds = wb->proto_data; |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
572 | ds->brush_size = size; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
573 | ds->brush_color = color; |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11916
diff
changeset
|
574 | |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11916
diff
changeset
|
575 | /* Notify the core about the changes */ |
| 15884 | 576 | purple_whiteboard_set_brush(wb, size, color); |
| 11475 | 577 | } |
| 578 | ||
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
579 | void yahoo_doodle_process(PurpleConnection *gc, const char *me, const char *from, |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
580 | const char *command, const char *message, const char *imv_key) |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
581 | { |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
582 | if(!command) |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
583 | return; |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
584 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
585 | /* Now check to see what sort of Doodle message it is */ |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
586 | switch(atoi(command)) |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
587 | { |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
588 | case DOODLE_CMD_REQUEST: |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
589 | yahoo_doodle_command_got_request(gc, from, imv_key); |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
590 | break; |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
591 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
592 | case DOODLE_CMD_READY: |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
593 | yahoo_doodle_command_got_ready(gc, from, imv_key); |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
594 | break; |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
595 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
596 | case DOODLE_CMD_CLEAR: |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
597 | yahoo_doodle_command_got_clear(gc, from); |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
598 | break; |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
599 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
600 | case DOODLE_CMD_DRAW: |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
601 | yahoo_doodle_command_got_draw(gc, from, message); |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
602 | break; |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
603 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
604 | case DOODLE_CMD_EXTRA: |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
605 | yahoo_doodle_command_got_extra(gc, from, message, imv_key); |
|
19064
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
606 | break; |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
607 | |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
608 | case DOODLE_CMD_CONFIRM: |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
609 | yahoo_doodle_command_got_confirm(gc, from); |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
610 | break; |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
611 | } |
|
1680699bdbf4
Fix yahoo doodling to work with newer yahoo messenger clients. This breaks doodling with older Pidgin clients (trying to support both looked too painful). Fixes #1445.
Daniel Atallah <datallah@pidgin.im>
parents:
18206
diff
changeset
|
612 | } |