Nick Treleaven
025e391dba
Save build commands for filetype None (patch by Lex, thanks).
...
Make filetypes_get_conf_extension() return "common" for filetype
None.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5387 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-09 15:34:24 +00:00
Nick Treleaven
e4690e1598
Fix wrongly adding newlines for templates on disk that don't have
...
LF line endings when default line endings are not LF, e.g. Windows.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5362 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-02 18:03:06 +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
Enrico Tröger
b0464705db
Strip the output of {command: } templates ( closes #3079063 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5272 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-02 14:36:12 +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
Enrico Tröger
292de5d513
Make make_comment_block() work with a GString. This is not yet perfect but a bit better than before.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5112 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-31 15:31:30 +00:00
Nick Treleaven
b902af6749
Remove template strings (not sure why gcc doesn't warn about unused static data?).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5027 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-16 15:26:04 +00:00
Nick Treleaven
8be9c6aea8
Move general templates from source code into files.
...
Load general templates from system path instead of creating them in
the user's config dir.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/unstable@5012 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-09 12:27:58 +00:00
Enrico Tröger
cd246927ff
Explicitly disconnect menus from GeanyMenuButtonAction on quit to not trigger updating the menus on each item removal.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4917 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-15 13:14:38 +00:00
Nick Treleaven
64afb8a637
Avoid connecting signals more than once.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4881 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-07 13:21:32 +00:00
Nick Treleaven
435a479d98
Reload templates if saving a document in the templates config dir.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4878 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-06 12:45:19 +00:00
Nick Treleaven
31571a39cf
Add {project}, {description} template wildcards ( #2954737 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4874 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-05 13:06:53 +00:00
Enrico Tröger
8c963d2829
Make string arguments const where appropriate (patch by Colomban Wendling, thanks).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4862 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:43:39 +00:00
Nick Treleaven
6786e05e03
Support {pc} wildcard in snippets to escape percent char.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4852 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-22 13:01:45 +00:00
Nick Treleaven
cdd93f7ab8
Support {ob} and {cb} wildcards for snippets too ( fixes #2937008 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4847 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-21 17:19:27 +00:00
Nick Treleaven
90ddffd836
Support {ob} and {cb} in fileheader and file templates; they are
...
replaced last with { and }. This allows 'escaping' of wildcard
strings (fixes #2937008 ).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4843 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-21 16:47:54 +00:00
Enrico Tröger
7ccd9dd46b
Partly revert last commit:
...
Unref the new files toolbar menu when freeing templates as it was done before but unref it *after* the menu has been removed from the GeanyMenuButtonAction.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4652 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-07 18:19:25 +00:00
Enrico Tröger
4dfab4f7ee
Unref the new files toolbar menu when setting a new menu to fix possible crashes when reloading configuration.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4643 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-06 17:24:43 +00:00
Enrico Tröger
eabcdd579f
Use utils_spawn_sync() instead of g_spawn_sync().
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4631 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-31 22:08:58 +00:00
Enrico Tröger
d461084743
Add new special template wildcard "{command:...}" to use the output of a command in templates.
...
Adjust template functions to mostly work with GeanyDocuments.
Minor cleanups in the template code.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4539 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-24 14:52:46 +00:00
Enrico Tröger
6165ef9203
Refactor templates_replace_all() into templates_replace_valist() to save some code duplication.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4522 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-12 21:10:46 +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
dfd1ea1782
Add utils_get_config_files().
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4396 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-04 14:47:07 +00:00
Nick Treleaven
90a166151c
Add Edit->Commands submenu which is shared with the editor popup menu.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4380 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-27 17:27:24 +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
2ed2fe1af6
Fix memory leaks with gtk_container_get_children().
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4305 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-12 16:31:38 +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
f7165a030f
Put old filetype template menu items in 'Old' submenu as they should
...
be removed after the 0.19 release.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4299 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-12 11:15:08 +00:00
Nick Treleaven
ccd566e2d1
Don't use filetype submenus for templates (slower to navigate, often
...
only 1 per-filetype anyway).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4297 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-12 10:53:39 +00:00
Nick Treleaven
ad1c1d9889
Fix minor mem leak.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4284 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-01 16:43:32 +00:00
Nick Treleaven
7e90bfb369
Warn if custom template file no longer exists.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4283 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-01 16:39:38 +00:00
Nick Treleaven
aa55a88a2b
Simplify file menu signal connection a little.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4281 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-01 16:10:33 +00:00
Nick Treleaven
02e7da5466
Don't create templates/filetype.none either.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4280 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-01 15:56:51 +00:00
Nick Treleaven
02fabf16c2
Only use one 'New with template' submenu - reparent as needed.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4279 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-01 14:40:42 +00:00
Nick Treleaven
050971120d
Group 'New with template' items by filetype submenu (currently only for
...
toolbar menu).
Show custom file template items before filetype template items.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4278 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-01 11:56:04 +00:00
Nick Treleaven
86f6f8621e
Fix wrong creation of filetype template menu items for custom
...
filetypes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4275 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-01 11:06:08 +00:00
Nick Treleaven
7bb57aca2b
Move filetype template defaults into custom file template files.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4273 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-30 17:40:10 +00:00
Nick Treleaven
ed260aa72d
Read custom file templates from $prefix/share/geany/templates/files as
...
well as user dir.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4271 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-30 14:39:47 +00:00
Nick Treleaven
640795260c
Fix minor memory leak.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4268 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-29 14:12:55 +00:00
Nick Treleaven
550acb30be
Add utils_get_file_list_full() which can optionally sort or include
...
a full path for each list item.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4264 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-29 12:10:17 +00:00
Nick Treleaven
59c90a1a41
Use static toolbar_new_file_menu pointer.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4263 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-29 11:39:35 +00:00
Nick Treleaven
8f7f5f95cf
Use foreach_dir() instead of utils_get_file_list() as list is resorted anyway.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4262 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-29 11:31:25 +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
89a708bd11
Merge trunk changes.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@4142 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-08-31 15:46:19 +00:00
Enrico Tröger
285a7670c8
Add missing 'coding' cookie to the Python filetype template.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4088 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-08-15 17:33:20 +00:00
Nick Treleaven
2bb49a38c8
Support adding custom filetype files e.g. filetype.Foo.conf. (Only
...
tested with empty file so far).
Allow GeanyFiletype::extension to be NULL.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@4070 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-08-12 11:19:54 +00:00
Nick Treleaven
d563da620c
Rename utils_str_replace() utils_str_replace_all(), setting a
...
'gchar **haystack' argument instead of returning a new string.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4014 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-23 16:01:45 +00:00
Enrico Tröger
5dbd06700d
Improve inserting of comment templates like File header or licence notices. The comment information are now read from the filetype configuration files.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3991 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-18 14:45:43 +00:00
Enrico Tröger
13fe19aaa1
Create initial template files with proper platform-specific line ending characters.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3885 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-21 21:19:18 +00:00
Enrico Tröger
8b5b6287e1
Instantly reload (i.e. rebuild) the toolbar when ui_toolbar.xml is saved within Geany.
...
Refactor some related code.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3874 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-20 16:51:32 +00:00