Mercurial > pidgin
comparison src/connection.c @ 10738:55af3fa46329
[gaim-migrate @ 12340]
Lots of changes here. A lot of it stems from chaning
gaim_account_connect() so that it DOES NOT have the GaimStatus
parameter. It will attempt to use the GaimStatus of your
account from the last time it was connected (which doesn't
work quite right yet).
My goal here was to save and load each account's GaimStatuses
to accounts.xml, so if you were "away" when you signed off then
you'll be "away" when you sign back on. Not quite there yet.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 26 Mar 2005 20:08:43 +0000 |
parents | 2d809781816f |
children | 94cc67130789 |
comparison
equal
deleted
inserted
replaced
10737:b7f0bc436179 | 10738:55af3fa46329 |
---|---|
87 static void | 87 static void |
88 request_pass_ok_cb(GaimAccount *account, const char *entry) | 88 request_pass_ok_cb(GaimAccount *account, const char *entry) |
89 { | 89 { |
90 gaim_account_set_password(account, (*entry != '\0') ? entry : NULL); | 90 gaim_account_set_password(account, (*entry != '\0') ? entry : NULL); |
91 | 91 |
92 /* XXX - connect with correct status */ | 92 gaim_account_connect(account); |
93 gaim_account_connect(account, gaim_account_get_status(account, "online")); | |
94 } | 93 } |
95 | 94 |
96 void | 95 void |
97 gaim_connection_register(GaimConnection *gc) | 96 gaim_connection_register(GaimConnection *gc) |
98 { | 97 { |
142 prpl_info->register_user(account); | 141 prpl_info->register_user(account); |
143 } | 142 } |
144 | 143 |
145 | 144 |
146 void | 145 void |
147 gaim_connection_connect(GaimConnection *gc, GaimStatus *status) | 146 gaim_connection_connect(GaimConnection *gc) |
148 { | 147 { |
149 GaimAccount *account; | 148 GaimAccount *account; |
150 GaimPluginProtocolInfo *prpl_info = NULL; | 149 GaimPluginProtocolInfo *prpl_info = NULL; |
150 GaimStatus *status; | |
151 | 151 |
152 g_return_if_fail(gc != NULL); | 152 g_return_if_fail(gc != NULL); |
153 | 153 |
154 gaim_debug_info("connection", "Connecting. gc = %p\n", gc); | 154 gaim_debug_info("connection", "Connecting. gc = %p\n", gc); |
155 | 155 |
198 | 198 |
199 gaim_signal_emit(gaim_connections_get_handle(), "signing-on", gc); | 199 gaim_signal_emit(gaim_connections_get_handle(), "signing-on", gc); |
200 | 200 |
201 gaim_debug_info("connection", "Calling serv_login\n"); | 201 gaim_debug_info("connection", "Calling serv_login\n"); |
202 | 202 |
203 status = gaim_account_get_active_status(account); | |
203 serv_login(account, status); | 204 serv_login(account, status); |
204 } | 205 } |
205 | 206 |
206 void | 207 void |
207 gaim_connection_disconnect(GaimConnection *gc) | 208 gaim_connection_disconnect(GaimConnection *gc) |
263 | 264 |
264 gboolean | 265 gboolean |
265 gaim_connection_disconnect_cb(gpointer data) | 266 gaim_connection_disconnect_cb(gpointer data) |
266 { | 267 { |
267 GaimAccount *account = data; | 268 GaimAccount *account = data; |
268 GaimConnection *gc = gaim_account_get_connection(account); | 269 |
269 | 270 gaim_account_disconnect(account); |
270 if (!gaim_account_get_remember_password(account)) | |
271 gaim_account_set_password(account,NULL); | |
272 | |
273 if (gc != NULL) | |
274 gaim_connection_disconnect(gc); | |
275 | 271 |
276 return FALSE; | 272 return FALSE; |
277 } | 273 } |
278 | 274 |
279 /* | 275 /* |