54 Commits

Author SHA1 Message Date
Nick Treleaven
0998f1c19c Make code more readable by renaming poorly named macros NZV and NVL
Closes #159
2013-08-14 21:54:20 -07:00
Colomban Wendling
9652a34ef0 Add ellipsis to menu items requiring further user input
This is a very common paradigm used by GNOME, KDE, MacOSX, Windows,
etc., and following it makes our UI more consistent with these and
easier to use by their users.

https://developer.gnome.org/hig-book/stable/menus-design.html.en#menu-item-type-command

Closes #3613494.
2013-05-19 23:15:38 +02:00
Colomban Wendling
d80bc7ce56 Update FSF address
Closes #3557875.
2012-08-24 19:25:57 +02:00
Colomban Wendling
1c2c455b1d Update copyright information 2012-06-18 01:15:04 +02:00
Matthew Brush
bd5fba7eb5 Remove extra whitespace at end of lines in all source files.
* Processed with rstrip-whitespace.py script added to scripts/ directory.
* Script run on all .c and .h files in src/ and plugins/ directories.
* Also remove more than one newline at the end of files.
2011-10-11 21:52:58 -07:00
Colomban Wendling
d06e9f4575 Remove $Id$ and $Date$ SVN keywords 2011-10-09 22:57:35 +02:00
Colomban Wendling
5bad25e2ab Only include config.h when building Geany
config.h is not distributed, and we includ it from geany.h.  Even
though it was only included it HAVE_CONFIG_H was defined, an Autotools
based build system is likely to define it, and it becomes a problem if
that very build system uses another header name than config.h.

Closes #3384026

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5882 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-08-03 15:20:26 +00:00
Colomban Wendling
3bd6a01525 Fix a few signed vs. unsigned and differently-sized integer problems
Most notably, utils_get_line_endings() and document_open_file_list()
don't support -1 as the size anymore.  If the size should be computed
from null-terminated data, the caller code must take care of doing so.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5855 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-17 22:52:17 +00:00
Enrico Tröger
6ac2623208 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Nick Treleaven
65deb1e51d Rename submenu item labels to be more descriptive.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5354 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-02 13:05:12 +00:00
Nick Treleaven
daae45054c Only automatically replace characters when the current document is
a Markup document.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5353 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-02 12:57:10 +00:00
Enrico Tröger
3f3d2d1b9b Make string arguments const where appropriate (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4861 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:43:09 +00:00
Frank Lanitz
a70c8a1513 Make HTMLchars plugin remember whether replacement of special characters was activated even after restart of Geany or reloading of plugin.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4815 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-09 20:42:45 +00:00
Enrico Tröger
1864e6e6a5 Deprecate GEANY_WINDOW_MINIMAL_WIDTH/GEANY_WINDOW_MINIMAL_HEIGHT to not set Geany's minimum window size anymore (closes #2972992).
As replacement, add GEANY_DEFAULT_DIALOG_HEIGHT.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4782 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-20 16:20:55 +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
1986d915cc Run ./scripts/fix-alignment.pl -w src/*.[hc] plugins/*.[hc] (skipping generated files).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4199 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-16 14:13:38 +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
Nick Treleaven
8bf28b76fb Merge trunk changes.
Add string.h include for htmlchars.c.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3679 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-03 13:45:47 +00:00
Frank Lanitz
c7a62c6b3d Applied a patch by Enrico to improve code of htmlchars plugin
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3650 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-24 20:35:28 +00:00
Frank Lanitz
10ea2cc7ba Remove usage of deprecated sci_get_selected_text() from htmlchars plugin.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3649 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-24 18:45:16 +00:00
Frank Lanitz
3c36f39cd5 Extend htmlchars plugin with some replacment functions.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3643 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-20 17:22:18 +00:00
Enrico Tröger
8cd312e250 Small optimisations by moving out function calls of loop break conditions (patch by Frank, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3571 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-10 21:11:25 +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
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
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
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
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
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
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
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
Enrico Tröger
1bd9ee6664 Use a separate string for keybinding label to avoid display of an underscore.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2337 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-13 15:08:03 +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
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
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
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