SF.net SVN: geany-plugins:[1058] trunk/geany-plugins/spellcheck

eht16 at users.sourceforge.net eht16 at xxxxx
Sat Nov 28 13:01:27 UTC 2009


Revision: 1058
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1058&view=rev
Author:   eht16
Date:     2009-11-28 13:01:26 +0000 (Sat, 28 Nov 2009)

Log Message:
-----------
Try to make broker initialisation a bit more robust.

Modified Paths:
--------------
    trunk/geany-plugins/spellcheck/ChangeLog
    trunk/geany-plugins/spellcheck/src/speller.c

Modified: trunk/geany-plugins/spellcheck/ChangeLog
===================================================================
--- trunk/geany-plugins/spellcheck/ChangeLog	2009-11-23 10:46:15 UTC (rev 1057)
+++ trunk/geany-plugins/spellcheck/ChangeLog	2009-11-28 13:01:26 UTC (rev 1058)
@@ -1,3 +1,9 @@
+2009-11-28  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/speller.c:
+   Try to make broker initialisation a bit more robust.
+
+
 2009-09-30  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * src/scplugin.c, src/scplugin.h, src/gui.c, src/gui.h, src/speller.c:

Modified: trunk/geany-plugins/spellcheck/src/speller.c
===================================================================
--- trunk/geany-plugins/spellcheck/src/speller.c	2009-11-23 10:46:15 UTC (rev 1057)
+++ trunk/geany-plugins/spellcheck/src/speller.c	2009-11-28 13:01:26 UTC (rev 1058)
@@ -378,7 +378,7 @@
 
 void sc_speller_reinit_enchant_dict(void)
 {
-	gchar *lang = sc_info->default_language;
+	const gchar *lang = sc_info->default_language;
 
 	/* Release a previous dict object */
 	if (sc_speller_dict != NULL)
@@ -404,9 +404,9 @@
 #endif
 	create_dicts_array();
 
-	/* Check if the stored default dictionary is (still) avaiable, fall back to the first
+	/* Check if the stored default dictionary is (still) available, fall back to the first
 	 * one in the list if not */
-	if (! check_default_lang())
+	if (! NZV(lang) || ! check_default_lang())
 	{
 		if (sc_info->dicts->len > 0)
 		{
@@ -419,7 +419,10 @@
 	}
 
 	/* Request new dict object */
-	sc_speller_dict = enchant_broker_request_dict(sc_speller_broker, lang);
+	if (NZV(lang))
+		sc_speller_dict = enchant_broker_request_dict(sc_speller_broker, lang);
+	else
+		sc_speller_dict = NULL;
 	if (sc_speller_dict == NULL)
 	{
 		broker_init_failed();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list