360 Commits

Author SHA1 Message Date
Enrico Tröger
66c8b7faee Add ui_menu_add_document_items_sorted() and document_sort_by_display_name() to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5705 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-10 17:03:41 +00:00
Nick Treleaven
07fed6de1e Don't hide directories matching hidden file extensions e.g. foo.o.
Refactor with check_object().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5663 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-31 17:58:01 +00:00
Nick Treleaven
e6c579c624 Fix optimization for filter check when pattern is '*'.
Use foreach_strv() instead of foreach_c_array().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5662 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-31 17:28:03 +00:00
Nick Treleaven
b41b021674 Fix applying default setting for hide_object_files (oops).
Fix warning when enabling plugin from the Plugin Manager.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5661 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-31 15:34:55 +00:00
Nick Treleaven
d69f8f69f6 Make 'Hide object files' preference configurable with file
extensions.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5660 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-31 15:01:24 +00:00
Nick Treleaven
953be445cb Remove confusing macro CHECK_READ_SETTING().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5659 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-30 16:18:47 +00:00
Colomban Wendling
12db21f519 Properly use 0 as the invalid timeout source ID, rather than G_MAXUINT
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5657 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-30 14:59:25 +00:00
Nick Treleaven
bf4b063853 Remove unnecessary use of DOC_VALID() macro.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5656 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-30 13:09:27 +00:00
Nick Treleaven
a1f96c36ae Fix Instant Save preferences combo box filetype order.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5655 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-30 12:47:26 +00:00
Nick Treleaven
93d65a1daf Update styles when the filetype changes (based on patch by
Matthew Brush, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5654 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-30 12:31:29 +00:00
Colomban Wendling
8b737e707d Use new plugin_idle_add(), preventing an unlikely crash
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5651 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-29 23:20:29 +00:00
Colomban Wendling
ef9360c78b Add plugin_{idle_add,timeout_add,timeout_add_seconds}() to the plugin API
These functions does the same as the corresponding GLib functions but
makes sure that the added GSource will be removed when the plugin is
unloaded, preventing possible crashes.

These are only convenience functions for the plugin author not to have to
care about the case the plugin gets unloaded, he can still manually
manage hes GSources if he wants to.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5650 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-29 23:20:14 +00:00
Nick Treleaven
22038400cc Add filetypes_get_sorted_by_name() to API.
Fix --ft-names sorting to print in name order, not title order.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5649 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-29 18:06:26 +00:00
Colomban Wendling
2fcb9c6790 Revert r5636 "Remove widget reparenting in Split Window plugin"
It breaks the X PRIMARY selection on the normal Geany editor.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5640 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-27 16:02:34 +00:00
Colomban Wendling
e5071473c1 Revert r5638 "Enable SplitWindow build on Windows again."
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5639 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-27 16:02:21 +00:00
Enrico Tröger
9b8b01a0b2 Enable SplitWindow build on Windows again.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5638 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-27 15:28:02 +00:00
Colomban Wendling
df172dfedd Remove widget reparenting in Split Window plugin
Instead of reparenting the documents notebook full of
ScintillaObjects, just ref it, remove it from the old parent, add
it to the new parent, and then unref it.  This fixes the display
issue on Windows and seems to have no issues on Linux.

Patch by Matthew Brush, thanks.
Closes #2725342.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5636 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-27 15:02:07 +00:00
Colomban Wendling
9704e8f954 Don't unsplit when closing the document if we can show another one
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5634 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-27 00:18:31 +00:00
Colomban Wendling
35d5bb2c24 Fix confusing terminology in Split Window plugin menu labels
Patch by Matthew Brush, thanks. Closes #2796316.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5633 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-27 00:18:18 +00:00
Colomban Wendling
fc910a2448 Enable code folding in splitview window (closes #3097780)
Based on a patch by Matthew Brush, thanks!

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5632 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-27 00:18:05 +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
Colomban Wendling
7698bf60a7 Improve usage of G_(UN)?LIKELY()
G_(UN)?LIKELY() should be only used on whole conditional expressions,
and only if the branching is very highly predictable, not if it is only
more probable.

These macros should be used with care because a wrong prediction may
be a lot worst than what a good prediction can give.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5625 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 22:00:18 +00:00
Nick Treleaven
2813df48cf Add history to filter entry.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5620 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 16:34:10 +00:00
Nick Treleaven
f25e18d866 Allow multiple file filters to be separated by a space for
consistency with Find in Files file patterns. ';' is still
allowed also.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5616 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-22 17:26:47 +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
Colomban Wendling
8e79a2255a Prefer prepend elements to lists rather than append them
This is for better performances since appending to a list means walking
it to find the last element to append to. When the list ordering
matters, simply reverse the list after prepengins.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5586 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-10 22:27:04 +00:00
Enrico Tröger
7e29511228 Fix off-by-one bug which hidden the last empty line of a document.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5581 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-06 17:37:58 +00:00
Enrico Tröger
76b49acf4c Use the full filename and add the extension of the export format.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5579 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-06 17:13:45 +00:00
Enrico Tröger
65fcc2b0c0 Cleanup.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5578 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-06 17:10:30 +00:00
Enrico Tröger
b77b71fdd2 Add option to insert line numbers (closes #3197150).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5576 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-06 17:02:09 +00:00
Enrico Tröger
4d2679ad2d Fix wrong warning on empty backup directory setting if 'Backup Copy' is not enabled at all.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5551 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-02 20:00:17 +00:00
Enrico Tröger
09b734f921 Add support for multiple file filters, separated by semicolon (based on a patch by Grigory Javadyan, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5543 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-02-21 19:09:34 +00:00
Enrico Tröger
67d739f9b0 Add '.pyc' to the list of hidden object files (patch by Filip Gruszczyński, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5530 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-20 19:51:31 +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
4c17428732 Add filetypes_get_display_name() to API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5497 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-12-22 16:59:38 +00:00
Nick Treleaven
b9a42fa6d1 Add dialogs_show_input() to API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5418 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-18 18:27:01 +00:00
Nick Treleaven
ddefb0a0b4 Add API functions (patch by Eugene Arshinov, thanks):
Move editor.c: is_{string,comment,code}_style() functions to
highlighting.c, add to API.
Add editor_find_snippet(), editor_insert_snippet(),
utils_find_open_xml_tag() to API.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5409 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-16 15:07:40 +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
Nick Treleaven
e7206f35b8 Add sci_get_lexer() to plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5352 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-02 12:55:17 +00:00
Nick Treleaven
cf6756d06e Remove unnecessary includes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5351 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-02 12:49:05 +00:00
Nick Treleaven
568f1853d2 Remove unnecessary uses of FILETYPE_ID() macro with
GeanyDocument::file_type.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5323 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-25 17:24:47 +00:00
Nick Treleaven
98e6efb3b4 Add msgwin_set_messages_dir() to API (patch by Jiří Techet, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5237 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-16 15:31:23 +00:00
Enrico Tröger
0f7d1928cc Add editor_goto_pos() to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5164 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-15 17:44:31 +00:00
Enrico Tröger
befcb63e59 Ensure inserted templates always have proper line ending characters
according to the current document's preference.
This is also fixes problems with templates on Windows which had
always Unix line ending characters but now since they are read
from files, these have Windows line ending characters and had been
converted twice.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5114 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-01 17:20:50 +00:00
Nick Treleaven
4476a79127 Use ui_hookup_widget() instead of g_object_set_data_full() for
widgets.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5063 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-23 16:57:28 +00:00
Nick Treleaven
aca9e894fc Allow Find in Files when no items are selected.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5052 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-18 17:03:35 +00:00
Nick Treleaven
980e4c6112 Remove foreach_slist_free() macro - not worth the complexity (list nodes are probably cached anyway).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5050 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-18 14:20:10 +00:00