SF.net SVN: geany:[5081] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Jul 1 17:08:00 UTC 2010


Revision: 5081
          http://geany.svn.sourceforge.net/geany/?rev=5081&view=rev
Author:   ntrel
Date:     2010-07-01 17:08:00 +0000 (Thu, 01 Jul 2010)

Log Message:
-----------
Limit build error editor indicators to 50, but parse all errors in
the Compiler tab (fixes #3019823).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/geany.html
    trunk/doc/geany.txt
    trunk/src/build.c
    trunk/src/build.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/ChangeLog	2010-07-01 17:08:00 UTC (rev 5081)
@@ -10,6 +10,9 @@
  * src/printing.c, doc/geany.txt, doc/geany.html:
    Always use white background color when printing (except for text
    with a white foreground) to save ink (should fix #2968998).
+ * src/build.c, src/build.h, doc/geany.txt, doc/geany.html:
+   Limit build error editor indicators to 50, but parse all errors in
+   the Compiler tab (fixes #3019823).
 
 
 2010-06-30  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html	2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/doc/geany.html	2010-07-01 17:08:00 UTC (rev 5081)
@@ -474,12 +474,11 @@
 <li><a class="reference" href="#project-h" id="id216" name="id216">project.h</a></li>
 <li><a class="reference" href="#editor-h" id="id217" name="id217">editor.h</a></li>
 <li><a class="reference" href="#keyfile-c" id="id218" name="id218">keyfile.c</a></li>
-<li><a class="reference" href="#build-h" id="id219" name="id219">build.h</a></li>
-<li><a class="reference" href="#build-c" id="id220" name="id220">build.c</a></li>
+<li><a class="reference" href="#build-c" id="id219" name="id219">build.c</a></li>
 </ul>
 </li>
-<li><a class="reference" href="#gnu-general-public-license" id="id221" name="id221">GNU General Public License</a></li>
-<li><a class="reference" href="#license-for-scintilla-and-scite" id="id222" name="id222">License for Scintilla and SciTE</a></li>
+<li><a class="reference" href="#gnu-general-public-license" id="id220" name="id220">GNU General Public License</a></li>
+<li><a class="reference" href="#license-for-scintilla-and-scite" id="id221" name="id221">License for Scintilla and SciTE</a></li>
 </ul>
 </div>
 <div class="section">
@@ -5726,7 +5725,7 @@
 </table>
 </div>
 <div class="section">
-<h2><a class="toc-backref" href="#id219" id="build-h" name="build-h">build.h</a></h2>
+<h2><a class="toc-backref" href="#id219" id="build-c" name="build-c">build.c</a></h2>
 <table border="1" class="docutils">
 <colgroup>
 <col width="33%" />
@@ -5741,35 +5740,19 @@
 </thead>
 <tbody valign="top">
 <tr><td>GEANY_BUILD_ERR_HIGHLIGHT_MAX</td>
-<td>Amount of build error messages which should
-be highlighted in the Compiler message
-window. This affects the special coloring
+<td>Amount of build error indicators to
+be shown in the editor window.
+This affects the special coloring
 when Geany detects a compiler output line as
-an error message and then highlight the
+an error message and then highlights the
 corresponding line in the source code.
 Usually only the first few messages are
 interesting because following errors are
-just aftereffects.</td>
-<td>100</td>
+just after-effects.
+All errors in the Compiler window are parsed
+and unaffected by this value.</td>
+<td>50</td>
 </tr>
-</tbody>
-</table>
-</div>
-<div class="section">
-<h2><a class="toc-backref" href="#id220" id="build-c" name="build-c">build.c</a></h2>
-<table border="1" class="docutils">
-<colgroup>
-<col width="33%" />
-<col width="48%" />
-<col width="20%" />
-</colgroup>
-<thead valign="bottom">
-<tr><th class="head">Option</th>
-<th class="head">Description</th>
-<th class="head">Default</th>
-</tr>
-</thead>
-<tbody valign="top">
 <tr><td>PRINTBUILDCMDS</td>
 <td>Every time a build menu item priority
 calculation is run, print the state of the
@@ -5787,7 +5770,7 @@
 </div>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id221" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1>
+<h1><a class="toc-backref" href="#id220" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1>
 <pre class="literal-block">
             GNU GENERAL PUBLIC LICENSE
                Version 2, June 1991
@@ -6132,7 +6115,7 @@
 </pre>
 </div>
 <div class="section">
-<h1><a class="toc-backref" href="#id222" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1>
+<h1><a class="toc-backref" href="#id221" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1>
 <p>Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org></p>
 <p>All Rights Reserved</p>
 <p>Permission to use, copy, modify, and distribute this software and
@@ -6152,7 +6135,7 @@
 <div class="footer">
 <hr class="footer" />
 <a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2010-07-01 16:16 UTC.
+Generated on: 2010-07-01 17:04 UTC.
 Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
 
 </div>

Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt	2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/doc/geany.txt	2010-07-01 17:08:00 UTC (rev 5081)
@@ -4754,29 +4754,23 @@
                                 Geany provide.
 ==============================  ============================================  ==================
 
-build.h
+build.c
 -------
 
 ==============================  ============================================  ==================
 Option                          Description                                   Default
 ==============================  ============================================  ==================
-GEANY_BUILD_ERR_HIGHLIGHT_MAX   Amount of build error messages which should   100
-                                be highlighted in the Compiler message
-                                window. This affects the special coloring
+GEANY_BUILD_ERR_HIGHLIGHT_MAX   Amount of build error indicators to           50
+                                be shown in the editor window.
+                                This affects the special coloring
                                 when Geany detects a compiler output line as
-                                an error message and then highlight the
+                                an error message and then highlights the
                                 corresponding line in the source code.
                                 Usually only the first few messages are
                                 interesting because following errors are
-                                just aftereffects.
-==============================  ============================================  ==================
-
-build.c
--------
-
-==============================  ============================================  ==================
-Option                          Description                                   Default
-==============================  ============================================  ==================
+                                just after-effects.
+                                All errors in the Compiler window are parsed
+                                and unaffected by this value.
 PRINTBUILDCMDS                  Every time a build menu item priority         FALSE
                                 calculation is run, print the state of the
                                 menu item table in the form of the table

Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c	2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/src/build.c	2010-07-01 17:08:00 UTC (rev 5081)
@@ -60,7 +60,10 @@
 #include "toolbar.h"
 #include "geanymenubuttonaction.h"
 
+/* Number of editor indicators to draw - limited as this can affect performance */
+#define GEANY_BUILD_ERR_HIGHLIGHT_MAX 50
 
+
 GeanyBuildInfo build_info = {GEANY_GBG_FT, 0, 0, NULL, GEANY_FILETYPES_NONE, NULL, 0};
 
 static gchar *current_dir_entered = NULL;
@@ -968,6 +971,8 @@
 static void process_build_output_line(const gchar *str, gint color)
 {
 	gchar *msg, *tmp;
+	gchar *filename;
+	gint line;
 
 	msg = g_strdup(str);
 
@@ -976,34 +981,30 @@
 	if (! NZV(msg))
 		return;
 
-	if (build_info.message_count < GEANY_BUILD_ERR_HIGHLIGHT_MAX)
+	if (build_parse_make_dir(msg, &tmp))
 	{
-		gchar *filename;
-		gint line;
+		setptr(current_dir_entered, tmp);
+	}
+	msgwin_parse_compiler_error_line(msg, current_dir_entered, &filename, &line);
 
-		build_info.message_count++;
+	if (line != -1 && filename != NULL)
+	{
+		GeanyDocument *doc = document_find_by_filename(filename);
 
-		if (build_parse_make_dir(msg, &tmp))
+		/* limit number of indicators */
+		if (doc && editor_prefs.use_indicators &&
+			build_info.message_count < GEANY_BUILD_ERR_HIGHLIGHT_MAX)
 		{
-			setptr(current_dir_entered, tmp);
+			if (line > 0) /* some compilers, like pdflatex report errors on line 0 */
+				line--;   /* so only adjust the line number if it is greater than 0 */
+			editor_indicator_set_on_line(doc->editor, GEANY_INDICATOR_ERROR, line);
 		}
-		msgwin_parse_compiler_error_line(msg, current_dir_entered, &filename, &line);
-		if (line != -1 && filename != NULL)
-		{
-			GeanyDocument *doc = document_find_by_filename(filename);
+		build_info.message_count++;
+		color = COLOR_RED;	/* error message parsed on the line */
+	}
+	g_free(filename);
 
-			if (doc && editor_prefs.use_indicators)
-			{
-				if (line > 0) /* some compilers, like pdflatex report errors on line 0 */
-					line--;   /* so only adjust the line number if it is greater than 0 */
-				editor_indicator_set_on_line(doc->editor, GEANY_INDICATOR_ERROR, line);
-			}
-			color = COLOR_RED;	/* error message parsed on the line */
-		}
-		g_free(filename);
-	}
 	msgwin_compiler_add_string(color, msg);
-
 	g_free(msg);
 }
 

Modified: trunk/src/build.h
===================================================================
--- trunk/src/build.h	2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/src/build.h	2010-07-01 17:08:00 UTC (rev 5081)
@@ -26,8 +26,6 @@
 #ifndef GEANY_BUILD_H
 #define GEANY_BUILD_H 1
 
-#define GEANY_BUILD_ERR_HIGHLIGHT_MAX 100
-
 /* Order is important (see GBO_TO_GBG, GBO_TO_CMD below) */
 /** Geany Known Build Commands.
  * These commands are named after their default use.


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



More information about the Commits mailing list