406 Commits

Author SHA1 Message Date
Enrico Tröger
51b3a33503 Add plugin_module_make_resident() to the plugin API which allows plugins to make the module resident. This seems necessary when using GTypes, e.g. by using the GObject API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3559 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-06 19:05:12 +00:00
Enrico Tröger
c45ea64eec Add an option to 'follow the path of the current file' in the filebrowser plugin.
Add an option to automatically set the project's base directory when a project is opened/changed (closes #2554027).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3533 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-01 18:48:09 +00:00
Enrico Tröger
56a1470bb9 Add utils_string_replace_first() to the plugin API.
Allow entering paths prefixed with '~' in the filebrowser path entry.
Show the full path for files and folders in the filebrowser plugin as tooltips.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3529 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-30 16:12:25 +00:00
Enrico Tröger
5752ee9863 Rename utils_start_browser() in utils_open_browser() and add it to the plugin API.
Add plugin symbol plugin_help() which is called by Geany when the plugin should show its documentation (if any). This symbol is optional, plugins can omit it if not needed.
Add a Help button next to the Configure button in the plugin manager dialog to easily open a plugin's documentation if available.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3524 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-28 19:30:18 +00:00
Enrico Tröger
f22c9a5916 Mention necessary header includes in the plugin signal descriptions.
Add missing header includes for the demoplugin.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3522 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-28 17:55:58 +00:00
Enrico Tröger
a2c01c6637 Use the selection 'changed' signal of the treeview to update the popup menu items and show the popup menu on mouse button press events so right clicking on items will select them first.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3521 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-28 17:22:34 +00:00
Enrico Tröger
644a9cfbff Add a progressbar widget to the statusbar and use it to show progress when building with the Make commands, when printing and when using Find in Files.
Add progressbar convenience functions and ui_entry_add_clear_icon() to the plugin API.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3517 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-27 20:19:43 +00:00
Enrico Tröger
836fa1dca0 Add dialogs_show_input_numeric() to the plugins API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3497 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-21 22:49:47 +00:00
Enrico Tröger
de3d3b42fb Add document_save_file_as and document_rename_file to the plugin API.
If GIO is available, use GFileMonitor to watch for file disk changes and indicate them immediately using an orange tab label colour.
Break plugin ABI for this and the last commits.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3484 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-18 18:19:58 +00:00
Enrico Tröger
4a6abdaa0e Fix build without GIO again (sorry).
Remove trailing slashes in Makefile.am's (patch by Daniel Richard G., thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3463 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-12 00:33:29 +00:00
Enrico Tröger
c636728975 Fix several compiler warnings and build errors (patch by Daniel Richard G., thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3460 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-11 18:29:39 +00:00
Enrico Tröger
0f0dbac7cd Don't write the default filetype to the config if it isn't set.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3447 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-04 18:31:22 +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
Enrico Tröger
44b7d27b50 Add "editor-notify" to the plugin API.
This signal is emitted whenever something in an editor widget changes, e.g. a character was typed.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3391 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-17 16:00:18 +00:00
Enrico Tröger
5394a14f4f When using the focus path entry and file list keyboard shortcuts, make sure the filebrowser tab is the current notebook tab in the sidebar (closes #2402290).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3341 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-07 19:12:27 +00:00
Nick Treleaven
921f010ffc Rename msgwin_compiler_add -> msgwin_compiler_add_string.
Rename msgwin_msg_add -> msgwin_msg_add_string.
Rename msgwin_compiler_add_fmt -> msgwin_compiler_add.
Rename msgwin_msg_add_fmt -> msgwin_msg_add.
This fixes 2 geanyfunctions.h macros, and is more consistent with
msgwin_status_add().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3326 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-05 17:30:06 +00:00
Nick Treleaven
501ddabb69 Remove final filetypes_array old macro usage.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3325 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-05 17:26:30 +00:00
Nick Treleaven
bcfc76db9f Fix use of filetypes_array.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3324 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-05 16:41:23 +00:00
Nick Treleaven
7994128e38 Rename sci_cmd() to sci_send_command() to match the plugin API and
fix the generated macro name.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3322 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-05 12:34:20 +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
Enrico Tröger
724ac63ac1 Add command line option to suppress status output.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3316 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-04 16:17:04 +00:00
Nick Treleaven
2d015b6fb2 Allow generating macros for functions with digits in the name.
Don't generate dummyprefix_scintilla_send_message and lookup_widget
macros.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3312 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-04 13:55:11 +00:00
Nick Treleaven
5e85300f65 Deprecate pluginmacros.h in favour of geanyfunctions.h.
Move geany macro to plugindata.h.
Remove geanyfunctions.h dependency on pluginmacros.h.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3311 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-04 13:26:48 +00:00
Nick Treleaven
5763dfbe2d Add document_index(), filetypes_index() array accessor functions to
the plugin API.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3310 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-03 18:03:54 +00:00
Nick Treleaven
80b936037e Add scintilla_send_message() to the API with its own prefix, so
the geanyfunctions.h macro works.
Deprecate p_sci->send_message().
Add scintilla_new() to the plugin API.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3309 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-03 13:36:45 +00:00
Nick Treleaven
b5ff19731e Move target for geanyfunctions.h to plugins/Makefile.am and depend
on src/plugins.c instead of all plugin API headers.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3308 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-03 12:41:05 +00:00
Nick Treleaven
f813a6a7e4 Add ui_lookup_widget() to plugin API (so genapi.py has a suitable
prefix).
Mark SupportFuncs as deprecated.
Add description comment for geanyfunctions.h.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3307 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-02 18:33:41 +00:00
Nick Treleaven
80a8939612 Add header guards for geanyfunctions.h and include pluginmacros.h
temporarily.
Update Demo plugin.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3306 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-02 17:05:50 +00:00
Nick Treleaven
98e127d3bd Generate plugin API header geanyfunctions.h containing macros to
avoid having to type the function pointer names manually.
E.g. plugin_add_toolbar_item(...) is expanded to
p_plugin->add_toolbar_item(...).
Note: For now, building on Windows or with Waf needs genapi.py to be
run manually when adding plugin API functions.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3305 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-02 16:34:32 +00:00
Nick Treleaven
bea7bbab00 Use g_str_has_suffix() instead of utils_str_equal().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3277 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-24 17:57:16 +00:00
Enrico Tröger
160e5e8491 Attempt to make utils_get_date_time() UTF-8 safe and add it to the plugin API.
Fix misnamed str_casecmp() function in the plugin API, sorry.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3267 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 17:40:04 +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
Enrico Tröger
81ffd05aa1 dd ui_widget_set_tooltip_text() as a convenience function to easily set tooltips for widgets. It uses gtk_widget_set_tooltip_text() on GTK >= 2.12 otherwise the old tooltips API.Use ui_widget_set_tooltip_text().
Use ui_widget_set_tooltip_text() in the plugins.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3250 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 20:14:42 +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
Enrico Tröger
d7caf0f9c0 Follow XDG Base Directory specification and use $XDG_CONFIG_HOME/geany (most often this is ~/.config/geany) as default configuration directory (closes #2166229).
The previous configuration will be moved to the new location if the new directory doesn't exist yet.
Move utils_make_settings_dir() into main.c.
Remove win32_get_appdata_folder() because g_get_user_config_dir() does the same.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3219 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-13 14:37:47 +00:00
Nick Treleaven
24c7302f9c Add Split Vertically command (patch by Moritz Barsnick, thanks;
#2219553).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3215 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-12 16:21:32 +00:00
Enrico Tröger
0b49cf4449 Use 'utf8' as encoding package in the LaTeX template as it seems it is the most used version for UTF-8 support.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3208 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-11 18:07:35 +00:00
Nick Treleaven
12e29d7ebd Make Version Diff plugin set the indent type for diffs based on the
current file's indent type.
Add editor_set_indent_type() to the API.
Note: uses editor.h plugindata.h include.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3194 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-08 13:32:55 +00:00
Enrico Tröger
bae8ca23d7 Revert last change as it breaks (again) the primary X selection as well as the mouse cursor on the scrollbar.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3163 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-30 15:23:27 +00:00
Enrico Tröger
c9fc4a1048 Try to fix a weird bug in reparenting the notebook widget when splitting on Windows. It still occurs on unsplitting.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3161 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-29 20:52:22 +00:00
Enrico Tröger
6bc86c4462 Replace gtk_widget_(un)ref() with g_object(un)ref(), patch by Colomban Wendling, thanks.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3143 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-22 15:36:45 +00:00
Enrico Tröger
a47d72432c Include "support.h" for I18N support instead of <glib/gi18n.h> to get strings translated with GLib 2.18+.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3112 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-18 10:54:49 +00:00
Nick Treleaven
1096ec427c Fix mixed indentation (prevents vcdiff.c being detected as T/S).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3096 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-15 12:24:48 +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
Nick Treleaven
d8d727752e - API changes:
Replace p_ui->get_toolbar_insert_position() with
p_plugin->add_toolbar_item(), which also adds a separator when the
first item is added.
Add 'GeanyPlugin *geany_plugin' plugin symbol, partly to replace
plugin_info (now deprecated), mainly to identify a plugin and hold
private implementation fields for plugin utility functions.
(plugin_info will be removed after the 0.15 release.)
- Code changes:
Add ui_auto_separator_add_ref() to hide separator-like widgets when
their visible group elements are hidden or destroyed.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3074 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-13 12:38:32 +00:00
Enrico Tröger
5b772ef629 InstantSave: when opening new files from template, use the template's filetype, otherwise fall back to configured default filetype.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3072 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-12 17:51:56 +00:00
Nick Treleaven
76708ae327 Fix only updating filename label after saving the relevant document.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3059 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-08 11:38:40 +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
Nick Treleaven
c430b7e57a Add filename label.
Fix Gtk warning when resplitting.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3055 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 17:31:17 +00:00
Nick Treleaven
8c2a6ed157 Refactor with set_editor().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3054 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 17:12:33 +00:00