- /* In tempdict, we have only the dict name, without path nor
- extension. Useful in the popup menus */
-
- tempdict=g_strdup(buf);
-
- /* Probably I am too paranoied... */
- if(!( language[0]!=0x00 && language[1]!=0x00))
- language = NULL;
- else{
- spelling = strchr(language,'-');
- if( spelling!=NULL ){
- spelling[0] = 0x00;
- spelling++;
- }
- if( spelling!=module ){
- if( ( end=strchr( spelling,'-' ) )!=NULL ){
- end[0] = 0x00;
- jargon = end+1;
- if( jargon!=module )
- if( ( end=strchr(jargon,'-') )!=NULL )
- end[0] = 0x00;
- else
- jargon = NULL;
- else
- jargon = NULL;
- }
- else
- spelling = NULL;
- }
- else
- spelling = NULL;
- }
-
- debug_print( _("Language : %s\nSpelling: %s\nJargon: %s\nModule: %s\n"),language,spelling,jargon,module);
-
- if(language)
- pspell_config_replace(config,"language-tag",language);
- if(spelling)
- pspell_config_replace(config,"spelling",spelling);
- if(jargon)
- pspell_config_replace(config,"jargon",jargon);
- if(module)
- pspell_config_replace(config,"module",module);
- if(temppath)
- pspell_config_replace(config,"word-list-path",temppath);
-
- switch(gtkpspell->mode){
- case PSPELL_FASTMODE: pspell_config_replace(config,"sug_mode","fast");
- break;
- case PSPELL_NORMALMODE: pspell_config_replace(config,"sug_mode","normal");
- break;
- case PSPELL_BADSPELLERMODE: pspell_config_replace(config,"sug_mode","bad-spellers");
- break;
- }
+ /* In tempdict, we have only the dict name, without path nor
+ * extension. Useful in the popup menus */
+
+ tempdict = g_strdup(buf);
+
+ /* Probably I am too paranoied... */
+ if (!( language[0] != 0x00 && language[1] != 0x00))
+ language = NULL;
+ else {
+ spelling = strchr(language,'-');
+ if (spelling!=NULL) {
+ *spelling = 0;
+ spelling++;
+ }
+ if (spelling != module) {
+ if ((end = strchr(spelling, '-' )) != NULL) {
+ *end = 0;
+ jargon = end + 1;
+ if (jargon != module)
+ if ((end = strchr(jargon, '-')) != NULL)
+ *end = 0;
+ else
+ jargon = NULL;
+ else
+ jargon = NULL;
+ }
+ else
+ spelling = NULL;
+ }
+ else
+ spelling = NULL;
+ }
+
+ debug_print(_("Language : %s\nSpelling: %s\nJargon: %s\nModule: %s\n"),
+ language, spelling, jargon, module);
+
+ if (language)
+ pspell_config_replace(config, "language-tag", language);
+ if (spelling)
+ pspell_config_replace(config, "spelling", spelling);
+ if (jargon)
+ pspell_config_replace(config, "jargon", jargon);
+ if (module)
+ pspell_config_replace(config, "module", module);
+ if (temppath)
+ pspell_config_replace(config, "word-list-path", temppath);
+
+ switch(gtkpspell->mode) {
+ case PSPELL_FASTMODE:
+ pspell_config_replace(config, "sug_mode", "fast");
+ break;
+ case PSPELL_NORMALMODE:
+ pspell_config_replace(config, "sug_mode", "normal");
+ break;
+ case PSPELL_BADSPELLERMODE:
+ pspell_config_replace(config, "sug_mode", "bad-spellers");
+ break;
+ }