SF.net SVN: geany:[4854] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Apr 22 17:16:47 UTC 2010


Revision: 4854
          http://geany.svn.sourceforge.net/geany/?rev=4854&view=rev
Author:   ntrel
Date:     2010-04-22 17:16:46 +0000 (Thu, 22 Apr 2010)

Log Message:
-----------
Support more folding icon styles: arrows, +/- and no lines
(#2935059).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/data/filetypes.common
    trunk/doc/geany.html
    trunk/doc/geany.txt
    trunk/src/highlighting.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-04-22 16:02:45 UTC (rev 4853)
+++ trunk/ChangeLog	2010-04-22 17:16:46 UTC (rev 4854)
@@ -11,6 +11,10 @@
    Support {pc} wildcard in snippets to escape percent char.
  * src/editor.c:
    Recalculate line margin width when zooming (fixes #2990553).
+ * src/highlighting.c, doc/geany.txt, doc/geany.html,
+   data/filetypes.common:
+   Support more folding icon styles: arrows, +/- and no lines
+   (#2935059).
 
 
 2010-04-21  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/data/filetypes.common
===================================================================
--- trunk/data/filetypes.common	2010-04-22 16:02:45 UTC (rev 4853)
+++ trunk/data/filetypes.common	2010-04-22 17:16:46 UTC (rev 4854)
@@ -57,8 +57,8 @@
 white_space=0xc0c0c0;0xffffff;true;false
 
 # style of folding icons, valid values are:
-# first argument:  1 for boxes, 2 for circles
-# second argument: 1 for straight lines, 2 for curved lines
+# first argument:  1 for boxes, 2 for circles, 3 for arrows, 4 for +/-
+# second argument: 1 for straight lines, 2 for curved lines or 0 for none
 folding_style=1;1;
 
 # should an horizontal line be drawn at the line where text is folded

Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html	2010-04-22 16:02:45 UTC (rev 4853)
+++ trunk/doc/geany.html	2010-04-22 17:16:46 UTC (rev 4854)
@@ -6,7 +6,7 @@
 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
 <title>Geany</title>
 <meta name="authors" content="Enrico Tröger  Nick Treleaven  Frank Lanitz" />
-<meta name="date" content="2010-04-21" />
+<meta name="date" content="2010-04-22" />
 <style type="text/css">
 
 /*
@@ -139,7 +139,7 @@
 <br />Nick Treleaven
 <br />Frank Lanitz</td></tr>
 <tr><th class="docinfo-name">Date:</th>
-<td>2010-04-21</td></tr>
+<td>2010-04-22</td></tr>
 <tr><th class="docinfo-name">Version:</th>
 <td>0.19</td></tr>
 </tbody>
@@ -4446,13 +4446,17 @@
 <ul class="simple">
 <li>1 -- for boxes</li>
 <li>2 -- for circles</li>
+<li>3 -- for arrows</li>
+<li>4 -- for +/-</li>
 </ul>
 <p>Valid values for the second argument are:</p>
 <ul class="simple">
+<li>0 -- for no lines</li>
 <li>1 -- for straight lines</li>
 <li>2 -- for curved lines</li>
 </ul>
-<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">folding_style=1;1;false;false</span></tt></p>
+<p><em>Example:</em> <tt class="docutils literal"><span class="pre">folding_style=1;1;</span></tt></p>
+<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">folding_style=3;0;</span></tt></p>
 </dd>
 <dt>folding_horiz_line</dt>
 <dd><p class="first">Draw a thin horizontal line at the line where text is folded. Only
@@ -6001,7 +6005,7 @@
 <div class="footer">
 <hr class="footer" />
 <a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2010-04-22 12:45 UTC.
+Generated on: 2010-04-22 16:49 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-04-22 16:02:45 UTC (rev 4853)
+++ trunk/doc/geany.txt	2010-04-22 17:16:46 UTC (rev 4854)
@@ -3807,14 +3807,19 @@
 
     * 1 -- for boxes
     * 2 -- for circles
+    * 3 -- for arrows
+    * 4 -- for +/-
 
     Valid values for the second argument are:
 
+    * 0 -- for no lines
     * 1 -- for straight lines
     * 2 -- for curved lines
 
-    *Example:* ``folding_style=1;1;false;false``
+    *Example:* ``folding_style=1;1;``
 
+    *Example:* ``folding_style=3;0;``
+
 folding_horiz_line
     Draw a thin horizontal line at the line where text is folded. Only
     first argument is used.

Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c	2010-04-22 16:02:45 UTC (rev 4853)
+++ trunk/src/highlighting.c	2010-04-22 17:16:46 UTC (rev 4854)
@@ -99,9 +99,11 @@
 {
 	GeanyLexerStyle	 styling[GCS_MAX];
 
-	/* can take values 1 or 2 (or 3) */
+	/* icon style, 1-4 */
 	gint fold_marker;
+	/* vertical line style, 0-2 */
 	gint fold_lines;
+	/* horizontal line when folded, 0-2 */
 	gint fold_draw_line;
 
 	gchar			*wordchars;
@@ -702,45 +704,52 @@
 	}
 
 	/* choose the folding style - boxes or circles, I prefer boxes, so it is default ;-) */
+	SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEREND, SC_MARK_EMPTY);
+	SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEROPENMID, SC_MARK_EMPTY);
 	switch (common_style_set.fold_marker)
 	{
 		case 2:
-		{
-			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS);
-			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS);
-			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDEREND, SC_MARK_CIRCLEPLUSCONNECTED);
-			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDEROPENMID, SC_MARK_CIRCLEMINUSCONNECTED);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEREND, SC_MARK_CIRCLEPLUSCONNECTED);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEROPENMID, SC_MARK_CIRCLEMINUSCONNECTED);
 			break;
-		}
 		default:
-		{
-			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS);
-			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS);
-			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDEREND, SC_MARK_BOXPLUSCONNECTED);
-			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDEROPENMID, SC_MARK_BOXMINUSCONNECTED);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEREND, SC_MARK_BOXPLUSCONNECTED);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEROPENMID, SC_MARK_BOXMINUSCONNECTED);
 			break;
-		}
+		case 3:
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEROPEN, SC_MARK_ARROWDOWN);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDER, SC_MARK_ARROW);
+			break;
+		case 4:
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDEROPEN, SC_MARK_MINUS);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDER, SC_MARK_PLUS);
+			break;
 	}
 
 	/* choose the folding style - straight or curved, I prefer straight, so it is default ;-) */
 	switch (common_style_set.fold_lines)
 	{
 		case 2:
-		{
 			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNERCURVE);
 			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNERCURVE);
+			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE);
 			break;
-		}
 		default:
-		{
 			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNER);
 			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNER);
+			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE);
 			break;
-		}
+		case 0:
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_EMPTY);
+			SSM(sci, SCI_MARKERDEFINE, SC_MARKNUM_FOLDERTAIL, SC_MARK_EMPTY);
+			SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDERSUB, SC_MARK_EMPTY);
+			break;
 	}
 
-	SSM(sci, SCI_MARKERDEFINE,  SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE);
-
 	SSM(sci, SCI_MARKERSETFORE, SC_MARKNUM_FOLDEROPEN, 0xffffff);
 	SSM(sci, SCI_MARKERSETBACK, SC_MARKNUM_FOLDEROPEN, 0x000000);
 	SSM(sci, SCI_MARKERSETFORE, SC_MARKNUM_FOLDER, 0xffffff);


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