comparison src/buddy.c @ 84:51943f1a97a0

[gaim-migrate @ 94] Changed how some of the applet away and callbacks work so that you can't open the buddy list or be away without signing on first. Also made it so you can't try to sign on *while* signing on, by clicking "signon" while already signing on. Apparently, this had caused segfaults and other bad things to happen to some people. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 05 Apr 2000 21:46:07 +0000
parents dead1eb6d654
children 8923e3bd6c5a
comparison
equal deleted inserted replaced
83:8a98f129c849 84:51943f1a97a0
20 */ 20 */
21 21
22 #ifdef USE_APPLET 22 #ifdef USE_APPLET
23 #include <gnome.h> 23 #include <gnome.h>
24 #include <applet-widget.h> 24 #include <applet-widget.h>
25 #include "gnome_applet_mgr.h"
25 #endif /* USE_APPLET */ 26 #endif /* USE_APPLET */
26 #include <string.h> 27 #include <string.h>
27 #include <stdio.h> 28 #include <stdio.h>
28 #include <stdlib.h> 29 #include <stdlib.h>
29 #include <math.h> 30 #include <math.h>
297 } 298 }
298 299
299 #endif 300 #endif
300 301
301 302
303 extern enum gaim_user_states MRI_user_status;
302 void signoff() 304 void signoff()
303 { 305 {
304 GList *mem; 306 GList *mem;
305 while(groups) { 307 while(groups) {
306 mem = ((struct group *)groups->data)->members; 308 mem = ((struct group *)groups->data)->members;
315 serv_close(); 317 serv_close();
316 destroy_all_dialogs(); 318 destroy_all_dialogs();
317 destroy_buddy(); 319 destroy_buddy();
318 hide_login_progress(""); 320 hide_login_progress("");
319 #ifdef USE_APPLET 321 #ifdef USE_APPLET
322 MRI_user_status = offline;
320 set_applet_draw_closed(); 323 set_applet_draw_closed();
321 applet_widget_unregister_callback(APPLET_WIDGET(applet),"signoff"); 324 applet_widget_unregister_callback(APPLET_WIDGET(applet),"signoff");
322 remove_applet_away(); 325 remove_applet_away();
323 applet_widget_unregister_callback(APPLET_WIDGET(applet),"buddy"); 326 applet_widget_unregister_callback(APPLET_WIDGET(applet),"buddy");
324 applet_widget_register_callback(APPLET_WIDGET(applet), 327 applet_widget_register_callback(APPLET_WIDGET(applet),