Mercurial > pidgin.yaz
changeset 9913:0056843d512c
[gaim-migrate @ 10805]
fix for bug 1018498,
" when you click the Get List button having selected
Jabber [at least I can say for that network], a dialog
will show up asking for server.
if in that dialog one clicks Cancel, then he has to
Press STOP too..
that's now so logical and is easily fixable", bug by Nikos Kouremenos; fix
by datallah
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 30 Aug 2004 02:28:12 +0000 |
parents | f6a1054e2bdc |
children | 3df9ffcb9b06 |
files | src/protocols/jabber/chat.c |
diffstat | 1 files changed, 18 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/jabber/chat.c Mon Aug 30 01:52:59 2004 +0000 +++ b/src/protocols/jabber/chat.c Mon Aug 30 02:28:12 2004 +0000 @@ -681,15 +681,30 @@ static void roomlist_ok_cb(JabberStream *js, const char *server) { JabberIq *iq; - - if(!js->roomlist) - return; + GList *fields = NULL; + GaimRoomlistField *f; if(!server || !*server) { gaim_notify_error(js->gc, _("Invalid Server"), _("Invalid Server"), NULL); return; } + if(js->roomlist) + gaim_roomlist_unref(js->roomlist); + + js->roomlist = gaim_roomlist_new(gaim_connection_get_account(js->gc)); + + f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_STRING, "", "room", TRUE); + fields = g_list_append(fields, f); + + f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_STRING, "", "server", TRUE); + fields = g_list_append(fields, f); + + f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_STRING, _("Description"), "description", FALSE); + fields = g_list_append(fields, f); + + gaim_roomlist_set_fields(js->roomlist, fields); + gaim_roomlist_set_in_progress(js->roomlist, TRUE); iq = jabber_iq_new_query(js, JABBER_IQ_GET, "http://jabber.org/protocol/disco#items"); @@ -704,24 +719,6 @@ GaimRoomlist *jabber_roomlist_get_list(GaimConnection *gc) { JabberStream *js = gc->proto_data; - GList *fields = NULL; - GaimRoomlistField *f; - - if(js->roomlist) - gaim_roomlist_unref(js->roomlist); - - js->roomlist = gaim_roomlist_new(gaim_connection_get_account(gc)); - - f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_STRING, "", "room", TRUE); - fields = g_list_append(fields, f); - - f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_STRING, "", "server", TRUE); - fields = g_list_append(fields, f); - - f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_STRING, _("Description"), "description", FALSE); - fields = g_list_append(fields, f); - - gaim_roomlist_set_fields(js->roomlist, fields); gaim_request_input(gc, _("Enter a Conference Server"), _("Enter a Conference Server"), _("Select a conference server to query"),