# HG changeset patch # User Eric Warmenhoven # Date 996785108 0 # Node ID 109669b3887e02f8890d52eb3a056eabfd63fadc # Parent 704a07ed9481f8f744e946701bf2dbfa2d41fd8e [gaim-migrate @ 2121] fix a jabber bug and a bug i added last night. committer: Tailor Script diff -r 704a07ed9481 -r 109669b3887e src/buddy.c --- a/src/buddy.c Thu Aug 02 19:59:25 2001 +0000 +++ b/src/buddy.c Thu Aug 02 20:45:08 2001 +0000 @@ -485,12 +485,13 @@ plugin_event(event_signoff, gc, 0, 0, 0); system_log(log_signoff, gc, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); update_keepalive(gc, FALSE); - redo_convo_menus(gc); + convo_menu_remove(gc); serv_close(gc); redo_buddy_list(); build_edit_tree(); do_away_menu(); do_proto_menu(); + redo_convo_menus(); #ifdef USE_APPLET if (connections) set_user_state(online); diff -r 704a07ed9481 -r 109669b3887e src/conversation.c --- a/src/conversation.c Thu Aug 02 19:59:25 2001 +0000 +++ b/src/conversation.c Thu Aug 02 20:45:08 2001 +0000 @@ -1855,7 +1855,7 @@ } } -void redo_convo_menus(struct gaim_connection *gc) +void redo_convo_menus() { GList *c = conversations; struct conversation *C; @@ -1866,16 +1866,24 @@ create_convo_menu(C); - if (!gc) + if (g_slist_find(connections, C->gc)) continue; - if (C->gc != gc) - continue; + set_convo_gc(C, connections ? connections->data : NULL); + } +} + +void convo_menu_remove(struct gaim_connection *gc) +{ + GList *c = conversations; + struct conversation *C; + + while (c) { + C = (struct conversation *)c->data; + c = c->next; if (C->gc && C->gc->prpl && C->gc->prpl->remove_convo) (*C->gc->prpl->remove_convo)(C->gc, C); - - set_convo_gc(C, connections ? connections->data : NULL); } } diff -r 704a07ed9481 -r 109669b3887e src/gaim.h --- a/src/gaim.h Thu Aug 02 19:59:25 2001 +0000 +++ b/src/gaim.h Thu Aug 02 20:45:08 2001 +0000 @@ -714,7 +714,8 @@ extern void do_normal(GtkWidget *, GtkWidget *); extern void do_big(GtkWidget *, GtkWidget *); extern void set_font_face(char *, struct conversation *); -extern void redo_convo_menus(struct gaim_connection *); +extern void redo_convo_menus(); +extern void convo_menu_remove(struct gaim_connection *); extern void toggle_spellchk(); extern void set_convo_gc(struct conversation *, struct gaim_connection *); extern void update_buttons_by_protocol(struct conversation *); diff -r 704a07ed9481 -r 109669b3887e src/multi.c --- a/src/multi.c Thu Aug 02 19:59:25 2001 +0000 +++ b/src/multi.c Thu Aug 02 20:45:08 2001 +0000 @@ -813,7 +813,7 @@ update_connection_dependent_prefs(); do_away_menu(); do_proto_menu(); - redo_convo_menus(NULL); + redo_convo_menus(); gaim_setup(gc); plugin_event(event_signon, gc, 0, 0, 0); diff -r 704a07ed9481 -r 109669b3887e src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Thu Aug 02 19:59:25 2001 +0000 +++ b/src/protocols/jabber/jabber.c Thu Aug 02 20:45:08 2001 +0000 @@ -856,7 +856,7 @@ struct buddy *b = NULL; char *groupname, *buddyname; - if (who->user == NULL) { + if (!who || !who->user) { /* FIXME: transport */ g = xmlnode_get_nextsibling(g); continue; @@ -887,7 +887,7 @@ struct buddy *b; char *buddyname; - if (who->user == NULL) { + if (!who || !who->user) { /* FIXME: transport */ x = xmlnode_get_nextsibling(x); continue;