Revision: 2411
http://geany.svn.sourceforge.net/geany/?rev=2411&view=rev
Author: ntrel
Date: 2008-03-26 10:10:18 -0700 (Wed, 26 Mar 2008)
Log Message:
-----------
Rename VERSION_CHECK PLUGIN_VERSION_CHECK, but keep a deprecated
alias so outside plugins still compile.
Update our plugins to use this.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/plugin-symbols.c
trunk/doc/plugins.dox
trunk/plugins/autosave.c
trunk/plugins/classbuilder.c
trunk/plugins/demoplugin.c
trunk/plugins/export.c
trunk/plugins/filebrowser.c
trunk/plugins/htmlchars.c
trunk/plugins/vcdiff.c
trunk/src/plugindata.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/ChangeLog 2008-03-26 17:10:18 UTC (rev 2411)
@@ -9,6 +9,13 @@
* plugins/pluginmacros.h:
Rename p_filetype p_filetypes to keep the symmetry with filetypes_*,
and define it also when GEANY_DISABLE_DEPRECATED is not set.
+ * HACKING:
+ Add note about not appending to structs like KeyBindingGroup and
+ GeanyCallback.
+ * src/plugindata.h, doc/plugin-symbols.c, doc/plugins.dox, plugins/*.c:
+ Rename VERSION_CHECK PLUGIN_VERSION_CHECK, but keep a deprecated
+ alias so outside plugins still compile.
+ Update our plugins to use this.
2008-03-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/doc/plugin-symbols.c
===================================================================
--- trunk/doc/plugin-symbols.c 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/doc/plugin-symbols.c 2008-03-26 17:10:18 UTC (rev 2411)
@@ -34,7 +34,7 @@
* @link plugindata.h @endlink.
*/
-/** Use the VERSION_CHECK() macro instead. Required by Geany. */
+/** Use the PLUGIN_VERSION_CHECK() macro instead. Required by Geany. */
gint version_check(gint);
/** Use the PLUGIN_INFO() macro to define it. Required by Geany. */
Modified: trunk/doc/plugins.dox
===================================================================
--- trunk/doc/plugins.dox 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/doc/plugins.dox 2008-03-26 17:10:18 UTC (rev 2411)
@@ -41,8 +41,8 @@
* To get started, see the @link howto Plugin Howto @endlink.
*
* Other pages:
- * - @link signals Plugin Signals @endlink.
- * - @link plugin-symbols.c Plugin Symbols @endlink.
+ * - @link signals Plugin Signals @endlink
+ * - @link plugin-symbols.c Plugin Symbols @endlink
*
* @note Some of these pages are also listed in Related Pages.
*/
@@ -178,14 +178,14 @@
* Every plugin should include "geany.h" and "plugindata.h" which provide necessary
* preprocessor macros and other basic information.
* There are two important preprocessor macros which need to be used at the beginning:
- * PLUGIN_INFO() and VERSION_CHECK().
+ * PLUGIN_INFO() and PLUGIN_VERSION_CHECK().
*
* PLUGIN_INFO() tells Geany about basic plugin information like name, description,
* version and author of the plugin.
*
- * VERSION_CHECK() checks for compatibility of the API version which the plugin uses with
- * the used Geany sources. Furthermore, it also checks the binary compatiblity of the plugin
- * with Geany.
+ * PLUGIN_VERSION_CHECK() checks for compatibility of the API version which
+ * the plugin uses with the used Geany sources. Furthermore, it also checks
+ * the binary compatiblity of the plugin with Geany.
*
* A few functions are necessary to let Geany work with the plugin, at least init() must
* exist in the plugin. cleanup() should also be used to free allocated memory or destroy
Modified: trunk/plugins/autosave.c
===================================================================
--- trunk/plugins/autosave.c 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/plugins/autosave.c 2008-03-26 17:10:18 UTC (rev 2411)
@@ -35,7 +35,7 @@
GeanyData *geany_data;
-VERSION_CHECK(32)
+PLUGIN_VERSION_CHECK(32)
PLUGIN_INFO(_("Auto Save"), _("Save automatically all open files in a given time interval."),
VERSION, _("The Geany developer team"))
Modified: trunk/plugins/classbuilder.c
===================================================================
--- trunk/plugins/classbuilder.c 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/plugins/classbuilder.c 2008-03-26 17:10:18 UTC (rev 2411)
@@ -37,7 +37,7 @@
GeanyData *geany_data;
-VERSION_CHECK(7)
+PLUGIN_VERSION_CHECK(7)
PLUGIN_INFO(_("Class Builder"), _("Creates source files for new class types."), VERSION,
"Alexander Rodin")
Modified: trunk/plugins/demoplugin.c
===================================================================
--- trunk/plugins/demoplugin.c 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/plugins/demoplugin.c 2008-03-26 17:10:18 UTC (rev 2411)
@@ -49,7 +49,7 @@
/* Check that Geany supports plugin API version 7 or later, and check
* for binary compatibility. */
-VERSION_CHECK(7)
+PLUGIN_VERSION_CHECK(7)
/* All plugins must set name, description, version and author. */
PLUGIN_INFO(_("Demo"), _("Example plugin."), VERSION, _("The Geany developer team"))
Modified: trunk/plugins/export.c
===================================================================
--- trunk/plugins/export.c 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/plugins/export.c 2008-03-26 17:10:18 UTC (rev 2411)
@@ -40,7 +40,7 @@
PluginFields *plugin_fields;
GeanyData *geany_data;
-VERSION_CHECK(20)
+PLUGIN_VERSION_CHECK(20)
PLUGIN_INFO(_("Export"), _("Exports the current file into different formats."), VERSION,
_("The Geany developer team"))
Modified: trunk/plugins/filebrowser.c
===================================================================
--- trunk/plugins/filebrowser.c 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/plugins/filebrowser.c 2008-03-26 17:10:18 UTC (rev 2411)
@@ -43,7 +43,7 @@
GeanyData *geany_data;
-VERSION_CHECK(26)
+PLUGIN_VERSION_CHECK(26)
PLUGIN_INFO(_("File Browser"), _("Adds a file browser tab to the sidebar."), VERSION,
_("The Geany developer team"))
Modified: trunk/plugins/htmlchars.c
===================================================================
--- trunk/plugins/htmlchars.c 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/plugins/htmlchars.c 2008-03-26 17:10:18 UTC (rev 2411)
@@ -36,7 +36,7 @@
GeanyData *geany_data;
-VERSION_CHECK(48)
+PLUGIN_VERSION_CHECK(48)
PLUGIN_INFO(_("HTML Characters"), _("Inserts HTML character entities like '&'."), VERSION,
_("The Geany developer team"))
Modified: trunk/plugins/vcdiff.c
===================================================================
--- trunk/plugins/vcdiff.c 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/plugins/vcdiff.c 2008-03-26 17:10:18 UTC (rev 2411)
@@ -41,7 +41,7 @@
GeanyData *geany_data;
-VERSION_CHECK(27)
+PLUGIN_VERSION_CHECK(27)
PLUGIN_INFO(_("VC Diff"), _("Creates a patch of a file against version control."), VERSION,
_("The Geany developer team"))
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2008-03-26 16:42:50 UTC (rev 2410)
+++ trunk/src/plugindata.h 2008-03-26 17:10:18 UTC (rev 2411)
@@ -35,18 +35,18 @@
/* The API version should be incremented whenever any plugin data types below are
* modified or appended to. */
-static const gint api_version = 51;
+static const gint api_version = 52;
/* 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
* are only appended, as this doesn't affect existing fields. */
static const gint abi_version = 23;
-/** This performs runtime checks that try to ensure:
- * 1. Geany ABI data types are compatible with this plugin.
- * 2. Geany sources provide the required API for this plugin. */
-/* TODO: if possible, the API version should be checked at compile time, not runtime. */
-#define VERSION_CHECK(api_required) \
+/** Check the plugin can be loaded by Geany.
+ * This performs runtime checks that try to ensure:
+ * - Geany ABI data types are compatible with this plugin.
+ * - Geany sources provide the required API for this plugin. */
+#define PLUGIN_VERSION_CHECK(api_required) \
gint version_check(gint abi_ver) \
{ \
if (abi_ver != abi_version) \
@@ -374,4 +374,11 @@
}
TagManagerFuncs;
+
+/* Deprecated aliases */
+#ifndef GEANY_DISABLE_DEPRECATED
+#define VERSION_CHECK(api_required) \
+ PLUGIN_VERSION_CHECK(api_required)
#endif
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2408
http://geany.svn.sourceforge.net/geany/?rev=2408&view=rev
Author: ntrel
Date: 2008-03-26 06:35:34 -0700 (Wed, 26 Mar 2008)
Log Message:
-----------
Add note about not appending to structs like KeyBindingGroup and
GeanyCallback.
Modified Paths:
--------------
trunk/HACKING
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2008-03-26 13:29:43 UTC (rev 2407)
+++ trunk/HACKING 2008-03-26 13:35:34 UTC (rev 2408)
@@ -19,8 +19,6 @@
tool. Run 'make api-doc' in the doc subdirectory. The documentation will
be output to doc/reference/index.html.
-See the Related Pages section for a link to the plugin howto.
-
Patches
-------
We are happy to receive patches, but it's best to check with us by email
@@ -49,9 +47,14 @@
-----------------------------
Please be aware that anything with a doc-comment (a comment with an
extra asterix: '/**') is something in the plugin API. Things like enums
-and structs can still be appended to, ensuring that all the existing
-elements stay in place - this will keep the ABI stable.
+and structs can usually still be appended to, ensuring that all the
+existing elements stay in place - this will keep the ABI stable.
+Note: Some structs like KeyBindingGroup and GeanyCallback cannot be
+appended to without breaking the ABI because they are used to declare
+structs by plugins, not just for accessing struct members through
+a pointer.
+
Before the 1.0 release series, the ABI can change when necessary, and
even the API can change. An ABI change just means that all plugins will
not load and they must be rebuilt. An API change means that some plugins
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2407
http://geany.svn.sourceforge.net/geany/?rev=2407&view=rev
Author: ntrel
Date: 2008-03-26 06:29:43 -0700 (Wed, 26 Mar 2008)
Log Message:
-----------
Forgot ChangeLog.
Modified Paths:
--------------
trunk/ChangeLog
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-26 13:27:31 UTC (rev 2406)
+++ trunk/ChangeLog 2008-03-26 13:29:43 UTC (rev 2407)
@@ -1,3 +1,10 @@
+2008-03-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * plugins/pluginmacros.h:
+ Rename p_filetype p_filetypes to keep the symmetry with filetypes_*,
+ and define it also when GEANY_DISABLE_DEPRECATED is not set.
+
+
2008-03-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/plugins.c, src/plugindata.h:
@@ -20,6 +27,7 @@
* src/symbols.c:
Make Go to Tag commands look for the tag in the current document
before searching the workspace.
+ Fix memory leaks when using tm_tags_extract().
2008-03-23 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2406
http://geany.svn.sourceforge.net/geany/?rev=2406&view=rev
Author: ntrel
Date: 2008-03-26 06:27:31 -0700 (Wed, 26 Mar 2008)
Log Message:
-----------
Rename p_filetype p_filetypes to keep the symmetry with filetypes_*,
and define it also when GEANY_DISABLE_DEPRECATED is not set.
Modified Paths:
--------------
trunk/plugins/pluginmacros.h
Modified: trunk/plugins/pluginmacros.h
===================================================================
--- trunk/plugins/pluginmacros.h 2008-03-24 18:45:33 UTC (rev 2405)
+++ trunk/plugins/pluginmacros.h 2008-03-26 13:27:31 UTC (rev 2406)
@@ -32,15 +32,17 @@
#define prefs geany_data->prefs
#define project app->project
-#ifdef GEANY_DISABLE_DEPRECATED
/* These macros are named the same as the first word in the core function name,
* but with a 'p_' prefix to prevent conflicts with other tag names.
* Example: document_open_file() -> p_document->open_file() */
+#define p_filetypes geany_data->filetype
+
+#ifdef GEANY_DISABLE_DEPRECATED
+
#define p_dialogs geany_data->dialogs
#define p_document geany_data->documents
#define p_encoding geany_data->encoding
-#define p_filetype geany_data->filetype
#define p_highlighting geany_data->highlighting
#define p_keybindings geany_data->keybindings
#define p_msgwindow geany_data->msgwindow
@@ -68,6 +70,7 @@
#define p_ui ui
#define p_utils utils
+
/* Temporary source compatibility macros - do not use these in new code. */
#define dialogs geany_data->dialogs
#define documents geany_data->documents /* avoids conflict with document typedef */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2405
http://geany.svn.sourceforge.net/geany/?rev=2405&view=rev
Author: frlan
Date: 2008-03-24 11:45:33 -0700 (Mon, 24 Mar 2008)
Log Message:
-----------
Repairing of ChangeLog
Modified Paths:
--------------
trunk/ChangeLog
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-24 18:07:11 UTC (rev 2404)
+++ trunk/ChangeLog 2008-03-24 18:45:33 UTC (rev 2405)
@@ -42,6 +42,16 @@
Small improvement in counting changed documents for Save All update.
+2008-03-23 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
+
+ * doc/plugins.dox: Fix a little typo that prevents docu from being build.
+
+
+2008-03-22 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
+
+ * THANKS, src/about.c: Adjusted email of Brahmann.
+
+
2008-03-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/callbacks.c:
@@ -64,11 +74,7 @@
* src/treeviews.c:
Allow selecting items in the symbol list by pressing Enter or Space.
-2008-03-23 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
- * doc/plugins.dox: Fix a little typo that prevents docu from beeing build.
-
-
2008-03-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/notebook.c:
@@ -85,11 +91,7 @@
Fix asking detect reload question again if the user doesn't respond
within 10 seconds (oops).
-2008-03-22 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
- * THANKS, src/about.c: Adjusted email of Brahmann.
-
-
2008-03-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* HACKING: Add note and link for GTK 2.6 API docs.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2403
http://geany.svn.sourceforge.net/geany/?rev=2403&view=rev
Author: frlan
Date: 2008-03-24 10:45:39 -0700 (Mon, 24 Mar 2008)
Log Message:
-----------
Fixed a little typo that prevents plugin API documentation from beeing build.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/plugins.dox
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-24 17:44:31 UTC (rev 2402)
+++ trunk/ChangeLog 2008-03-24 17:45:39 UTC (rev 2403)
@@ -1,5 +1,4 @@
2008-03-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
-
* src/plugins.c, src/plugindata.h:
Add document_set_filetype() and filetypes_get_from_uid() to
the plugin API.
@@ -64,7 +63,11 @@
* src/treeviews.c:
Allow selecting items in the symbol list by pressing Enter or Space.
+2008-03-23 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
+ * doc/plugins.dox: Fix a little typo that prevents docu from beeing build.
+
+
2008-03-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/notebook.c:
Modified: trunk/doc/plugins.dox
===================================================================
--- trunk/doc/plugins.dox 2008-03-24 17:44:31 UTC (rev 2402)
+++ trunk/doc/plugins.dox 2008-03-24 17:45:39 UTC (rev 2403)
@@ -44,7 +44,7 @@
* - @link signals Plugin Signals @endlink.
* - @link plugin-symbols.c Plugin Symbols @endlink.
*
- * @Note Some of these pages are also listed in Related Pages.
+ * @note Some of these pages are also listed in Related Pages.
*/
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.