Added style "default" to filetypes.common to be able to change the default style for files without a filetype set.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1380 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
fe2ee88919
commit
0b84fced12
@ -11,6 +11,9 @@
|
|||||||
Set default highlighting style for filetype None to get it also
|
Set default highlighting style for filetype None to get it also
|
||||||
inverted if invert_all is set.
|
inverted if invert_all is set.
|
||||||
Reset all previously defined styles when switching filetype to None.
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# For complete documentation of this file, please see Geany's main documentation
|
# For complete documentation of this file, please see Geany's main documentation
|
||||||
[styling]
|
[styling]
|
||||||
|
# foreground;background;bold;italic - used for filetype All/None
|
||||||
|
default=0x000000;0xffffff;false;false
|
||||||
|
|
||||||
# 3rd selection argument is true to override default foreground
|
# 3rd selection argument is true to override default foreground
|
||||||
# 4th selection argument is true to override default background
|
# 4th selection argument is true to override default background
|
||||||
selection=0xc0c0c0;0x7f0000;false;false
|
selection=0xc0c0c0;0x7f0000;false;false
|
||||||
|
@ -1719,6 +1719,13 @@
|
|||||||
</row>
|
</row>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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>
|
<row>
|
||||||
<entry>selection</entry>
|
<entry>selection</entry>
|
||||||
<entry>
|
<entry>
|
||||||
|
@ -60,6 +60,7 @@ static StyleSet style_sets[GEANY_MAX_FILE_TYPES - 1];
|
|||||||
|
|
||||||
enum // Geany common styling
|
enum // Geany common styling
|
||||||
{
|
{
|
||||||
|
GCS_DEFAULT,
|
||||||
GCS_SELECTION,
|
GCS_SELECTION,
|
||||||
GCS_BRACE_GOOD,
|
GCS_BRACE_GOOD,
|
||||||
GCS_BRACE_BAD,
|
GCS_BRACE_BAD,
|
||||||
@ -376,6 +377,8 @@ static void styleset_common_init(void)
|
|||||||
|
|
||||||
load_keyfiles(config, config_home, GEANY_FILETYPES_ALL);
|
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",
|
get_keyfile_hex(config, config_home, "styling", "selection",
|
||||||
"0xc0c0c0", "0x7f0000", "false", &common_style_set.styling[GCS_SELECTION]);
|
"0xc0c0c0", "0x7f0000", "false", &common_style_set.styling[GCS_SELECTION]);
|
||||||
get_keyfile_hex(config, config_home, "styling", "brace_good",
|
get_keyfile_hex(config, config_home, "styling", "brace_good",
|
||||||
@ -1973,12 +1976,12 @@ void styleset_docbook(ScintillaObject *sci)
|
|||||||
void styleset_none(ScintillaObject *sci)
|
void styleset_none(ScintillaObject *sci)
|
||||||
{
|
{
|
||||||
styleset_common(sci, 5);
|
styleset_common(sci, 5);
|
||||||
|
|
||||||
SSM (sci, SCI_SETLEXER, SCLEX_NULL, 0);
|
SSM (sci, SCI_SETLEXER, SCLEX_NULL, 0);
|
||||||
|
|
||||||
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) common_style_set.wordchars);
|
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) common_style_set.wordchars);
|
||||||
|
|
||||||
SSM(sci, SCI_STYLESETFORE, STYLE_DEFAULT, invert(0x000000));
|
set_sci_style(sci, STYLE_DEFAULT, GEANY_FILETYPES_ALL, GCS_DEFAULT);
|
||||||
SSM(sci, SCI_STYLESETBACK, STYLE_DEFAULT, invert(0xffffff));
|
|
||||||
|
|
||||||
SSM(sci, SCI_STYLECLEARALL, 0, 0);
|
SSM(sci, SCI_STYLECLEARALL, 0, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user