110 Commits

Author SHA1 Message Date
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
Nick Treleaven
f56cad490e Remove data_ptr argument to foreach_[s]list() macros, as using
node->data is enough sometimes; this makes the macro a bit more
efficient too.
Add foreach_[s]list() macros to the plugin API docs.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3862 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-12 15:32:35 +00:00
Enrico Tröger
a95a59a42f Remove all G_LIKELY macros inside g_return_if_fail() statements as this is redundant.
Remove many other G_LIKELY/G_UNLIKELY macros which doesn't make much sense to keep the code more readable.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3708 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-15 22:47:33 +00:00
Enrico Tröger
a9dc990049 Start using G_LIKELY/G_UNLIKELY macros to gain a little more performance when building the code with gcc.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3687 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-05 21:07:40 +00:00
Nick Treleaven
26d27cbd2e Rename sorted_filetypes filetypes_by_title, and add to GeanyData
for plugin API access.
Fix order of filetypes in Save Actions Instant Save configuration
dialog.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3677 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-02 15:00:17 +00:00
Nick Treleaven
4753e20394 Fix sorting filetype template menu items.
Add foreach_slist() macro.
Make sorted_filetypes list public, and include None filetype first.
Rename filetypes_foreach_sorted() to filetypes_foreach_named() to
show it doesn't include the None filetype.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3672 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-31 14:32:03 +00:00
Nick Treleaven
c220fadc9e Make None filetype name = title = _("None").
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/reorder-filetypes@3665 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-27 16:14:29 +00:00
Enrico Tröger
f40a88fce9 Fix wrong Fortran 90 comment characters when inserting templates.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3600 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-25 23:25:06 +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
60e751eaf2 Remove filetype O-Matrix (probably unused for years).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3482 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-18 18:18:38 +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
d007adc71f Add filetype Ada (closes #1811306 and #1765830, patch by Philipp Gildein, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3444 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-04 16:00:50 +00:00
Enrico Tröger
6c60580989 Add new filetypes CMake and NSIS.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3414 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-21 20:31:09 +00:00
Enrico Tröger
9e25c43487 Move implementation of lookup_widget() into ui_lookup_widget().
Change uses of lookup_widget() to ui_lookup_widget().
Remove now unneeded support.c.
Use GLib gettext macros in support.h instead of own ones.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3402 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-18 21:21:53 +00:00
Enrico Tröger
c536d51915 Fix compiler warning about a possibly uninitialised variable.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3366 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-11 17:43:43 +00:00
Enrico Tröger
8ed9710f48 Rewrite of the whole toolbar code. Now it is based on GtkActions and all elements can be added/removed/reordered using a simple XML file.
Add GeanyMenubuttonAction and GeanyEntryAction as GtkAction subclasses to have menu buttons and text entries in the toolbar.
Change the Goto line toolbar item back to a plain text entry again.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3328 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-06 11:10:06 +00:00
Enrico Tröger
0f8b8a2f2f Add new filetype 'YAML' (patch by Walery Studennikov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3290 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-29 12:51:50 +00:00
Enrico Tröger
31a0755c3a Make templates_replace_all() working on GStrings to fix various string replacement problems when using custom file templates.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3268 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 18:19:36 +00:00
Nick Treleaven
a2ceb60e3a Make utils_free_pointers() take an arg_count argument to prevent
memory leaks.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3245 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 17:14:00 +00:00
Enrico Tröger
79ed7d7604 Plug little memory leak.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3240 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-16 17:55:05 +00:00
Enrico Tröger
023cf3f325 Add a file template for LaTeX (patch by Herbert Voss, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3212 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-11 19:50:40 +00:00