src/aim.c

changeset 3802
27af7e21b143
parent 3726
73f30897c81c
child 3806
ba97f1cada54
equal deleted inserted replaced
3801:c82bc5ba4b61 3802:27af7e21b143
50 #include "gaim.h" 50 #include "gaim.h"
51 #if HAVE_SIGNAL_H 51 #if HAVE_SIGNAL_H
52 #include <signal.h> 52 #include <signal.h>
53 #endif 53 #endif
54 #include "locale.h" 54 #include "locale.h"
55 #include "gtkspell.h"
56 #include <getopt.h> 55 #include <getopt.h>
57 56
58 #ifdef _WIN32 57 #ifdef _WIN32
59 #include "win32dep.h" 58 #include "win32dep.h"
60 #endif 59 #endif
394 g_on_error_query (g_get_prgname()); 393 g_on_error_query (g_get_prgname());
395 exit(1); 394 exit(1);
396 #endif 395 #endif
397 abort(); 396 abort();
398 break; 397 break;
399 case SIGCHLD:
400 clean_pid();
401 #if HAVE_SIGNAL_H
402 signal(SIGCHLD, sighandler); /* restore signal catching on this one! */
403 #endif
404 break;
405 default: 398 default:
406 debug_printf("caught signal %d\n", sig); 399 debug_printf("caught signal %d\n", sig);
407 gtkspell_stop();
408 signoff_all(NULL, NULL); 400 signoff_all(NULL, NULL);
409 #ifdef GAIM_PLUGINS 401 #ifdef GAIM_PLUGINS
410 remove_all_plugins(); 402 remove_all_plugins();
411 #endif 403 #endif
412 if (gtk_main_level()) 404 if (gtk_main_level())
797 opt_user_arg = NULL; 789 opt_user_arg = NULL;
798 } 790 }
799 791
800 if (misc_options & OPT_MISC_DEBUG) 792 if (misc_options & OPT_MISC_DEBUG)
801 show_debug(); 793 show_debug();
802 #ifndef _WIN32 794
803 /*If ispell fails to start, try using aspell in ispell compatibitity mode.
804 Gabber does this the same way -- lorien420@myrealbox.com*/
805 if (convo_options & OPT_CONVO_CHECK_SPELLING){
806 if (gtkspell_start(NULL, ispell_cmd)<0){
807 debug_printf("gtkspell failed to start when using ispell\n");
808 if (gtkspell_start(NULL, aspell_cmd)<0){
809 debug_printf("gtkspell failed to start when using aspell\n");
810 } else
811 debug_printf("gtkspell started with aspell\n");
812 } else {
813 debug_printf("gtkspell started with ispell\n");
814 }
815 }
816 #endif
817 static_proto_init(); 795 static_proto_init();
818 796
819 /* deal with --login */ 797 /* deal with --login */
820 if (opt_login) { 798 if (opt_login) {
821 dologin_ret = dologin_named(opt_login_arg); 799 dologin_ret = dologin_named(opt_login_arg);
836 /* Various win32 initializations */ 814 /* Various win32 initializations */
837 wgaim_init(); 815 wgaim_init();
838 #endif 816 #endif
839 817
840 gtk_main(); 818 gtk_main();
841 #ifndef _WIN32
842 if (convo_options & OPT_CONVO_CHECK_SPELLING)
843 gtkspell_stop();
844 #endif
845 core_quit(); 819 core_quit();
846 /* don't need ui_quit here because ui doesn't create anything */ 820 /* don't need ui_quit here because ui doesn't create anything */
847 821
848 return 0; 822 return 0;
849 823

mercurial