Sat, 29 Aug 2009 00:45:37 +0000
propagate from branch 'im.pidgin.pidgin' (head 32da7ab6d1092d199f3c54e43644fb6303f82bd2)
to branch 'im.pidgin.soc.2008.masterpassword' (head e0ce5fb11bdba2ac134e9675ce4dffd3f43e0418)
| 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 | ||
|
27555
afb7cb5c350c
Update for file renames.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
25760
diff
changeset
|
44 | #include "libymsg.h" |
| 11475 | 45 | #include "yahoo_packet.h" |
| 46 | #include "yahoo_friend.h" | |
| 47 | #include "yahoochat.h" | |
| 48 | #include "ycht.h" | |
| 49 | #include "yahoo_filexfer.h" | |
| 50 | #include "yahoo_picture.h" | |
| 51 | ||
| 52 | #include "whiteboard.h" | |
| 53 | #include "yahoo_doodle.h" | |
| 54 | ||
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
55 | /****************************************************************************** |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
56 | * Globals |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
57 | *****************************************************************************/ |
|
14904
cab89db4854c
[gaim-migrate @ 17611]
Henning Norén <henning.noren@gmail.com>
parents:
14254
diff
changeset
|
58 | #if 0 |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
59 | const int DefaultColorRGB24[] = |
| 11475 | 60 | { |
| 61 | DOODLE_COLOR_RED, | |
| 62 | DOODLE_COLOR_ORANGE, | |
| 63 | DOODLE_COLOR_YELLOW, | |
| 64 | DOODLE_COLOR_GREEN, | |
| 65 | DOODLE_COLOR_CYAN, | |
| 66 | DOODLE_COLOR_BLUE, | |
| 67 | DOODLE_COLOR_VIOLET, | |
| 68 | DOODLE_COLOR_PURPLE, | |
| 69 | DOODLE_COLOR_TAN, | |
| 70 | DOODLE_COLOR_BROWN, | |
| 71 | DOODLE_COLOR_BLACK, | |
| 72 | DOODLE_COLOR_GREY, | |
| 73 | DOODLE_COLOR_WHITE | |
| 74 | }; | |
|
14904
cab89db4854c
[gaim-migrate @ 17611]
Henning Norén <henning.noren@gmail.com>
parents:
14254
diff
changeset
|
75 | #endif |
| 11475 | 76 | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
77 | /****************************************************************************** |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
78 | * Functions |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
79 | *****************************************************************************/ |
| 15884 | 80 | PurpleCmdRet yahoo_doodle_purple_cmd_start(PurpleConversation *conv, const char *cmd, char **args, char **error, void *data) |
| 11475 | 81 | { |
| 15884 | 82 | PurpleAccount *account; |
| 83 | PurpleConnection *gc; | |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
84 | const gchar *name; |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
85 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
86 | if(*args && args[0]) |
| 15884 | 87 | return PURPLE_CMD_RET_FAILED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
88 | |
| 15884 | 89 | account = purple_conversation_get_account(conv); |
| 90 | gc = purple_account_get_connection(account); | |
| 91 | name = purple_conversation_get_name(conv); | |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
92 | yahoo_doodle_initiate(gc, name); |
|
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
93 | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
94 | /* 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
|
95 | * Doodle session has been made |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
96 | */ |
| 15884 | 97 | purple_conv_im_write(PURPLE_CONV_IM(conv), "", _("Sent Doodle request."), |
| 98 | PURPLE_MESSAGE_NICK | PURPLE_MESSAGE_RECV, time(NULL)); | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
99 | |
| 15884 | 100 | return PURPLE_CMD_RET_OK; |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
101 | } |
|
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
102 | |
| 15884 | 103 | void yahoo_doodle_initiate(PurpleConnection *gc, const char *name) |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
104 | { |
| 15884 | 105 | PurpleAccount *account; |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
106 | char *to = (char*)name; |
| 15884 | 107 | PurpleWhiteboard *wb; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
108 | |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
109 | g_return_if_fail(gc); |
|
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
110 | g_return_if_fail(name); |
|
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
111 | |
| 15884 | 112 | account = purple_connection_get_account(gc); |
| 113 | wb = purple_whiteboard_get_session(account, to); | |
|
11800
622741e6201c
[gaim-migrate @ 14091]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11514
diff
changeset
|
114 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
115 | if(wb == NULL) |
| 11475 | 116 | { |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
117 | /* 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
|
118 | * requested session. |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
119 | */ |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
120 | wb = purple_whiteboard_create(account, to, DOODLE_STATE_REQUESTING); |
| 11475 | 121 | } |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
122 | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
123 | /* NOTE Perhaps some careful handling of remote assumed established |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
124 | * sessions |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
125 | */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
126 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
127 | yahoo_doodle_command_send_ready(gc, to, DOODLE_IMV_KEY); |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
128 | 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
|
129 | |
| 11475 | 130 | } |
| 131 | ||
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
132 | 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
|
133 | { |
| 15884 | 134 | PurpleAccount *account; |
| 135 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
136 | |
| 15884 | 137 | purple_debug_info("yahoo", "doodle: Got Request (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
138 | |
| 15884 | 139 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
140 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
141 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
142 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
143 | */ |
| 15884 | 144 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
145 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
146 | /* 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
|
147 | if(wb == NULL) |
| 11475 | 148 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
149 | doodle_session *ds; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
150 | /* 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
|
151 | /* TODO Ask local user to start Doodle session with remote user */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
152 | /* 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
|
153 | * results |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
154 | */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
155 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
156 | /* char dialog_message[64]; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
157 | 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
|
158 | |
| 15884 | 159 | purple_notify_message(NULL, PURPLE_NOTIFY_MSG_INFO, "Doodle", |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
160 | dialog_message, NULL, NULL, NULL); |
| 11475 | 161 | */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
162 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
163 | wb = purple_whiteboard_create(account, from, DOODLE_STATE_REQUESTED); |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
164 | ds = wb->proto_data; |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
165 | ds->imv_key = g_strdup(imv_key); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
166 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
167 | yahoo_doodle_command_send_ready(gc, from, imv_key); |
| 11475 | 168 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
169 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
170 | /* 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
|
171 | * session at this point |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
172 | */ |
| 11475 | 173 | } |
| 174 | ||
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
175 | static void yahoo_doodle_command_got_ready(PurpleConnection *gc, const char *from, const char *imv_key) |
| 11475 | 176 | { |
| 15884 | 177 | PurpleAccount *account; |
| 178 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
179 | |
|
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
|
180 | purple_debug_info("yahoo", "doodle: Got Ready(%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
181 | |
| 15884 | 182 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
183 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
184 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
185 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
186 | */ |
| 15884 | 187 | wb = purple_whiteboard_get_session(account, from); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
188 | |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
189 | if(wb == NULL) |
| 11475 | 190 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
191 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
192 | if(wb->state == DOODLE_STATE_REQUESTING) |
| 11475 | 193 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
194 | doodle_session *ds = wb->proto_data; |
| 15884 | 195 | purple_whiteboard_start(wb); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
196 | |
| 11475 | 197 | wb->state = DOODLE_STATE_ESTABLISHED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
198 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
199 | yahoo_doodle_command_send_confirm(gc, from, imv_key); |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
200 | /* Let's steal the imv_key and reuse it */ |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
201 | g_free(ds->imv_key); |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
202 | ds->imv_key = g_strdup(imv_key); |
| 11475 | 203 | } |
|
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
|
204 | else if(wb->state == DOODLE_STATE_ESTABLISHED) |
| 11475 | 205 | { |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
206 | /* TODO Ask whether to save picture too */ |
| 15884 | 207 | purple_whiteboard_clear(wb); |
| 11475 | 208 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
209 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
210 | /* 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
|
211 | * 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
|
212 | * contains the doodle imv key) |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
213 | */ |
|
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
|
214 | else if(wb->state == DOODLE_STATE_REQUESTED) |
| 11475 | 215 | { |
| 15884 | 216 | /* purple_whiteboard_start(wb); */ |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
217 | yahoo_doodle_command_send_ready(gc, from, imv_key); |
| 11475 | 218 | } |
| 219 | } | |
| 220 | ||
|
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
|
221 | static void yahoo_doodle_command_got_draw(PurpleConnection *gc, const char *from, const char *message) |
| 11475 | 222 | { |
| 15884 | 223 | PurpleAccount *account; |
| 224 | PurpleWhiteboard *wb; | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
225 | char **tokens; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
226 | int i; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
227 | GList *d_list = NULL; /* a local list of drawing info */ |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
228 | |
|
13461
914eb11fd354
[gaim-migrate @ 15835]
Daniel Atallah <datallah@pidgin.im>
parents:
13460
diff
changeset
|
229 | g_return_if_fail(message != NULL); |
|
914eb11fd354
[gaim-migrate @ 15835]
Daniel Atallah <datallah@pidgin.im>
parents:
13460
diff
changeset
|
230 | |
| 15884 | 231 | purple_debug_info("yahoo", "doodle: Got Draw (%s)\n", from); |
| 232 | purple_debug_info("yahoo", "doodle: Draw message: %s\n", message); | |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
233 | |
| 15884 | 234 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
235 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
236 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
237 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
238 | */ |
| 15884 | 239 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
240 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
241 | if(wb == NULL) |
| 11475 | 242 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
243 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
244 | /* TODO Functionalize |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
245 | * Convert drawing packet message to an integer list |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
246 | */ |
|
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 | /* 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
|
249 | if((message[0] != '\"') || (message[strlen(message) - 1] != '\"')) |
| 11475 | 250 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
251 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
252 | /* Ignore the inital quotation mark. */ |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
253 | message += 1; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
254 | |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
255 | tokens = g_strsplit(message, ",", 0); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
256 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
257 | /* Traverse and extract all integers divided by commas */ |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
258 | for (i = 0; tokens[i] != NULL; i++) |
| 11475 | 259 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
260 | int last = strlen(tokens[i]) - 1; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
261 | if (tokens[i][last] == '"') |
|
11916
ae83625b925a
[gaim-migrate @ 14207]
Mark Doliner <markdoliner@pidgin.im>
parents:
11914
diff
changeset
|
262 | tokens[i][last] = '\0'; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
263 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
264 | 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
|
265 | } |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
266 | d_list = g_list_reverse(d_list); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
267 | |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
268 | g_strfreev(tokens); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
269 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
270 | yahoo_doodle_draw_stroke(wb, d_list); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
271 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
272 | /* goodle_doodle_session_set_canvas_as_icon(ds); */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
273 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
274 | g_list_free(d_list); |
| 11475 | 275 | } |
| 276 | ||
|
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
|
277 | |
|
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 | static void yahoo_doodle_command_got_clear(PurpleConnection *gc, const char *from) |
| 11475 | 279 | { |
| 15884 | 280 | PurpleAccount *account; |
| 281 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
282 | |
| 15884 | 283 | purple_debug_info("yahoo", "doodle: Got Clear (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
284 | |
| 15884 | 285 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
286 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
287 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
288 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
289 | */ |
| 15884 | 290 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
291 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
292 | if(wb == NULL) |
| 11475 | 293 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
294 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
295 | if(wb->state == DOODLE_STATE_ESTABLISHED) |
| 11475 | 296 | { |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
297 | /* TODO Ask user whether to save the image before clearing it */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
298 | |
| 15884 | 299 | purple_whiteboard_clear(wb); |
| 11475 | 300 | } |
| 301 | } | |
| 302 | ||
|
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
|
303 | |
|
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 | static void |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
305 | yahoo_doodle_command_got_extra(PurpleConnection *gc, const char *from, const char *message, const char *imv_key) |
| 11475 | 306 | { |
| 15884 | 307 | purple_debug_info("yahoo", "doodle: Got Extra (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
308 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
309 | /* 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
|
310 | * 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
|
311 | */ |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
312 | yahoo_doodle_command_send_extra(gc, from, DOODLE_EXTRA_NONE, imv_key); |
| 11475 | 313 | } |
| 314 | ||
|
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
|
315 | 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
|
316 | { |
| 15884 | 317 | PurpleAccount *account; |
| 318 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
319 | |
| 15884 | 320 | purple_debug_info("yahoo", "doodle: Got Confirm (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
321 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
322 | /* Get the doodle session */ |
| 15884 | 323 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
324 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
325 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
326 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
327 | */ |
| 15884 | 328 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
329 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
330 | if(wb == NULL) |
| 11475 | 331 | return; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
332 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
333 | /* TODO Combine the following IF's? */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
334 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
335 | /* 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
|
336 | /*if(wb->state == DOODLE_STATE_REQUESTING) |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
337 | { |
| 11475 | 338 | wb->state = DOODLE_STATE_ESTABLISHED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
339 | |
| 15884 | 340 | purple_whiteboard_start(wb); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
341 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
342 | 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
|
343 | }*/ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
344 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
345 | /* 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
|
346 | if(wb->state == DOODLE_STATE_REQUESTED) |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
347 | { |
| 11475 | 348 | wb->state = DOODLE_STATE_ESTABLISHED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
349 | |
| 15884 | 350 | purple_whiteboard_start(wb); |
| 11475 | 351 | } |
| 352 | } | |
| 353 | ||
| 15884 | 354 | void yahoo_doodle_command_got_shutdown(PurpleConnection *gc, const char *from) |
| 11475 | 355 | { |
| 15884 | 356 | PurpleAccount *account; |
| 357 | PurpleWhiteboard *wb; | |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
358 | |
|
13460
5dcbdea05df4
[gaim-migrate @ 15834]
Daniel Atallah <datallah@pidgin.im>
parents:
12022
diff
changeset
|
359 | g_return_if_fail(from != NULL); |
|
5dcbdea05df4
[gaim-migrate @ 15834]
Daniel Atallah <datallah@pidgin.im>
parents:
12022
diff
changeset
|
360 | |
| 15884 | 361 | purple_debug_info("yahoo", "doodle: Got Shutdown (%s)\n", from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
362 | |
| 15884 | 363 | account = purple_connection_get_account(gc); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
364 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
365 | /* Only handle this if local client requested Doodle session (else local |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
366 | * client would have sent one) |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
367 | */ |
| 15884 | 368 | wb = purple_whiteboard_get_session(account, from); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
369 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
370 | if(wb == NULL) |
| 11475 | 371 | 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
|
372 | |
|
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 | /* 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
|
374 | |
|
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
|
375 | 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
|
376 | purple_whiteboard_destroy(wb); |
| 11475 | 377 | } |
| 378 | ||
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
379 | static void yahoo_doodle_command_send_generic(const char *type, |
| 15884 | 380 | PurpleConnection *gc, |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
381 | const char *to, |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
382 | 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
|
383 | 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
|
384 | const char *imv, |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
385 | const char *sixtyfour) |
| 11475 | 386 | { |
|
27959
f842ae57da4e
Move from "struct yahoo_data" to "YahooData" to be consistent with other structs
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27866
diff
changeset
|
387 | YahooData *yd; |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
388 | struct yahoo_packet *pkt; |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
389 | |
| 15884 | 390 | 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
|
391 | |
| 11475 | 392 | yd = gc->proto_data; |
| 393 | ||
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
394 | /* Make and send an acknowledge (ready) Doodle packet */ |
|
27866
4a8d47263e98
Change a bunch more of our yahoo packets to use the session ID. I believe this
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27555
diff
changeset
|
395 | pkt = yahoo_packet_new(YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, yd->session_id); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
396 | yahoo_packet_hash_str(pkt, 49, "IMVIRONMENT"); |
| 15884 | 397 | 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
|
398 | 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
|
399 | yahoo_packet_hash_int(pkt, 13, command); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
400 | 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
|
401 | 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
|
402 | yahoo_packet_hash_str(pkt, 64, sixtyfour); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
403 | yahoo_packet_hash_str(pkt, 1002, "1"); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
404 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
405 | yahoo_packet_send_and_free(pkt, yd); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
406 | } |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
407 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
408 | 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
|
409 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
410 | 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
|
411 | } |
|
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 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
413 | 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
|
414 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
415 | 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
|
416 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
417 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
418 | 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
|
419 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
420 | 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
|
421 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
422 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
423 | 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
|
424 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
425 | 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
|
426 | } |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
427 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
428 | 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
|
429 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
430 | yahoo_doodle_command_send_generic("Extra", gc, to, message, DOODLE_CMD_EXTRA, imv_key, "1"); |
| 11475 | 431 | } |
| 432 | ||
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
433 | void yahoo_doodle_command_send_confirm(PurpleConnection *gc, const char *to, const char *imv_key) |
| 11475 | 434 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
435 | 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
|
436 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
437 | |
| 15884 | 438 | 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
|
439 | { |
|
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
|
440 | yahoo_doodle_command_send_generic("Shutdown", gc, to, "", DOODLE_CMD_SHUTDOWN, ";0", "0"); |
| 11475 | 441 | } |
| 442 | ||
| 15884 | 443 | void yahoo_doodle_start(PurpleWhiteboard *wb) |
| 11475 | 444 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
445 | doodle_session *ds = g_new0(doodle_session, 1); |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
446 | |
| 15884 | 447 | /* purple_debug_debug("yahoo", "doodle: yahoo_doodle_start()\n"); */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
448 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
449 | /* Set default brush size and color */ |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
450 | ds->brush_size = DOODLE_BRUSH_SMALL; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
451 | ds->brush_color = DOODLE_COLOR_RED; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
452 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
453 | wb->proto_data = ds; |
| 11475 | 454 | } |
| 455 | ||
| 15884 | 456 | void yahoo_doodle_end(PurpleWhiteboard *wb) |
| 11475 | 457 | { |
| 15884 | 458 | PurpleConnection *gc = purple_account_get_connection(wb->account); |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
459 | doodle_session *ds = wb->proto_data; |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
460 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
461 | /* g_debug_debug("yahoo", "doodle: yahoo_doodle_end()\n"); */ |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
462 | |
|
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
|
463 | 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
|
464 | yahoo_doodle_command_send_shutdown(gc, wb->who); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
465 | |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
466 | g_free(ds->imv_key); |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
467 | g_free(wb->proto_data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
468 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
469 | |
| 15884 | 470 | 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
|
471 | { |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
472 | /* standard Doodle canvases are of one size: 368x256 */ |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
473 | *width = DOODLE_CANVAS_WIDTH; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
474 | *height = DOODLE_CANVAS_HEIGHT; |
| 11475 | 475 | } |
| 476 | ||
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
477 | static char *yahoo_doodle_build_draw_string(doodle_session *ds, GList *draw_list) |
| 11475 | 478 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
479 | GString *message; |
|
11514
6d39c652e8b8
[gaim-migrate @ 13759]
Mark Doliner <markdoliner@pidgin.im>
parents:
11475
diff
changeset
|
480 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
481 | g_return_val_if_fail(draw_list != NULL, NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
482 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
483 | message = g_string_new(""); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
484 | 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
|
485 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
486 | for(; draw_list != NULL; draw_list = draw_list->next) |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
487 | { |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
488 | 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
|
489 | } |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
490 | g_string_append_c(message, '"'); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
491 | |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
492 | return g_string_free(message, FALSE); |
| 11475 | 493 | } |
| 494 | ||
| 15884 | 495 | void yahoo_doodle_send_draw_list(PurpleWhiteboard *wb, GList *draw_list) |
| 11475 | 496 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
497 | doodle_session *ds = wb->proto_data; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
498 | char *message; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
499 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
500 | g_return_if_fail(draw_list != NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
501 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
502 | message = yahoo_doodle_build_draw_string(ds, draw_list); |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
503 | 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
|
504 | g_free(message); |
| 11475 | 505 | } |
| 506 | ||
| 15884 | 507 | void yahoo_doodle_clear(PurpleWhiteboard *wb) |
| 11475 | 508 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
509 | doodle_session *ds = wb->proto_data; |
|
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
510 | yahoo_doodle_command_send_clear(wb->account->gc, wb->who, ds->imv_key); |
| 11475 | 511 | } |
| 512 | ||
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
513 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
514 | /* Traverse through the list and draw the points and lines */ |
| 15884 | 515 | void yahoo_doodle_draw_stroke(PurpleWhiteboard *wb, GList *draw_list) |
| 11475 | 516 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
517 | int brush_color; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
518 | int brush_size; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
519 | int x; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
520 | int y; |
| 11475 | 521 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
522 | g_return_if_fail(draw_list != NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
523 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
524 | brush_color = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
525 | draw_list = draw_list->next; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
526 | g_return_if_fail(draw_list != NULL); |
| 11475 | 527 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
528 | brush_size = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
529 | draw_list = draw_list->next; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
530 | g_return_if_fail(draw_list != NULL); |
| 11475 | 531 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
532 | x = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
533 | draw_list = draw_list->next; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
534 | g_return_if_fail(draw_list != NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
535 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
536 | y = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
537 | draw_list = draw_list->next; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
538 | g_return_if_fail(draw_list != NULL); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
539 | |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
540 | /* |
| 15884 | 541 | 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
|
542 | */ |
|
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
543 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
544 | while(draw_list != NULL && draw_list->next != NULL) |
| 11475 | 545 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
546 | int dx = GPOINTER_TO_INT(draw_list->data); |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
547 | int dy = GPOINTER_TO_INT(draw_list->next->data); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
548 | |
| 15884 | 549 | purple_whiteboard_draw_line(wb, |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
550 | x, y, |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
551 | x + dx, y + dy, |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
552 | brush_color, brush_size); |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
553 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
554 | x += dx; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
555 | y += dy; |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
556 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
557 | draw_list = draw_list->next->next; |
| 11475 | 558 | } |
| 559 | } | |
| 560 | ||
| 15884 | 561 | 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
|
562 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
563 | doodle_session *ds = wb->proto_data; |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
564 | *size = ds->brush_size; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
565 | *color = ds->brush_color; |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11916
diff
changeset
|
566 | } |
|
11801
c19b37ac661b
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
567 | |
| 15884 | 568 | 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
|
569 | { |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
570 | doodle_session *ds = wb->proto_data; |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
571 | ds->brush_size = size; |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11801
diff
changeset
|
572 | ds->brush_color = color; |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11916
diff
changeset
|
573 | |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11916
diff
changeset
|
574 | /* Notify the core about the changes */ |
| 15884 | 575 | purple_whiteboard_set_brush(wb, size, color); |
| 11475 | 576 | } |
| 577 | ||
|
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
|
578 | 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
|
579 | 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
|
580 | { |
|
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 | 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
|
582 | 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
|
583 | |
|
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 | /* 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
|
585 | 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
|
586 | { |
|
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 | case DOODLE_CMD_REQUEST: |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
588 | 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
|
589 | 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
|
590 | |
|
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 | case DOODLE_CMD_READY: |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
592 | 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
|
593 | 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
|
594 | |
|
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 | 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
|
596 | 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
|
597 | 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
|
598 | |
|
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 | 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
|
600 | 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
|
601 | 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
|
602 | |
|
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 | case DOODLE_CMD_EXTRA: |
|
20150
760aa4bea7c6
applied changes from 80e3a515775c28b61c4c155c4a524374ef3360ff
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
604 | 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
|
605 | 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
|
606 | |
|
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 | 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
|
608 | 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
|
609 | 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
|
610 | } |
|
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 | } |