40 Commits

Author SHA1 Message Date
Enrico Tröger
7ba4a81181 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4518 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-01 22:55:18 +00:00
Nick Treleaven
1986d915cc Run ./scripts/fix-alignment.pl -w src/*.[hc] plugins/*.[hc] (skipping generated files).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4199 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-16 14:13:38 +00:00
Nick Treleaven
c4513eecaf Add geanyplugin.h single include for plugin API; update all core
plugins to use it.
Add sci_set_font() to API.
Update plugin howto.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3966 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-14 15:06:20 +00:00
Nick Treleaven
8bf28b76fb Merge trunk changes.
Add string.h include for htmlchars.c.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3679 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-03 13:45:47 +00:00
Frank Lanitz
c7a62c6b3d Applied a patch by Enrico to improve code of htmlchars plugin
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3650 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-24 20:35:28 +00:00
Frank Lanitz
10ea2cc7ba Remove usage of deprecated sci_get_selected_text() from htmlchars plugin.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3649 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-24 18:45:16 +00:00
Frank Lanitz
3c36f39cd5 Extend htmlchars plugin with some replacment functions.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3643 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-20 17:22:18 +00:00
Enrico Tröger
8cd312e250 Small optimisations by moving out function calls of loop break conditions (patch by Frank, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3571 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-10 21:11:25 +00:00
Enrico Tröger
39a6eb455e Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3446 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-04 18:30:42 +00:00
Nick Treleaven
73d44c0a79 Update to use geanyfunctions.h.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3317 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-04 17:05:36 +00:00
Nick Treleaven
51d28d688d Use ui_add_document_sensitive().
Use PLUGIN_VERSION_CHECK(GEANY_API_VERSION) for internal plugins,
except the Demo plugin (as an example).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3085 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-14 17:03:44 +00:00
Enrico Tröger
9aa5ba41c7 Plug some memory leaks due to some missing g_object_unref's.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3056 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 18:51:50 +00:00
Enrico Tröger
8d67117d47 Rename "delete_event" to "delete-event".
Remove some unnecessary GObject casts in g_signal_connect() calls.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2788 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-18 13:40:48 +00:00
Nick Treleaven
7db4bfe493 Rename GeanyEditor::scintilla to GeanyEditor::sci.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2776 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-14 11:13:54 +00:00
Nick Treleaven
4837030ca1 Fix compilation.
Move utils_get_current_function() to symbols.c.
Move utils_replace_filename() to document.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2766 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-08 16:30:37 +00:00
Nick Treleaven
8dcfb7e336 Update for doc->editor->scintilla.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2764 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-08 11:26:09 +00:00
Nick Treleaven
18ced215d1 Remove deprecated macros and typedefs (except DOC_IDX_*), as some of
them are likely to cause naming conflicts and all plugins will need
updating since 0.14 anyway.
Add geany macro that simply expands to geany_data.
Deprecate app, main_widgets, prefs, project macros, as the geany
macro can be used instead.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2761 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-07 16:16:18 +00:00
Enrico Tröger
1e8d82f46a Note: this breaks the plugin API for msgwin and navqueue functions.
Make NavQueueFuncs and MsgWinFuncs use a GeanyDocument* instead of an integer index.
Adjust plugins to work with these changes.            


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2688 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-12 20:09:57 +00:00
Nick Treleaven
be0d9e8ea7 Note: this breaks the plugin API.
Replace doc_array with documents_array, a pointer array. This is
necessary to avoid breaking the ABI every time a field is added to
GeanyDocument.
Remove deprecated pluginmacros.h documents macro, to avoid a
conflict.
Replace doc_list[] macro with documents[] macro, which returns a
GeanyDocument pointer.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2624 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-29 17:00:54 +00:00
Nick Treleaven
a87b2e57b9 Fix plugins to compile with GEANY_DISABLE_DEPRECATED.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2617 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-26 17:24:11 +00:00
Nick Treleaven
8c1c59eecf Deprecate PLUGIN_INFO() in favour of PLUGIN_SET_INFO().
Remove plugin symbol info(), which is replaced by plugin_set_info()
and a new symbol plugin_info. This is so the PluginInfo struct is
zero'd first by Geany, so plugins are still ABI compatible if we
want to add any more fields in the future.
Fail to load a plugin if plugin_info->name is not set.
Remove now unused string.h include from plugindata.h.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2612 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-23 17:08:58 +00:00
Nick Treleaven
398efbd373 Note: this commit breaks the plugin API.
Split widget fields out of GeanyApp into GeanyMainWidgets, so other
data items can be added without breaking the plugin ABI.
Add GeanyData::main_widgets, and macro.
Rename treeview_notebook sidebar_notebook in GeanyMainWidgets.
Move tools_menu from GeanyData to GeanyMainWidgets.
Move statusbar out of GeanyApp (shouldn't be used directly).
Move ignore_callback out of GeanyApp.
Rename sci_goto_line() argument unfold, like sci_goto_pos().
Make utils_goto_file_pos(), utils_goto_line(),
utils_switch_document() into static functions (they are UI-related,
so shouldn't be in utils.c).
Move utils_goto_pos() to editor.c, add mark argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2609 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-22 14:41:28 +00:00
Nick Treleaven
d99a4ea675 Note: this breaks the plugin API.
Split GeanyFunctions out of GeanyData so data pointers can be
appended before the function pointer structs without breaking the
ABI.
Rename GeanyFunctions fields with a p_ prefix to avoid name
conflicts.
Add new plugin symbol geany_functions.
Nearly all plugins will now need to declare the following:
'GeanyFunctions *geany_functions;', which is now used by
pluginmacros.h.
Add doxygen examples for geany_data and geany_functions.
Move deprecated document and filetype typedefs to src/plugindata.h,
as plugins aren't required to use pluginmacros.h.
Initialize geany_data by copying a stack struct so the compiler can
check for any missing field initializers.
Rename plugin macro p_encoding to p_encodings to follow the core
function encodings_ prefix.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2599 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-19 12:35:35 +00:00
Nick Treleaven
07d37be882 Rename VERSION_CHECK PLUGIN_VERSION_CHECK, but keep a deprecated
alias so outside plugins still compile.
Update our plugins to use this.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2411 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-26 17:10:18 +00:00
Nick Treleaven
664ee2f75d Make KeyBinding name and label fields non-const strings so they can
be freed by any plugins that need to use malloc'd strings.
Document KeyCallback typedef.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2345 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-14 17:23:24 +00:00
Enrico Tröger
1bd9ee6664 Use a separate string for keybinding label to avoid display of an underscore.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2337 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-13 15:08:03 +00:00
Nick Treleaven
5f43e01f17 Add keybindings_set_item() to the plugin API and update the HTML
Characters plugin.
Rename KBCallback, cmd_id, cb_func with clearer names.
Add KeyBinding::menu_item field for setting accelerators (currently
does nothing).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/plugin-keybindings@2318 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-10 13:23:57 +00:00
Nick Treleaven
747d2d2bf4 Add support for plugin keybindings using the PLUGIN_KEY_GROUP()
macro. Note: plugin keybindings are not yet loaded from the keyfile.
Add a plugin keybinding for 'Insert Special HTML Characters'.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/plugin-keybindings@2315 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-07 18:00:22 +00:00
Enrico Tröger
b7bfb2743a Replace all C++-style comments with usual C-like multi-line comments.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2287 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-27 13:17:29 +00:00
Enrico Tröger
85f73129c0 Apply patch from Daniel Richard G. to fix to fix several compiler warnings, C89 violations and minor code problems (thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2267 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-20 11:24:23 +00:00
Nick Treleaven
cdf447647f Add new macros for plugin API functions that use a 'p_' prefix to
prevent conflicts with other tags whilst keeping the same first word
as core function names, and update plugins to use them.
The old plugin macros are still available, but will be removed
after the next release.
Compiling with -DGEANY_DISABLE_DEPRECATED in CFLAGS will disable
the old macros.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2195 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-28 17:27:39 +00:00
Enrico Tröger
e3201062c6 Update copyright information and change format of email addresses in source files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2150 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-06 18:11:57 +00:00
Enrico Tröger
639e23effa Use pluginmacros.h (for classbuilder and htmlchars plugins).
Add highlighting_get_style().
Add highlighting_get_style() to the plugin API.
Rename DocumentFuncs field in GeanyData struct to avoid name clashes.	      


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2103 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-16 11:27:59 +00:00
Enrico Tröger
2b07283739 Add plugin manager dialog to select plugins to load at startup and to call a plugin configure dialog.
Add configure symbol for plugins which is called by Geany when a configure dialog for the plugin is requested, optionally.
Add author field to plugin info struct.
Add sample configure dialog to the demo plugin.
Fix cleanup code in filebrowser plugin to remove it completely when unloaded.			


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2060 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-20 18:15:46 +00:00
Nick Treleaven
1825a8dd40 Make all plugins distributed with Geany have the same version number
as Geany.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1978 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-26 12:32:23 +00:00
Enrico Tröger
edc0ceaad6 Add version to plugin info fields and two other fields for future use.
Add option to show/hide the small crosses on each file tab (closes #1757680).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1826 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-25 14:16:52 +00:00
Nick Treleaven
2a15ed3dd0 Add GeanyData* geany_data symbol for plugins so they don't have to
keep a copy of the init() argument.
Rename PluginData GeanyData (but use a typedef for backward
compatibility).
Update plugins to use newer API symbols.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1749 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-27 10:37:22 +00:00
Nick Treleaven
75a08ac4a3 Don't destroy plugin_fields->menu_item automatically - plugin_fields
should be owned by the plugin, so the plugin is responsible for
destroying it, and any other memory it allocated.
Print a warning message in debug mode if a plugin has no cleanup()
function.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1743 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-25 11:59:34 +00:00
Nick Treleaven
a2ea943ffe Fix warning.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1735 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-23 16:06:07 +00:00
Nick Treleaven
109a7aee67 Convert 'Insert Special HTML Characters' tool into a plugin;
keybinding support will be added later.
Add plugin functions for inserting text into the current document.
Add plugin support for disabling a menu item when no documents are
open.
Destroy plugin_fields->menu_item on unloading if set by a plugin.
Use G_MODULE_BIND_LOCAL for plugins to prevent symbol shadowing by
other modules, and to help detect unresolved symbols at loading time.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1734 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-23 15:41:08 +00:00