Mercurial > pidgin.yaz
changeset 10401:3e4ecbdf8d0a
[gaim-migrate @ 11638]
Stuff compiles again, if that's what you wanted stuff to do. It works a bit
too. I fixed one crash in oscar, only to reveal another that I didnn't fix
(tooltips).
Most protocols still need updating to actually log in in the specified state,
TCL needs some love for gaim_account_connect, perl probably does too but that
needs more love anyway. The reconnect plugin could be more intelligent too, as
could gaim-remote.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Tue, 21 Dec 2004 01:48:30 +0000 |
parents | 6a043ae92db6 |
children | 3d2dd0ed368d |
files | plugins/autorecon.c plugins/gaim-remote/remote.c plugins/tcl/tcl_cmds.c src/protocols/gg/gg.c src/protocols/irc/irc.c src/protocols/jabber/jabber.c src/protocols/msn/msn.c src/protocols/napster/napster.c src/protocols/novell/novell.c src/protocols/oscar/oscar.c src/protocols/rendezvous/rendezvous.c src/protocols/silc/silc.c src/protocols/toc/toc.c src/protocols/trepia/trepia.c src/protocols/yahoo/yahoo.c src/protocols/zephyr/zephyr.c |
diffstat | 16 files changed, 34 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/autorecon.c Sun Dec 19 20:32:32 2004 +0000 +++ b/plugins/autorecon.c Tue Dec 21 01:48:30 2004 +0000 @@ -140,7 +140,8 @@ info->timeout = 0; gaim_debug(GAIM_DEBUG_INFO, "autorecon", "calling gaim_account_connect\n"); - gaim_account_connect(account); + /* XXX: make this remember the status from disconnect */ + gaim_account_connect(account, gaim_account_get_status(account, "online")); gaim_debug(GAIM_DEBUG_INFO, "autorecon", "done calling gaim_account_connect\n"); return FALSE;
--- a/plugins/gaim-remote/remote.c Sun Dec 19 20:32:32 2004 +0000 +++ b/plugins/gaim-remote/remote.c Tue Dec 21 01:48:30 2004 +0000 @@ -392,7 +392,8 @@ memcpy(&id, data, sizeof(id)); account = g_list_nth_data(gaim_accounts_get_all(), id); if (account) - gaim_account_connect(account); + /* XXX: someone might want to extend this to allow connecting with a different status */ + gaim_account_connect(account, gaim_account_get_status(account, "online")); /* don't need to do anything here because the UI will get updates from other handlers */ break;
--- a/plugins/tcl/tcl_cmds.c Sun Dec 19 20:32:32 2004 +0000 +++ b/plugins/tcl/tcl_cmds.c Tue Dec 21 01:48:30 2004 +0000 @@ -121,7 +121,9 @@ if (gaim_account_is_connected(account)) Tcl_SetIntObj(result, (int)gaim_account_get_connection(account)); else - Tcl_SetIntObj(result, (int)gaim_account_connect(account)); +#warning Someone who knows TCL (Ethan!) fix this so TCL plugins can specify the status + Tcl_SetIntObj(result, (int)gaim_account_connect(account, + gaim_account_get_status(account, "online"))); break; case CMD_ACCOUNT_CONNECTION: if (objc != 3) {
--- a/src/protocols/gg/gg.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/gg/gg.c Tue Dec 21 01:48:30 2004 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 11624 2004-12-17 23:30:38Z thekingant $ + * $Id: gg.c 11638 2004-12-21 01:48:30Z nosnilmot $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -841,7 +841,7 @@ } } -static void agg_login(GaimAccount *account) +static void agg_login(GaimAccount *account, GaimStatus *status) { GaimConnection *gc = gaim_account_get_connection(account); struct agg_data *gd = gc->proto_data = g_new0(struct agg_data, 1);
--- a/src/protocols/irc/irc.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/irc/irc.c Tue Dec 21 01:48:30 2004 +0000 @@ -44,7 +44,7 @@ static GList *irc_status_types(GaimAccount *account); static GList *irc_actions(GaimPlugin *plugin, gpointer context); /* static GList *irc_chat_info(GaimConnection *gc); */ -static void irc_login(GaimAccount *account); +static void irc_login(GaimAccount *account, GaimStatus *status); static void irc_login_cb_ssl(gpointer data, GaimSslConnection *gsc, GaimInputCondition cond); static void irc_login_cb(gpointer data, gint source, GaimInputCondition cond); static void irc_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error, gpointer data); @@ -225,7 +225,7 @@ return defaults; } -static void irc_login(GaimAccount *account) +static void irc_login(GaimAccount *account, GaimStatus *status) { GaimConnection *gc; struct irc_conn *irc;
--- a/src/protocols/jabber/jabber.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/jabber/jabber.c Tue Dec 21 01:48:30 2004 +0000 @@ -345,7 +345,7 @@ static void -jabber_login(GaimAccount *account) +jabber_login(GaimAccount *account, GaimStatus *status) { int rc; GaimConnection *gc = gaim_account_get_connection(account);
--- a/src/protocols/msn/msn.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/msn/msn.c Tue Dec 21 01:48:30 2004 +0000 @@ -650,7 +650,7 @@ } static void -msn_login(GaimAccount *account) +msn_login(GaimAccount *account, GaimStatus *status) { GaimConnection *gc; MsnSession *session;
--- a/src/protocols/napster/napster.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/napster/napster.c Tue Dec 21 01:48:30 2004 +0000 @@ -503,7 +503,7 @@ gc->inpa = gaim_input_add(ndata->fd, GAIM_INPUT_READ, nap_callback, gc); } -static void nap_login(GaimAccount *account) +static void nap_login(GaimAccount *account, GaimStatus *status) { GaimConnection *gc = gaim_account_get_connection(account);
--- a/src/protocols/novell/novell.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/novell/novell.c Tue Dec 21 01:48:30 2004 +0000 @@ -2122,7 +2122,7 @@ ******************************************************************************/ static void -novell_login(GaimAccount * account) +novell_login(GaimAccount * account, GaimStatus *status) { GaimConnection *gc; NMUser *user = NULL;
--- a/src/protocols/oscar/oscar.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/oscar/oscar.c Tue Dec 21 01:48:30 2004 +0000 @@ -5583,14 +5583,16 @@ if (gc) od = (OscarData *)gc->proto_data; - - if (od && od->rights.maxawaymsglen == 0) + + if ((od == NULL) || (od->rights.maxawaymsglen == 0)) { gaim_notify_warning(gc, NULL, _("Unable to set AIM away message."), _("You have probably requested to set your " "away message before the login procedure " "completed. You remain in a \"present\" " "state; try setting it again when you are " "fully connected.")); + return; + } if (primitive == GAIM_STATUS_AVAILABLE) { aim_setextstatus(od->sess, AIM_ICQ_STATE_NORMAL);
--- a/src/protocols/rendezvous/rendezvous.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/rendezvous/rendezvous.c Tue Dec 21 01:48:30 2004 +0000 @@ -605,7 +605,7 @@ } static void -rendezvous_prpl_login(GaimAccount *account) +rendezvous_prpl_login(GaimAccount *account, GaimStatus *status) { GaimConnection *gc = gaim_account_get_connection(account); RendezvousData *rd;
--- a/src/protocols/silc/silc.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/silc/silc.c Tue Dec 21 01:48:30 2004 +0000 @@ -243,7 +243,7 @@ } static void -silcgaim_login(GaimAccount *account) +silcgaim_login(GaimAccount *account, GaimStatus *status) { SilcGaim sg; SilcClient client;
--- a/src/protocols/toc/toc.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/toc/toc.c Tue Dec 21 01:48:30 2004 +0000 @@ -124,7 +124,7 @@ /* ok. this function used to take username/password, and return 0 on success. * now, it takes username/password, and returns NULL on error or a new gaim_connection * on success. */ -static void toc_login(GaimAccount *account) +static void toc_login(GaimAccount *account, GaimStatus *status) { GaimConnection *gc; struct toc_data *tdt; @@ -1162,8 +1162,9 @@ } #endif -static void toc_set_away(GaimConnection *gc, const char *state, const char *message) +static void toc_set_status(GaimAccount *account, GaimStatus *status) { +#if 0 /* do we care about TOC any more? */ char buf[BUF_LEN * 2]; if (gc->away) { g_free(gc->away); @@ -1178,6 +1179,7 @@ } else g_snprintf(buf, MSG_LEN, "toc_set_away \"\""); sflap_send(g, buf, -1, TYPE_DATA); +#endif } static void toc_set_info(GaimConnection *g, const char *info) @@ -1534,9 +1536,13 @@ toc_set_permit_deny(gc); } -static GList *toc_away_states(GaimConnection *gc) +static GList *toc_away_states(GaimAccount *account) { +#if 0 /* do we care about TOC any more? */ return g_list_append(NULL, GAIM_AWAY_CUSTOM); +#else + return NULL; +#endif } static void @@ -2134,7 +2140,7 @@ toc_set_info, /* set_info */ NULL, /* send_typing */ toc_get_info, /* get_info */ - toc_set_away, /* set_away */ + toc_set_status, /* set_away */ toc_set_idle, /* set_idle */ toc_change_passwd, /* change_passwd */ toc_add_buddy, /* add_buddy */
--- a/src/protocols/trepia/trepia.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/trepia/trepia.c Tue Dec 21 01:48:30 2004 +0000 @@ -1042,7 +1042,7 @@ } static void -trepia_login(GaimAccount *account) +trepia_login(GaimAccount *account, GaimStatus *status) { GaimConnection *gc; TrepiaSession *session;
--- a/src/protocols/yahoo/yahoo.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/yahoo/yahoo.c Tue Dec 21 01:48:30 2004 +0000 @@ -2222,7 +2222,7 @@ static void yahoo_login(GaimAccount *account, GaimStatus *status) { GaimConnection *gc = gaim_account_get_connection(account); struct yahoo_data *yd = gc->proto_data = g_new0(struct yahoo_data, 1); - char *id = gaim_status_get_id(status); + const char *id = gaim_status_get_id(status); gc->flags |= GAIM_CONNECTION_HTML | GAIM_CONNECTION_NO_BGCOLOR | GAIM_CONNECTION_NO_URLDESC; gaim_connection_update_progress(gc, _("Connecting"), 1, 2);
--- a/src/protocols/zephyr/zephyr.c Sun Dec 19 20:32:32 2004 +0000 +++ b/src/protocols/zephyr/zephyr.c Tue Dec 21 01:48:30 2004 +0000 @@ -1461,7 +1461,7 @@ return EXPOSE_REALMVIS; } -static void zephyr_login(GaimAccount * account) +static void zephyr_login(GaimAccount * account, GaimStatus *status) { GaimConnection *gc; zephyr_account *zephyr;