Revision: 2021
http://geany.svn.sourceforge.net/geany/?rev=2021&view=rev
Author: eht16
Date: 2007-11-05 10:05:49 -0800 (Mon, 05 Nov 2007)
Log Message:
-----------
Fix compile error on Windows.
Modified Paths:
--------------
trunk/src/document.c
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2007-11-05 16:15:58 UTC (rev 2020)
+++ trunk/src/document.c 2007-11-05 18:05:49 UTC (rev 2021)
@@ -1139,9 +1139,7 @@
gchar *data;
FILE *fp;
gint bytes_written, len;
-#ifndef G_OS_WIN32
gchar *locale_filename = NULL;
-#endif
if (! DOC_IDX_VALID(idx)) return FALSE;
// the changed flag should exclude the readonly flag, but check it anyway for safety
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2020
http://geany.svn.sourceforge.net/geany/?rev=2020&view=rev
Author: ntrel
Date: 2007-11-05 08:15:58 -0800 (Mon, 05 Nov 2007)
Log Message:
-----------
Update 'Adding a filetype' section for new highlighting.c code.
Modified Paths:
--------------
trunk/HACKING
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2007-11-05 15:09:13 UTC (rev 2019)
+++ trunk/HACKING 2007-11-05 16:15:58 UTC (rev 2020)
@@ -108,11 +108,6 @@
Add GEANY_FILETYPES_FOO to filetypes.h.
Initialize GEANY_FILETYPES_FOO in filetypes_init_types() of filetypes.c.
-The filetype::style_func_ptr is a callback for setting up styling
-information. The callback, styleset_foo(), should be added in
-highlighting.c. The first time it is called, the configuration should
-be loaded in styleset_foo_init(). For more details, see styleset_c(). If
-there isn't a Scintilla lexer, use styleset_none().
Rebuild Geany.
From your geany/ directory, run:
src/geany --generate-data-files
@@ -124,7 +119,7 @@
--generate-data-files argument to work - this is always defined in the
SVN version. Alternatively, edit the file by hand.
-Most languages will also need a data/filetypes.foo configuration file. See
+Most languages will need a data/filetypes.foo configuration file. See
data/filetypes.c for an example. For languages with a Scintilla lexer,
there should be a [styling] section, to correspond to the styles used
in styleset_foo().
@@ -134,16 +129,28 @@
[settings] mostly for comment settings.
[build_settings] for commands to run.
+For syntax highlighting, you will need to edit highlighting.c and add
+the following things:
+1. Write styleset_foo_init() to setup default styles and load style
+settings from the filetypes.foo configuration file. For details, see
+styleset_c_init().
+2. Write styleset_foo() to apply styles when a new scintilla widget
+is created. For details, see styleset_c().
+3. Add this in highlighting_init_styles():
+init_styleset_case(GEANY_FILETYPES_FOO, foo);
+4. Add this in highlighting_set_styles():
+styleset_case(GEANY_FILETYPES_FOO, foo);
+
Error message parsing is done in msgwin_parse_compiler_error_line() of
msgwindow.c. See the ParseData typedef for more information. (In future
this may be done with a regex).
-For brace indentation, see lexer_has_braces() in editor.c; other
-indentation is done from on_new_line_added().
+For brace indentation, update lexer_has_braces() in editor.c;
+indentation after ':' is done from on_new_line_added().
If the lexer has comment styles, you should add them in is_comment()
in editor.c. For now, this prevents calltips and autocompletion when
-typing in a comment.
+typing in a comment (but it can still be forced by the user).
If the Scintilla lexer supports user type keywords (e.g. SCLEX_CPP),
see editor_lexer_get_type_keyword_idx() in editor.c.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2014
http://geany.svn.sourceforge.net/geany/?rev=2014&view=rev
Author: eht16
Date: 2007-11-04 02:12:15 -0800 (Sun, 04 Nov 2007)
Log Message:
-----------
Add document_set_text_changed() to the plugin API.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/plugindata.h
trunk/src/plugins.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-04 10:06:06 UTC (rev 2013)
+++ trunk/ChangeLog 2007-11-04 10:12:15 UTC (rev 2014)
@@ -7,6 +7,8 @@
spaces(Linux and Windows).
* src/filetypes.c: Add support for env wrapper in shebang detection
(inspired by a patch from Yura Siamashka).
+ * src/plugindata.h, src/plugins.c:
+ Add document_set_text_changed() to the plugin API.
2007-11-02 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2007-11-04 10:06:06 UTC (rev 2013)
+++ trunk/src/plugindata.h 2007-11-04 10:12:15 UTC (rev 2014)
@@ -71,7 +71,7 @@
/* The API version should be incremented whenever any plugin data types below are
* modified or appended to. */
-static const gint api_version = 26;
+static const gint api_version = 27;
/* The ABI version should be incremented whenever existing fields in the plugin
* data types below have to be changed or reordered. It should stay the same if fields
@@ -196,6 +196,7 @@
gboolean (*remove)(guint page_num);
gboolean (*reload_file)(gint idx, const gchar *forced_enc);
void (*set_encoding)(gint idx, const gchar *new_encoding);
+ void (*set_text_changed)(gint idx);
}
DocumentFuncs;
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2007-11-04 10:06:06 UTC (rev 2013)
+++ trunk/src/plugins.c 2007-11-04 10:12:15 UTC (rev 2014)
@@ -87,7 +87,8 @@
&document_open_files,
&document_remove,
&document_reload_file,
- &document_set_encoding
+ &document_set_encoding,
+ &document_set_text_changed
};
static ScintillaFuncs sci_funcs = {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.