56 Commits

Author SHA1 Message Date
Frank Lanitz
924fc68cdd Fix a memory leak on classbuilder plugin. (Patch by Daniel Marjamaki, thanks)
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4934 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-19 17:36:06 +00:00
Enrico Tröger
7f037f71e4 Add namespace support for GTK+ classes.
Add GET_CLASS() macro for GTK+ classes.
Add typedef of the private structure in the header file instead of declaring it (all the above from a patch by Colomban Wendling, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4906 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-14 14:19:11 +00:00
Enrico Tröger
72c7cab17e Don't make the 'Create Class' menu item document-sensitive (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4905 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-14 14:09:43 +00:00
Enrico Tröger
0259f13295 Guard C++/GTK class generation specific code
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4891 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-09 15:48:18 +00:00
Enrico Tröger
43e075a4f8 Minor fixes
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4890 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-09 15:48:10 +00:00
Enrico Tröger
b606964d3c Replace C99 style comments
Adjust plugin author information
Fix shadowed variable

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4889 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-09 15:48:01 +00:00
Enrico Tröger
f7de6b4ada Remove trailing spaces
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4888 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-09 15:47:49 +00:00
Enrico Tröger
a2b0ec155b Add support for creating PHP classes (patch by Ondrej Donek, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4887 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-09 15:47:39 +00:00
Nick Treleaven
216bf2e5f5 Fix Class Builder plugin to use correct indentation instead of
always tabs.
Make editor_insert_text_block() only replace leading tabs for the
'Tabs' indent type; also group edits for undo.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4845 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-21 17:04:31 +00:00
Nick Treleaven
f3e103c1e4 Beep if the user hasn't entered a class name on pressing OK.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4792 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-31 11:35:31 +00:00
Nick Treleaven
62f79f8f2a Don't generate FOO_GET_PRIVATE() macro because caching the result
in Foo::priv can be much more efficient.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4791 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-30 17:19:59 +00:00
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
cf35a8a495 Revert r4301 - utils_free_pointers() taking 4 arguments.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4321 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-15 16:15:28 +00:00
Nick Treleaven
f36c9024a3 Make utils_free_pointers() take 4 arguments, add to API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4301 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-12 16:03:10 +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
Enrico Tröger
5de4dc54e8 Fix wrongly created header guards when the class filenames contains dashes (patch by PCMan, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3838 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-05 15:09:04 +00:00
Enrico Tröger
f6087b5af8 Use G_DEFINE_TYPE in the GTK+ class template instead of manual code.
Other minor cleanups.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3625 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-13 09:59:58 +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
dc8227ad94 Add function ui_image_menu_item_new() to the plugin API, to easily
create a menu item with a stock image and a custom label.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3261 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 13:34:58 +00:00
Nick Treleaven
484f1ea9ab Update utils_free_pointers().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3246 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 17:24:10 +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
617cdee77c Encourage single header includes as it is necessary with GTK 2.14+.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2790 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-18 13:56:56 +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
000e8fcc9b Merge the editor-struct branch:
Note: this breaks the plugin API for editor-related document fields
and functions.
Split new GeanyEditor struct type from GeanyDocument fields sci,
line_wrapping, auto_indent, scroll_percent, use_tabs, line_breaking.
GeanyEditor::document allows access back to document fields.
Add GeanyDocument::editor field; this is only valid when the
document is valid, and NULL otherwise. This means any checks for
doc->editor->scintilla != NULL will segfault for invalid
documents - check against doc->is_valid or doc->editor != NULL
instead.
Change plugin API EditorFuncs to use GeanyEditor pointers.
Make editor_set_font() take a pango-style font string, and use a
GeanyEditor pointer.
Use GeanyEditor* instead of GeanyDocument* in editor.c (most global
editor functions still need conversion though, but this may be done
gradually or as required).
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/trunk@2779 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-15 14:29:41 +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
Enrico Tröger
4ef9af9c6f Fix some formatting issues.
Add 'static' keyword to generated finalize() function in GTK classes.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2772 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-12 11:46:59 +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
9dd3382343 Add missing mnemonics (except for 3 popup menu items, ran out of
letters).
Capitalize some menu items.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2430 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-31 13:09:56 +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
ad46583aa9 Change author to Alexander Rodin, as he did all the design work.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2383 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-21 17:12:19 +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
cf3f0594d4 Capitalize menu item text.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1982 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-26 16:07:36 +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
Nick Treleaven
274058eb7a Neaten up the plugin API:
Make document_open_file() now wrap document_open_file_full(),
without the idx for reloading or pos arguments.
Replace str_replace() with string_replace_all() in the plugin API.
Add utils_string_replace_all(), taking a GString argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1868 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-11 15:21:11 +00:00
Nick Treleaven
1887a20df4 Add text argument for document_new_file(), so that it's independent
from filetype templates.
Make File->New create a blank document, rather than using the None
filetype template.
Add None option for the 'New with Template' menu commands.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1848 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-03 16:09:53 +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