31 Commits

Author SHA1 Message Date
Enrico Tröger
62d31d6c92 Add encoding related functions to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1958 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-18 18:03:28 +00:00
Enrico Tröger
7c78e6a4a0 Fix wrong callback signatures in Export plugin and make menu item document sensitive.
Add dialogs_show_save_as() to the plugin API.   


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1950 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-16 09:01:13 +00:00
Nick Treleaven
6e4fa68d94 Don't show file opened/saved/closed messages on the status bar.
Add temporary function msgwin_status_add_new() for v0.12 (to avoid
many code changes updating msgwin_status_add() before the release).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1913 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-27 11:39:21 +00:00
Nick Treleaven
db980f3f83 Add ui->set_statusbar() to the plugin API.
Make plugin function msgwin->status_add() not set the statusbar - but
ui->set_statusbar() can now be used to do both with the log argument.
After Geany 0.12 this is how the core versions of those functions
will work, so the status window can be set independently.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1903 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-25 16:21:35 +00:00
Nick Treleaven
0f36471020 Apply patch from blackdog to add build_info and
msgwindow->compiler_add() to the plugin API (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1884 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-17 11:16:48 +00:00
Nick Treleaven
b7113bfa7a Add reload_file() document function to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1869 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-11 16:05:03 +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
Enrico Tröger
73557807a8 Remove get_zoom from plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1867 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-10 18:25:03 +00:00
Nick Treleaven
ef1399e000 Rename MyApp -> GeanyApp.
Move most GeanyApp fields into:
GeanyPrefs for (most) Preferences dialog fields;
UIPrefs for non-Prefs dialog visual settings;
UIWidgets for less commonly used widgets such as menuitems and
dialogs;
GeanyStatus for various states the application can be in.
Move some GeanyApp fields into EditorPrefs (and one into each of
CommandLineOptions and SidebarTreeviews).
Add plugin API prefs field.
Move disabling build widgets on Windows to build_init().
Make build callbacks static.
Add treeviews_init() to prepare popup menus and open files treeview.
Replace treeviews_find_node() with treeviews_select_openfiles_item().
Make utils_isbrace() and utils_is_opening_brace() take an
'include_angles' argument (to separate from editor_prefs).
Make 'Goto matching brace' keybinding include <> angle brackets.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1815 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-23 11:34:06 +00:00
Enrico Tröger
704940dcdf New plugin: Export as HTML and LaTeX.
Add some functions to the plugin API needed by the Export plugin.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1811 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-19 17:40:19 +00:00
Nick Treleaven
9268f74e2f Apply patch from Jeff Pohlmeyer to fix warning when unloading plugins
that use signals when quitting (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1809 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-17 11:48:30 +00:00
Nick Treleaven
9f46d083c5 Move #define PLAT_GTK to geany.h.
Move filetype typedef to geany.h.
Don't #include any src/*.h files from headers.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1800 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-15 15:37:21 +00:00
Nick Treleaven
9fcc4997ac Disconnect plugin callback signals when unloading plugins, to prevent
a segfault when emitting signals.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1799 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-15 12:29:57 +00:00
Nick Treleaven
2fa7ce5794 Apply patch from Jeff Pohlmeyer to add document_remove() to the
plugin API (thanks).
Add document_open_files() to plugin API.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1798 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-15 11:52:06 +00:00
Nick Treleaven
d8d971ea9f Apply patch from blackdog to add document_save_file() to the plugin
API (thanks).
Add document_open_file() to plugin API.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1796 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-14 16:29:03 +00:00
Nick Treleaven
15cec02d07 Add plugin symbol geany_callbacks (see plugindata.h for details).
Add GeanyObject type with "document-new", "document-open",
"document-save" signals.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1785 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-10 16:11:17 +00:00
Enrico Tröger
1f2aa9d983 Prevent loading the same plugin in different paths.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1770 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-04 16:25:13 +00:00
Nick Treleaven
70cd941345 Add filetypes, editor_prefs fields to plugin API.
Wrap scintilla_send_message(), sci_cmd(), lookup_widget().
Apply patch from Jeff Pohlmeyer to add more common scintilla wrappers
to the plugin API (thanks).
Increment plugin ABI version.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1768 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-03 15:05:53 +00:00
Enrico Tröger
03b61bbbc9 Make plugins working and compiling on Windows.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1758 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-28 17:44:02 +00:00
Enrico Tröger
a08906ea81 Only show the separator between built-in Tools menu items and plugins if there are any plugins.
Use PACKAGE_LIB_DIR.
Load plugins in ~/.geany/plugins/ prior to the default location.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1755 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-28 11:47:56 +00:00
Nick Treleaven
be04740016 Add separator between built-in Tools menu items and plugins.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1752 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-27 11:34:16 +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
c703d6b638 Use a single PluginData struct for all plugins.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1747 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-26 12:06:12 +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
aa54953cfe Apply patch from Jeff Pohlmeyer to add plugin functions for getting
a file list and modifying scintilla text selections (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1737 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-24 11:43:46 +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
Nick Treleaven
5ec03cdc0a Make Class Builder 'Create Class' dialog use Glade-style frames and
remove some unnecessary border width.
Add ui->dialog_vbox_new() and ui->frame_new_with_alignment()
functions to the plugin API.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1701 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-13 14:54:11 +00:00
Nick Treleaven
0529b13442 Remove init_function_pointers(), use static initializers.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1700 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-13 11:22:47 +00:00
Nick Treleaven
451c5b0e7e Make Class Builder into a plugin.
Add some function pointers to the plugin API (for the class builder).
Don't use G_MODULE_BIND_LAZY when loading plugins otherwise we can
potentially get unresolved symbols at runtime, causing a segfault.
Capitalize 2 menu item labels.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1659 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-04 11:32:33 +00:00
Nick Treleaven
a549a99c33 Move plugin name and description into a separate struct, which is set
by calling the PLUGIN_INFO() macro - this can be read before the
plugin is initialized.
Added more comments for plugin authors.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1645 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-06-27 15:56:42 +00:00
Nick Treleaven
6e53eacc70 Added very basic plugin support - any plugins found in
/lib/geany are loaded at startup. Windows support will be
added later.
Added Demo plugin (currently installed by default), which adds an
item in the Tools menu.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1643 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-06-26 16:17:16 +00:00