Mercurial > pidgin.yaz
changeset 2111:109669b3887e
[gaim-migrate @ 2121]
fix a jabber bug and a bug i added last night.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 02 Aug 2001 20:45:08 +0000 |
parents | 704a07ed9481 |
children | 0ad5f2cf6728 |
files | src/buddy.c src/conversation.c src/gaim.h src/multi.c src/protocols/jabber/jabber.c |
diffstat | 5 files changed, 21 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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); } }
--- 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 *);
--- 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);
--- 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;