comparison libpurple/protocols/jabber/jabber.c @ 16822:a77901ef0ebb

this should fix jabber buddy icons (but it will re-introduce the behavior of overwriting your vCard whenever you sign in). Until we get pubsub icons going, this is how we're gonna be stuck.
author Nathan Walp <nwalp@pidgin.im>
date Thu, 03 May 2007 12:04:04 +0000
parents 1ac4039a2634
children 56042b2f8b64 f35329c1094e
comparison
equal deleted inserted replaced
16802:ffd962a5d9dc 16822:a77901ef0ebb
1028 gc->proto_data = NULL; 1028 gc->proto_data = NULL;
1029 } 1029 }
1030 1030
1031 void jabber_stream_set_state(JabberStream *js, JabberStreamState state) 1031 void jabber_stream_set_state(JabberStream *js, JabberStreamState state)
1032 { 1032 {
1033 PurpleStoredImage *img;
1034
1033 js->state = state; 1035 js->state = state;
1034 switch(state) { 1036 switch(state) {
1035 case JABBER_STREAM_OFFLINE: 1037 case JABBER_STREAM_OFFLINE:
1036 break; 1038 break;
1037 case JABBER_STREAM_CONNECTING: 1039 case JABBER_STREAM_CONNECTING:
1053 } 1055 }
1054 break; 1056 break;
1055 case JABBER_STREAM_REINITIALIZING: 1057 case JABBER_STREAM_REINITIALIZING:
1056 purple_connection_update_progress(js->gc, _("Re-initializing Stream"), 1058 purple_connection_update_progress(js->gc, _("Re-initializing Stream"),
1057 (js->gsc ? 7 : 4), JABBER_CONNECT_STEPS); 1059 (js->gsc ? 7 : 4), JABBER_CONNECT_STEPS);
1058 1060
1059 /* The stream will be reinitialized later, in jabber_recv_cb_ssl() */ 1061 /* The stream will be reinitialized later, in jabber_recv_cb_ssl() */
1060 js->reinit = TRUE; 1062 js->reinit = TRUE;
1061 1063
1062 break; 1064 break;
1063 case JABBER_STREAM_CONNECTED: 1065 case JABBER_STREAM_CONNECTED:
1066 /* lets make sure our buddy icon is up to date
1067 * before we go letting people know we're here */
1068 img = purple_buddy_icons_find_account_icon(js->gc->account);
1069 jabber_set_buddy_icon(js->gc, img);
1070 purple_imgstore_unref(img);
1071
1072 /* now we can alert the core that we're ready to send status */
1064 purple_connection_set_state(js->gc, PURPLE_CONNECTED); 1073 purple_connection_set_state(js->gc, PURPLE_CONNECTED);
1065 jabber_disco_items_server(js); 1074 jabber_disco_items_server(js);
1066 break; 1075 break;
1067 } 1076 }
1068 } 1077 }