SF.net SVN: geany: [652] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Jul 30 16:02:34 UTC 2006


Revision: 652
Author:   eht16
Date:     2006-07-30 09:02:21 -0700 (Sun, 30 Jul 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=652&view=rev

Log Message:
-----------
Added style to change the colour of the caret(closes #1530486).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/data/filetypes.common
    trunk/doc/geany.docbook
    trunk/src/highlighting.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-07-29 12:17:30 UTC (rev 651)
+++ trunk/ChangeLog	2006-07-30 16:02:21 UTC (rev 652)
@@ -1,3 +1,9 @@
+2006-07-30  Enrico Tröger  <enrico.troeger at uvena.de>
+
+ * doc/geany.docbook, data/filetypes.common, src/.c:
+   Added style to change the colour of the caret(closes #1530486).
+
+
 2006-07-29  Nick Treleaven  <nick.treleaven at btinternet.com>
 
  * src/msgwindow.c, src/msgwindow.h, src/callbacks.c, src/search.c:

Modified: trunk/data/filetypes.common
===================================================================
--- trunk/data/filetypes.common	2006-07-29 12:17:30 UTC (rev 651)
+++ trunk/data/filetypes.common	2006-07-30 16:02:21 UTC (rev 652)
@@ -11,7 +11,9 @@
 margin_folding=0x000000;0xdfdfdf;false;false
 # background colour of the current line, only the second and third argument is interpreted
 # use the third argument to enable or disable the highlighting of the current line (has to be true/false)
-current_line=0;0xe5e5e5;true;false
+current_line=0x0;0xe5e5e5;true;false
+# colour of the caret(the blinking cursor), only first argument is interpreted
+caret=0x000000;0x0;false;false
 # style of folding icons, only first and second arguments are used, valid values are:
 # first argument:  1 for boxes, 2 for circles
 # second argument: 1 for straight lines, 2 for curved lines

Modified: trunk/doc/geany.docbook
===================================================================
--- trunk/doc/geany.docbook	2006-07-29 12:17:30 UTC (rev 651)
+++ trunk/doc/geany.docbook	2006-07-30 16:02:21 UTC (rev 652)
@@ -1373,6 +1373,13 @@
 									<entry>brace_bad=0x0000ff;0xFFFFFF;true;false</entry>
 								</row>
 								<row>
+									<entry>caret</entry>
+									<entry>The style for colouring the caret(the blinking cursor).
+										   Only the first argument is interpreted.
+									</entry>
+									<entry>caret=0x000000;0x0;false;false</entry>
+								</row>
+								<row>
 									<entry>current_line</entry>
 									<entry>The style for colouring the background of the current
 										   line. Only the second argument is interpreted.

Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c	2006-07-29 12:17:30 UTC (rev 651)
+++ trunk/src/highlighting.c	2006-07-30 16:02:21 UTC (rev 652)
@@ -147,7 +147,7 @@
 
 static guint invert(guint icolour)
 {
-	if (types[GEANY_FILETYPES_ALL]->styling[8][0])
+	if (types[GEANY_FILETYPES_ALL]->styling[9][0])
 	{
 		guint r, g, b;
 
@@ -203,8 +203,9 @@
 	styleset_get_hex(config, config_home, "styling", "margin_linenumber", "0x000000", "0xd0d0d0", "false", types[GEANY_FILETYPES_ALL]->styling[4]);
 	styleset_get_hex(config, config_home, "styling", "margin_folding", "0x000000", "0xdfdfdf", "false", types[GEANY_FILETYPES_ALL]->styling[5]);
 	styleset_get_hex(config, config_home, "styling", "current_line", "0x000000", "0xe5e5e5", "true", types[GEANY_FILETYPES_ALL]->styling[6]);
-	styleset_get_int(config, config_home, "styling", "folding_style", 1, 1, types[GEANY_FILETYPES_ALL]->styling[7]);
-	styleset_get_int(config, config_home, "styling", "invert_all", 0, 0, types[GEANY_FILETYPES_ALL]->styling[8]);
+	styleset_get_hex(config, config_home, "styling", "caret", "0x000000", "0x000000", "false", types[GEANY_FILETYPES_ALL]->styling[7]);
+	styleset_get_int(config, config_home, "styling", "folding_style", 1, 1, types[GEANY_FILETYPES_ALL]->styling[8]);
+	styleset_get_int(config, config_home, "styling", "invert_all", 0, 0, types[GEANY_FILETYPES_ALL]->styling[9]);
 
 	types[GEANY_FILETYPES_ALL]->keywords = NULL;
 	styleset_get_wordchars(config, config_home, GEANY_FILETYPES_ALL, GEANY_WORDCHARS);
@@ -230,6 +231,9 @@
 	SSM(sci, SCI_SETUSETABS, TRUE, 0);
 	SSM(sci, SCI_SETTABWIDTH, app->pref_editor_tab_width, 0);
 
+	// caret colour
+	SSM(sci, SCI_SETCARETFORE, invert(types[GEANY_FILETYPES_ALL]->styling[7][0]), 0);
+
 	// colourize the current line
 	SSM(sci, SCI_SETCARETLINEBACK, invert(types[GEANY_FILETYPES_ALL]->styling[6][1]), 0);
 	SSM(sci, SCI_SETCARETLINEVISIBLE, types[GEANY_FILETYPES_ALL]->styling[6][2], 0);
@@ -257,7 +261,7 @@
 	SSM(sci, SCI_SETFOLDFLAGS, 0, 0);
 
 	// choose the folding style - boxes or circles, I prefer boxes, so it is default ;-)
-	switch (types[GEANY_FILETYPES_ALL]->styling[7][0])
+	switch (types[GEANY_FILETYPES_ALL]->styling[8][0])
 	{
 		case 2:
 		{
@@ -278,7 +282,7 @@
 	}
 
 	// choose the folding style - straight or curved, I prefer straight, so it is default ;-)
-	switch (types[GEANY_FILETYPES_ALL]->styling[7][1])
+	switch (types[GEANY_FILETYPES_ALL]->styling[8][1])
 	{
 		case 2:
 		{


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