1729 Commits

Author SHA1 Message Date
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
Enrico Tröger
4198167584 Add again all GTK libraries to linker flags for each plugin.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2623 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-28 16:09:16 +00:00
Enrico Tröger
7583e5e3db Add media types for screen and print to have a clean version of the manual for printing.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2622 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-28 15:35:27 +00:00
Nick Treleaven
e00f73bc5d Note: this breaks the plugin API.
Remove plugin symbol configure().
Add plugin symbol plugin_configure() which is used to tell Geany a
widget to pack into the plugin preferences dialog, and connect a
response callback for when the dialog receives a user decision.
This allows Geany to in future implement a common preferences dialog
for all plugins, without breaking the plugin API/ABI.
Add Apply button for plugin preference dialogs (to indicate plugins
should handle the apply response as well as OK, as a multiple plugin
configuration dialog would want an apply button).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2621 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-28 13:05:09 +00:00
Nick Treleaven
4f79ebb646 Make plugin_free() act like a destructor only, let
pm_dialog_response() call a separate function to only free non-active
plugins.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2619 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-27 15:10:08 +00:00
Nick Treleaven
c553028808 Fail to load a plugin if it has no plugin_init() function.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2618 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-27 14:47:38 +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
df1a8e63a3 Add plugin_ prefix for plugin symbols version_check, init and
cleanup. Deprecate init and cleanup; update PLUGIN_VERSION_CHECK
macro.
Add a debug message and fail to load a plugin if it has no
plugin_version_check() function.
Check that plugin keybinding names have been set in plugin_init(),
otherwise print a debug message and ignore all of them.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2616 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-26 17:09:43 +00:00
Nick Treleaven
d3f67e813e Move all symbol lookups except plugin_set_info() into plugin_init().
Add debug message for missing init() function in a plugin.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2614 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-26 14:17:41 +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
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
Enrico Tröger
cb20ec4e53 Fix some quotations to not screw up the bash lexer.
Don't use /dev/random or /dev/urandom in gb.c, instead of GLib's random functions.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2608 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-21 17:41:11 +00:00
Enrico Tröger
133793e8db Specify the necessary libraries of each plugin to link against.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2607 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-21 16:53:40 +00:00
Nick Treleaven
192f4e13b5 Rename editor_auto_line_indentation() to
editor_smart_line_indentation().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2606 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-21 14:08:35 +00:00
Nick Treleaven
320e4b9d76 Refactor editor_auto_line_indentation().
Make auto-line indentation set the cursor to the beginning of
indentation for single line selections, so the user can fine-tune
indentation if necessary. For multiple line selections, select all
the lines after indenting.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2605 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-21 14:00:27 +00:00
Nick Treleaven
59934acd65 Add Main Page links to plugindata.h and pluginmacros.h.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2604 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-19 15:22:56 +00:00
Nick Treleaven
45ba1bfbac Add API documentation for pluginmacros.h.
Make Doxygen define GEANY_DISABLE_DEPRECATED.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2603 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-19 15:21:31 +00:00
Nick Treleaven
6f361569ed Fix Switch to Sidebar shortcut so that it works for whichever widget
is in the current sidebar notebook page (fixes #1967104).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2602 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-19 14:33:50 +00:00
Nick Treleaven
380cec5a69 Add deprecated p_encoding alias for p_encodings.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2601 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-19 12:52:38 +00:00
Nick Treleaven
45dfa2e9fe Fix doxygen-1.4.6 warnings about undocumented function parameters
when using documentation comments e.g. for TODO.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2600 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-19 12:40:35 +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
629fc70a35 Allow loading projects from command line (closes #1961083).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2598 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-18 16:27:08 +00:00
Enrico Tröger
1e9784d18f Define p_editor in the right way, oops.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2597 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-18 16:08:26 +00:00
Enrico Tröger
dba4b278f8 Force using tabs for indentation when opening Makefiles.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2596 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-18 16:03:20 +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
a6ba330b1d Make right clicking on items not lose the current selection, like
the standard GtkFileChooser.
Add separator before the Clear filter toolbar button.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2592 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 12:16:03 +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
c3c4bc008d Make p_editor macro also available if GEANY_DISABLE_DEPRECATED is not defined.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2590 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-15 16:19:00 +00:00
Enrico Tröger
beb68832b3 Move several editing related functions from document.c to editor.c.
Fix two compiler warnings about non-literal format strings.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2588 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-15 13:43:29 +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
Nick Treleaven
8fcf2072fe Update adding a filetype section, make clearer.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2586 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 16:44:18 +00:00
Nick Treleaven
a0337bc281 Fix line breaking not getting reset for new documents sometimes.
Merge all document default settings into init_doc_struct().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2585 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 16:37:09 +00:00
Enrico Tröger
7986d13d40 Add shebang detection for Makefiles.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2584 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 16:13:16 +00:00
Enrico Tröger
6187c3d9b2 Remove unnecessary case statement for PHP files, can be handled by the default case.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2583 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:58:03 +00:00
Enrico Tröger
f04e0c3955 Change an error message to be more clear about the error.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2582 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:50:11 +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
a8ab07fd19 Recolourise the document in document_reload_file() because the
text may have changed (should fix #1948857).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2578 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 11:58:05 +00:00
Nick Treleaven
f3dcad20b3 Sort custom template file menu items by filetype, with None
filetypes first.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2577 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 11:31:07 +00:00
Nick Treleaven
b39f7b1276 Create ~/.geany/templates/files directory if it doesn't exist.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2576 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-13 17:30:28 +00:00
Nick Treleaven
bd92df27f5 Add support for custom file templates found at startup in the
~/.geany/templates/files directory. These are currently shown
underneath filetype templates in the New with Template menu.
Add ui_menu_item_get_text().
Make utils_string_replace_all() ignore empty haystacks.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2575 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-13 17:18:14 +00:00
Enrico Tröger
9449f5a0d9 Clear a document's symbol list first after it was detached from its container to prevent crashes when saving files with collapsed symbol list items.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2574 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 13:46:19 +00:00
Enrico Tröger
a8855d2ec5 Iconify the main window on Windows before de-iconifying it when opening files remotely to ensure the main window pops up.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2573 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 12:40:37 +00:00
Enrico Tröger
340dccfb73 Remove hotspot code as it was never really used.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2572 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 12:28:34 +00:00
Enrico Tröger
abfbc59c3f Use Javascript styles for any VBScript and ASP code embedded in a HTML file.
Use Python styles for embedded Python code.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2570 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 12:20:49 +00:00
Enrico Tröger
79df8d0c8d Use gtk_window_present() instead of gtk_widget_show() for Open File and Preferences dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2569 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-10 08:32:30 +00:00
Nick Treleaven
ef8ffb8872 Add source_only argument for filetypes_find_source() and rename.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2568 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 17:14:35 +00:00