72 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
Matthew Brush
d36db75bcb ClassBuilder: Defy GTK+ conventions and instead generate valid C code 2012-08-10 21:05:41 -07:00
Colomban Wendling
1c2c455b1d Update copyright information 2012-06-18 01:15:04 +02:00
Matthew Brush
c4980f8c1e classbuilder: Move caret to start of generated documents 2011-10-28 01:12:29 -07:00
Matthew Brush
65e20780e4 classbuilder: Use GTK/GNU code style for generated GTK+ code
Use two spaces instead of tabs, spaces between function and opening
argument bracket, and various minor changes.

Add dummy gpointer to private struct so the class can be compiled
without modification.
2011-10-28 00:31:26 -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
Colomban Wendling
dbb260f5bb Fix some compiler warnings
* Shadowed function (splitwindow plugin);
 * Invalid escape sequence (classbuilder plugin);
 * Non-static local functions (classbuilder plugin);
 * Missing function argument type (keybindings.c).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5626 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 22:00:34 +00:00
Nick Treleaven
0e888d75be Undo patch change to cc_option_label_new() to append a ':' colon to
label text because this unnecessarily causes string translations to 
be updated.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5599 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-17 13:02:13 +00:00
Nick Treleaven
d9e3627c01 Fix GLib warning when creating classes and no documents are open
(patch by Matthew Brush, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5598 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-17 12:54:41 +00:00
Nick Treleaven
b3edb0e74b Improve Class Builder plugin dialog UI using a table (patch by
Matthew Brush, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5597 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-17 12:49:21 +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
Enrico Tröger
0f92a6fd89 Remove two unnecessary g_strdups().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4944 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-22 19:39:38 +00:00
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