Mercurial > hg
comparison mcabber/src/main.c @ 1590:8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Patch from the issue tracker:
http://bitbucket.org/McKael/mcabber-crew/issue/36/patch-to-spell-checking-using-enchant
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 04 Oct 2009 19:33:38 +0200 |
parents | 31472d421267 |
children | 4f59a414217e |
comparison
equal
deleted
inserted
replaced
1589:23c08d4f1d1e | 1590:8d1bcc83ae32 |
---|---|
298 puts("Compiled with GPG support."); | 298 puts("Compiled with GPG support."); |
299 #endif | 299 #endif |
300 #ifdef HAVE_LIBOTR | 300 #ifdef HAVE_LIBOTR |
301 puts("Compiled with OTR support."); | 301 puts("Compiled with OTR support."); |
302 #endif | 302 #endif |
303 #ifdef WITH_ENCHANT | |
304 puts("Compiled with Enchant support."); | |
305 #endif | |
303 #ifdef WITH_ASPELL | 306 #ifdef WITH_ASPELL |
304 puts("Compiled with Aspell support."); | 307 puts("Compiled with Aspell support."); |
305 #endif | 308 #endif |
306 #ifdef ENABLE_DEBUG | 309 #ifdef ENABLE_DEBUG |
307 puts("Compiled with debugging support."); | 310 puts("Compiled with debugging support."); |
468 optval = (settings_opt_get_int("logging") > 0); | 471 optval = (settings_opt_get_int("logging") > 0); |
469 optval2 = (settings_opt_get_int("load_logs") > 0); | 472 optval2 = (settings_opt_get_int("load_logs") > 0); |
470 if (optval || optval2) | 473 if (optval || optval2) |
471 hlog_enable(optval, settings_opt_get("logging_dir"), optval2); | 474 hlog_enable(optval, settings_opt_get("logging_dir"), optval2); |
472 | 475 |
473 #ifdef HAVE_ASPELL_H | 476 #if defined(WITH_ENCHANT) || defined(WITH_ASPELL) |
474 /* Initialize aspell */ | 477 /* Initialize spelling */ |
475 if (settings_opt_get_int("aspell_enable")) { | 478 if (settings_opt_get_int("spell_enable")) { |
476 spellcheck_init(); | 479 spellcheck_init(); |
477 } | 480 } |
478 #endif | 481 #endif |
479 | 482 |
480 optstring = settings_opt_get("events_command"); | 483 optstring = settings_opt_get("events_command"); |
542 #endif | 545 #endif |
543 jb_disconnect(); | 546 jb_disconnect(); |
544 #ifdef HAVE_GPGME | 547 #ifdef HAVE_GPGME |
545 gpg_terminate(); | 548 gpg_terminate(); |
546 #endif | 549 #endif |
547 #ifdef HAVE_ASPELL_H | 550 #if defined(WITH_ENCHANT) || defined(WITH_ASPELL) |
548 /* Deinitialize aspell */ | 551 /* Deinitialize spelling */ |
549 if (settings_opt_get_int("aspell_enable")) | 552 if (settings_opt_get_int("spell_enable")) |
550 spellcheck_deinit(); | 553 spellcheck_deinit(); |
551 #endif | 554 #endif |
552 /* Save pending message state */ | 555 /* Save pending message state */ |
553 hlog_save_state(); | 556 hlog_save_state(); |
554 | 557 |