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

eht16 at users.sourceforge.net eht16 at xxxxx
Sat Feb 14 16:41:11 UTC 2009


Revision: 475
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=475&view=rev
Author:   eht16
Date:     2009-02-14 16:41:11 +0000 (Sat, 14 Feb 2009)

Log Message:
-----------
Display a pulsing progressbar while checking large documents.

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

Modified: trunk/spellcheck/ChangeLog
===================================================================
--- trunk/spellcheck/ChangeLog	2009-02-14 14:52:42 UTC (rev 474)
+++ trunk/spellcheck/ChangeLog	2009-02-14 16:41:11 UTC (rev 475)
@@ -1,3 +1,9 @@
+2009-02-14  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/speller.c:
+   Display a pulsing progressbar while checking large documents.
+
+
 2009-02-08  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * src/gui.c:

Modified: trunk/spellcheck/src/scplugin.c
===================================================================
--- trunk/spellcheck/src/scplugin.c	2009-02-14 14:52:42 UTC (rev 474)
+++ trunk/spellcheck/src/scplugin.c	2009-02-14 16:41:11 UTC (rev 475)
@@ -55,7 +55,7 @@
 GeanyFunctions	*geany_functions;
 
 
-PLUGIN_VERSION_CHECK(126)
+PLUGIN_VERSION_CHECK(132)
 PLUGIN_SET_INFO(_("Spell Check"), _("Checks the spelling of the current document."), "0.2",
 			_("The Geany developer team"))
 

Modified: trunk/spellcheck/src/speller.c
===================================================================
--- trunk/spellcheck/src/speller.c	2009-02-14 14:52:42 UTC (rev 474)
+++ trunk/spellcheck/src/speller.c	2009-02-14 16:41:11 UTC (rev 475)
@@ -178,6 +178,8 @@
 	g_return_if_fail(speller_dict != NULL);
 	g_return_if_fail(doc != NULL);
 
+	ui_progress_bar_start(_("Checking"));
+
 	enchant_dict_describe(speller_dict, dict_describe, &dict_string);
 
 	if (sci_has_selection(doc->editor->sci))
@@ -211,10 +213,15 @@
 
 		suggestions_found += speller_process_line(doc, i, line);
 
+		/* process other GTK events to keep the GUI being responsive */
+		while (g_main_context_iteration(NULL, FALSE));
+
 		g_free(line);
 	}
 	if (suggestions_found == 0 && sc->use_msgwin)
 		msgwin_msg_add(COLOR_BLUE, -1, NULL, _("The checked text is spelled correctly."));
+
+	ui_progress_bar_stop();
 }
 
 


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