SF.net SVN: geany: [1380] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Fri Mar 9 18:14:34 UTC 2007


Revision: 1380
          http://svn.sourceforge.net/geany/?rev=1380&view=rev
Author:   eht16
Date:     2007-03-09 10:14:34 -0800 (Fri, 09 Mar 2007)

Log Message:
-----------
Added style "default" to filetypes.common to be able to change the default style for files without a filetype set.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-03-09 16:40:22 UTC (rev 1379)
+++ trunk/ChangeLog	2007-03-09 18:14:34 UTC (rev 1380)
@@ -11,6 +11,9 @@
    Set default highlighting style for filetype None to get it also
    inverted if invert_all is set.
    Reset all previously defined styles when switching filetype to None.
+ * data/filetypes.common, doc/geany.docbook, src/highlighting.c:
+   Added style "default" to filetypes.common to be able to change the
+   default style for files without a filetype set.
 
 
 

Modified: trunk/data/filetypes.common
===================================================================
--- trunk/data/filetypes.common	2007-03-09 16:40:22 UTC (rev 1379)
+++ trunk/data/filetypes.common	2007-03-09 18:14:34 UTC (rev 1380)
@@ -1,5 +1,8 @@
 # For complete documentation of this file, please see Geany's main documentation
 [styling]
+# foreground;background;bold;italic - used for filetype All/None
+default=0x000000;0xffffff;false;false
+
 # 3rd selection argument is true to override default foreground
 # 4th selection argument is true to override default background
 selection=0xc0c0c0;0x7f0000;false;false

Modified: trunk/doc/geany.docbook
===================================================================
--- trunk/doc/geany.docbook	2007-03-09 16:40:22 UTC (rev 1379)
+++ trunk/doc/geany.docbook	2007-03-09 18:14:34 UTC (rev 1380)
@@ -1720,6 +1720,13 @@
 							</thead>
 							<tbody>
 								<row>
+									<entry>default</entry>
+									<entry>This is the default style. It is used for styling files
+										   without a filetype set.
+									</entry>
+									<entry>default=0x000000;0xffffff;false;false</entry>
+								</row>
+								<row>
 									<entry>selection</entry>
 									<entry>
 										The style for colouring selected text.

Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c	2007-03-09 16:40:22 UTC (rev 1379)
+++ trunk/src/highlighting.c	2007-03-09 18:14:34 UTC (rev 1380)
@@ -60,6 +60,7 @@
 
 enum	// Geany common styling
 {
+	GCS_DEFAULT,
 	GCS_SELECTION,
 	GCS_BRACE_GOOD,
 	GCS_BRACE_BAD,
@@ -376,6 +377,8 @@
 
 	load_keyfiles(config, config_home, GEANY_FILETYPES_ALL);
 
+	get_keyfile_hex(config, config_home, "styling", "default",
+		"0x000000", "0xffffff", "false", &common_style_set.styling[GCS_DEFAULT]);
 	get_keyfile_hex(config, config_home, "styling", "selection",
 		"0xc0c0c0", "0x7f0000", "false", &common_style_set.styling[GCS_SELECTION]);
 	get_keyfile_hex(config, config_home, "styling", "brace_good",
@@ -1973,12 +1976,12 @@
 void styleset_none(ScintillaObject *sci)
 {
 	styleset_common(sci, 5);
+
 	SSM (sci, SCI_SETLEXER, SCLEX_NULL, 0);
 
 	SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) common_style_set.wordchars);
 
-	SSM(sci, SCI_STYLESETFORE, STYLE_DEFAULT, invert(0x000000));
-	SSM(sci, SCI_STYLESETBACK, STYLE_DEFAULT, invert(0xffffff));
+	set_sci_style(sci, STYLE_DEFAULT, GEANY_FILETYPES_ALL, GCS_DEFAULT);
 
 	SSM(sci, SCI_STYLECLEARALL, 0, 0);
 }


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