89 Commits

Author SHA1 Message Date
Nick Treleaven
c9bd4decea Increment plugin ABI, API versions for plugin_callbacks change.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2611 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-23 14:14:04 +00:00
Nick Treleaven
f8afbf10ed Make GeanyCallback, geany_callbacks deprecated, and replace with
PluginCallback, plugin_callbacks. This is because the array is owned
by the plugin, not Geany.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2610 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-23 12:29:32 +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
Enrico Tröger
41801ae852 Rename BuildInfo struct to GeanyBuildInfo.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2595 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 14:35:41 +00:00
Enrico Tröger
311b82ebb2 Rename document struct to GeanyDocument.
Rename filetype struct to GeanyFiletype.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2594 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 14:17:54 +00:00
Nick Treleaven
3a12da9daf Note: this commit breaks the plugin API (but is necessary so that in
future the ABI can stay stable when adding preferences).
Split up prefs into interface_prefs, toolbar_prefs, file_prefs,
search_prefs, tool_prefs, template_prefs, and add these to the
plugin API.
Move suppress_search_dialogs and search_use_current_word to
search_prefs, and rename accordingly.
Rename switch_msgwin_pages pref to switch_to_status.
Remove toolbar_ prefix for toolbar_prefs items.
Remove tool_ prefix for tool_prefs items.
Remove template_ prefix for template_prefs items.
Add Geany prefix for EditorPrefs.
Add Geany prefix for SearchPrefs.
Initialize search_prefs to zero in main.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2591 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 12:08:39 +00:00
Enrico Tröger
b2cddc87a0 Move indicator functions from document.c into editor.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2587 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 17:58:56 +00:00
Enrico Tröger
c151befff3 Add new function document_set_indicator_on_line() for future use.
Add some functions to the plugin API for the upcoming spell check plugin.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2581 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:46:48 +00:00
Enrico Tröger
392d1f863f Add preferences for default end of line characters for new files (closes #1895362) and to disable the automatic continuation of multi-line comments in C-like languages.
Enable multi-line continuation also for CSS files.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2580 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:36:27 +00:00
Nick Treleaven
ff212680f7 Update api_version for new line breaking struct fields.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2566 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 15:03:24 +00:00
Nick Treleaven
f6f49dc117 Add deprecated aliases for GEANY_MAX_FILE_TYPES and
GEANY_FILETYPES_ALL.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2557 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 14:01:30 +00:00
Nick Treleaven
f82d979dbd Add filetypes_array to GeanyData for plugins to access a dynamic
array of filetype pointers.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2547 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-01 17:25:18 +00:00
Nick Treleaven
d5e39530df Store filetype::name instead of unique ID when saving sessions.
Remove all filetype UID code.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2543 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-01 12:10:46 +00:00
Nick Treleaven
5340f2b9c8 Remove filetypes array from API.
Replace filetypes_get_from_uid() with filetypes_lookup_by_name().
Use a hash table for filetypes, but keep the old filetypes array
available for now.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2538 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-28 14:41:09 +00:00
Enrico Tröger
d9690cbe77 Add navqueue_goto_line() to plugin API.
Make navqueue_goto_line() store document filename instead of tagmanager filename (patch by Yura Siamashka, thanks).
This makes it also possible to add navigation history items for files without a tagmanager filename.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2496 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-17 17:48:12 +00:00
Nick Treleaven
baa27abbe9 Remove active_plugins from GeanyApp.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2492 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-16 15:44:29 +00:00
Nick Treleaven
3d65154b37 Document most of GeanyData, add links to files.
Make PluginData alias deprecated.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2418 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-27 13:13:09 +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
Enrico Tröger
f947152af9 Add document_set_filetype() and filetypes_get_from_uid() to
the plugin API.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2400 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-24 17:29:50 +00:00
Nick Treleaven
291cff8c9d Redo ABI change (it was for r2389 editor.h change, oops).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2396 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-24 16:11:52 +00:00
Nick Treleaven
081adcc55c Add note about allowing appending of keybindings to groups without
breaking the API.
Undo unnecessary ABI change.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2395 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-24 13:40:01 +00:00
Enrico Tröger
1cf46e4c8e Add shortcut to switch to the sidebar.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2390 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-23 16:32:36 +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
Nick Treleaven
745c858fde Update documentation for plugin_key_group[] to mention declaring it
manually.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2336 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-13 13:36:18 +00:00
Nick Treleaven
2c0316a296 Merge plugin-keybindings branch:
Change keybindings code to use keybinding groups, each with a
separate enum set, which will make the plugin ABI more stable, and
lay the groundwork for plugin keybindings support.
Note: this breaks the plugin API.
Rename keybindings_cmd() to keybindings_send_command(), which now
takes a group_id argument.
Add keybindings_lookup_item().
Add documentation for keybindings structs.
Add support for plugin keybindings using the PLUGIN_KEY_GROUP()
macro.
Add a plugin keybinding for 'Insert Special HTML Characters'.
Rename KBCallback, cmd_id, cb_func with clearer names.
Add KeyBinding::menu_item field for setting accelerators (currently
does nothing).
Load keybindings keyfile after plugins have loaded at startup, so
their shortcuts are also loaded. Still to do: loading individual
plugin keybindings after startup.
Group most keybinding callbacks together according to keybinding
group.
Add keybindings_set_item() and add it to the plugin API.
Set main menu widget accels with keybindings_set_item() - they are
ignored for now. Popup menu accels are set separately.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2324 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-12 17:07:43 +00:00
Nick Treleaven
a51962e6a5 Avoid including keybindings.h.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/plugin-keybindings@2320 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-10 13:35:30 +00:00
Nick Treleaven
824a05083f Make keybindings_send_command() take guint parameters, not gint.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/plugin-keybindings@2319 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-10 13:29:35 +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
Nick Treleaven
ee26ac9254 Change keybindings code to use keybinding groups, each with a
separate enum set, which will make the plugin ABI more stable,
and lay the groundwork for plugin keybindings support.
Note: this breaks the plugin API.
Disable setting menu accelerators (temporary).
Disable Keyboard Shortcuts dialog (temporary).
Disable snippets completion (temporary).
Disable focus commands in the VTE (temporary).
Make Tags group use separate cb_func_tags callback.
Rename keybindings_cmd() to keybindings_send_command().
Add keybindings_lookup_item().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/plugin-keybindings@2297 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-29 19:30:28 +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
ce12940621 Apply patch by Pierre Joye to add new process spawning implementation for Windows.
Make utils_spawn_* available to plugin API.
This makes the VCdiff plugin to work on Windows (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2279 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-24 10:27:32 +00:00
Enrico Tröger
22d96653da Rename hidden pref auto_complete_whilst_editing to complete_snippets_whilst_editing.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2269 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-21 15:51:50 +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
Enrico Tröger
0e65cff820 Add support for generating API reference documentation using doxygen.
This is the first step, it is far away from being complete.
Add make target "api-doc" to generate the reference documentation.
Add documentation comments to a few functions.
Move basic plugin documentation from plugindata.h to doc/plugins.dox.	       


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2263 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-17 18:00:42 +00:00
Enrico Tröger
6413fdb2bf Add hidden preference to disable scrolling past end of document.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2260 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-15 16:34:30 +00:00
Nick Treleaven
43704d8ebe Add ui_button_new_with_image() to plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2223 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-04 13:40:14 +00:00
Nick Treleaven
4c747131c1 Add sci_get_current_line() to plugin API.
Add ui_table_add_row(), ui_path_box_new() to plugin API (thanks to
Yura Siamashka).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2221 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-04 12:49:14 +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
7b85b02f93 Add encodings_get_charset_from_index() and make it available through plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2177 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-16 16:50:10 +00:00
Nick Treleaven
ff9c673ed2 Apply patch from Yura Siamashka to speed up removing several
workspace object's tags without updating the workspace until
necessary (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2164 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-11 17:09:23 +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
697195c4fe Patch by Yura Siamashka:
Add project type field.
Go to tag definition/declaration will open the file with the tag if it isn't already open.
Add some utils and tagmanager functions to the plugin API.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2145 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-02 21:20:33 +00:00
Nick Treleaven
bd6c2c611f Add configurable keybindings for Cut, Copy and Paste.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2130 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-25 14:00:18 +00:00
Enrico Tröger
47c7c69214 Add Move document first/last keybindings (patch by Catalin Marinas, thank you).
Add toolbar items to increase/decrease indentation (closes #1850697).	     


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2104 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-16 16:54:47 +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
c27e9b54c6 Add search_show_find_in_files_dialog() to the plugin API.
Make path entry of filebrowser plugin editable.
Add "Open with" and "Find in Files" popup menu items to filebrowser  plugin and add configuration dialog.	    


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2085 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-02 10:52:19 +00:00
Enrico Tröger
de8caa6055 Remove obsolete SVNdiff plugin, use the VC Diff plugin.
Add option for amount of characters to trigger symbol completion.
Add document_find_by_filename to the plugin API.		


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2084 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-01 17:53:36 +00:00
Enrico Tröger
5e6b3d5165 Remove ununsed function project_save().
Fix typo in plugin API at utils_mkdir().
Add document_get_n_idx() to the plugin API.
Fix display of plugin separator in the Tools menu when only plugins without menu item are loaded.
Add three new signals: project_open, project_save, project_close.
On Shutdown close the project before plugins are unloaded to let plugins work on the last project closed event.			


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2065 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-21 18:54:12 +00:00