Mercurial > pidgin
comparison src/protocols/yahoo/yahoo_filexfer.c @ 10654:f2e86683cafc
[gaim-migrate @ 12182]
sf patch #1152664, from Richard Laager
This patches does three things:
First, it uses aliases in file transfer messages
whenever possible.
Second, it fixes the case where file transfer
completion messages are not showing for MSN.
Third, it makes the wording more consistent:
Canceled is used to describe cases when the file
transfer was actively canceled by either party.
Failed is used otherwise. Aborted is no longer
used at all. Previously, aborted was used in
some places while failed was used under the
same circumstances in other places. Also,
in the file transfer box, canceled was used in
one place for remotely or locally canceled
files while in another place in the same box
canceled was only used for locally canceled
files (failed was used for remotely canceled
files).
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 06 Mar 2005 00:23:54 +0000 |
parents | 8fbab42659c2 |
children | ca3e0882d377 |
comparison
equal
deleted
inserted
replaced
10653:20cbadb004a0 | 10654:f2e86683cafc |
---|---|
64 if (!(xfer = data)) | 64 if (!(xfer = data)) |
65 return; | 65 return; |
66 if (!(xd = xfer->data)) | 66 if (!(xd = xfer->data)) |
67 return; | 67 return; |
68 if (source < 0) { | 68 if (source < 0) { |
69 gaim_xfer_error(GAIM_XFER_RECEIVE, xfer->who, _("Unable to connect.")); | 69 gaim_xfer_error(GAIM_XFER_RECEIVE, gaim_xfer_get_account(xfer), |
70 xfer->who, _("Unable to connect.")); | |
70 gaim_xfer_cancel_remote(xfer); | 71 gaim_xfer_cancel_remote(xfer); |
71 return; | 72 return; |
72 } | 73 } |
73 | 74 |
74 xfer->fd = source; | 75 xfer->fd = source; |
107 yd = gc->proto_data; | 108 yd = gc->proto_data; |
108 | 109 |
109 | 110 |
110 | 111 |
111 if (source < 0) { | 112 if (source < 0) { |
112 gaim_xfer_error(GAIM_XFER_RECEIVE, xfer->who, _("Unable to connect.")); | 113 gaim_xfer_error(GAIM_XFER_RECEIVE, gaim_xfer_get_account(xfer), |
114 xfer->who, _("Unable to connect.")); | |
113 gaim_xfer_cancel_remote(xfer); | 115 gaim_xfer_cancel_remote(xfer); |
114 return; | 116 return; |
115 } | 117 } |
116 | 118 |
117 xfer->fd = source; | 119 xfer->fd = source; |
163 yd = gc->proto_data; | 165 yd = gc->proto_data; |
164 account = gaim_connection_get_account(gc); | 166 account = gaim_connection_get_account(gc); |
165 | 167 |
166 if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND) { | 168 if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND) { |
167 if (0 && gaim_xfer_get_size(xfer) >= 1048577) { | 169 if (0 && gaim_xfer_get_size(xfer) >= 1048577) { |
168 gaim_notify_error(gc, NULL, _("File Transfer Aborted"), | 170 gaim_notify_error(gc, NULL, _("File Transfer Failed"), |
169 _("Gaim cannot send files over Yahoo! that are bigger than " | 171 _("Gaim cannot send files over Yahoo! that are bigger than " |
170 "One Megabyte (1,048,576 bytes).")); | 172 "One Megabyte (1,048,576 bytes).")); |
171 gaim_xfer_cancel_local(xfer); | 173 gaim_xfer_cancel_local(xfer); |
172 } else { | 174 } else { |
173 if (yd->jp) { | 175 if (yd->jp) { |
174 if (gaim_proxy_connect(account, gaim_account_get_string(account, "xferjp_host", YAHOOJP_XFER_HOST), | 176 if (gaim_proxy_connect(account, gaim_account_get_string(account, "xferjp_host", YAHOOJP_XFER_HOST), |
175 gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT), | 177 gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT), |
176 yahoo_sendfile_connected, xfer) == -1) | 178 yahoo_sendfile_connected, xfer) == -1) |
177 { | 179 { |
178 gaim_notify_error(gc, NULL, _("File Transfer Aborted"), | 180 gaim_notify_error(gc, NULL, _("File Transfer Failed"), |
179 _("Unable to establish file descriptor.")); | 181 _("Unable to establish file descriptor.")); |
180 gaim_xfer_cancel_remote(xfer); | 182 gaim_xfer_cancel_remote(xfer); |
181 } | 183 } |
182 } else { | 184 } else { |
183 if (gaim_proxy_connect(account, gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST), | 185 if (gaim_proxy_connect(account, gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST), |
184 gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT), | 186 gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT), |
185 yahoo_sendfile_connected, xfer) == -1) | 187 yahoo_sendfile_connected, xfer) == -1) |
186 { | 188 { |
187 gaim_notify_error(gc, NULL, _("File Transfer Aborted"), | 189 gaim_notify_error(gc, NULL, _("File Transfer Failed"), |
188 _("Unable to establish file descriptor.")); | 190 _("Unable to establish file descriptor.")); |
189 gaim_xfer_cancel_remote(xfer); | 191 gaim_xfer_cancel_remote(xfer); |
190 } | 192 } |
191 } | 193 } |
192 } | 194 } |
193 } else { | 195 } else { |
194 xfer->fd = gaim_proxy_connect(account, xfer_data->host, xfer_data->port, | 196 xfer->fd = gaim_proxy_connect(account, xfer_data->host, xfer_data->port, |
195 yahoo_receivefile_connected, xfer); | 197 yahoo_receivefile_connected, xfer); |
196 if (xfer->fd == -1) { | 198 if (xfer->fd == -1) { |
197 gaim_notify_error(gc, NULL, _("File Transfer Aborted"), | 199 gaim_notify_error(gc, NULL, _("File Transfer Failed"), |
198 _("Unable to establish file descriptor.")); | 200 _("Unable to establish file descriptor.")); |
199 gaim_xfer_cancel_remote(xfer); | 201 gaim_xfer_cancel_remote(xfer); |
200 } | 202 } |
201 } | 203 } |
202 } | 204 } |