Mercurial > pidgin.yaz
changeset 5885:02569519d0cc
[gaim-migrate @ 6317]
The away and protocol menus now update when an account is signed on or off.
The very last of the UI is gone from connection.c, except for a couple
things commented out. I think everything works there again.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 15 Jun 2003 07:31:20 +0000 |
parents | d188b000e892 |
children | 2201a57b763f |
files | src/connection.c src/gtkconn.c |
diffstat | 2 files changed, 17 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/connection.c Sun Jun 15 07:19:59 2003 +0000 +++ b/src/connection.c Sun Jun 15 07:31:20 2003 +0000 @@ -31,9 +31,6 @@ #include "server.h" #include "sound.h" -/* XXX UI stuff! */ -#include "ui.h" - static GList *connections = NULL; static GList *connections_connecting = NULL; static GaimConnectionUiOps *connection_ui_ops = NULL; @@ -171,6 +168,8 @@ void gaim_connection_set_state(GaimConnection *gc, GaimConnectionState state) { + GaimConnectionUiOps *ops; + g_return_if_fail(gc != NULL); if (gc->state == state) @@ -178,8 +177,12 @@ gc->state = state; + ops = gaim_get_connection_ui_ops(); + + if (gc->state != GAIM_CONNECTED) + connections_connecting = g_list_remove(connections_connecting, gc); + if (gc->state == GAIM_CONNECTED) { - GaimConnectionUiOps *ops = gaim_get_connection_ui_ops(); GaimBlistNode *gnode,*bnode; GList *wins; GList *add_buds=NULL; @@ -195,9 +198,6 @@ gaim_blist_show(); gaim_blist_add_account(gc->account); - /* XXX I hate this. UI code. -- ChipX86 */ - gaim_setup(gc); - /* * XXX This is a hack! Remove this and replace it with a better event * notification system. @@ -248,8 +248,9 @@ serv_set_permit_deny(gc); } - else { - connections_connecting = g_list_remove(connections_connecting, gc); + else if (gc->state == GAIM_DISCONNECTED) { + if (ops != NULL && ops->disconnected != NULL) + ops->disconnected(gc, NULL); } }
--- a/src/gtkconn.c Sun Jun 15 07:19:59 2003 +0000 +++ b/src/gtkconn.c Sun Jun 15 07:31:20 2003 +0000 @@ -213,6 +213,11 @@ { struct signon_meter *meter = find_signon_meter(gc); + gaim_setup(gc); + + do_away_menu(); + do_proto_menu(); + if(meter) kill_meter(meter, _("Done.")); } @@ -227,6 +232,8 @@ struct signon_meter *meter = find_signon_meter(gc); update_privacy_connections(); + do_away_menu(); + do_proto_menu(); if(meter) kill_meter(meter, _("Done."));