100 Commits

Author SHA1 Message Date
Nick Treleaven
21eb6bd989 Remove filetypes_find(), which will be replaced with a dynamic array
of filetype pointers (more flexible and backwards compatible with
existing code).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2546 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-01 17:01:32 +00:00
Nick Treleaven
75a1cf7f03 Add filetypes_new() to create and initialize a new filetype.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2545 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-01 14:51:47 +00:00
Nick Treleaven
59fb39390a Add filetypes_find() that calls a predicate function for each
filetype in filetypes_hash until TRUE is returned.
Make filetypes_detect_from_extension() work for all filetypes
in filetypes_hash.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2544 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-01 14:30:20 +00:00
Nick Treleaven
d5e39530df Store filetype::name instead of unique ID when saving sessions.
Remove all filetype UID code.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2543 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-01 12:10:46 +00:00
Nick Treleaven
18789117f1 Refactor create_set_filetype_menu() from filetypes_init().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2540 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-28 16:52:20 +00:00
Nick Treleaven
7ede716a9c Add GEANY_MAX_BUILT_IN_FILETYPES for accessing built_in_filetypes[].
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2539 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-28 16:15:08 +00:00
Nick Treleaven
5340f2b9c8 Remove filetypes array from API.
Replace filetypes_get_from_uid() with filetypes_lookup_by_name().
Use a hash table for filetypes, but keep the old filetypes array
available for now.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2538 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-28 14:41:09 +00:00
Enrico Tröger
02ea9a08d8 Revert the translatable filetype name of filetype All, add a workaround in ui_update_statusbar() instead.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2472 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-11 15:39:44 +00:00
Frank Lanitz
4b975c8f39 Make another string translatable
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2469 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-10 21:02:42 +00:00
Enrico Tröger
bd9881d162 Add ".xhtml" extension for filetype XML (#1914587).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2362 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-18 16:38:01 +00:00
Enrico Tröger
c0990b5e71 Add HTML parser to get h1, h2, h3 symbols as well as link anchors and JavaScript functions (closes #1896068).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2317 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-09 18:50:41 +00:00
Enrico Tröger
b7f834dbc0 Apply patch from Yura Siamashka to use she-bang filetype detection also in filetypes_detect_from_filename() which let plugins benefit from this feature.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2306 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-05 17:09:57 +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
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
5d3801fe30 Add *.vala extension to CSharp filetype to support the Vala language.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2131 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-25 14:19:47 +00:00
Frank Lanitz
414afe3f37 Added .ltx as extension for LaTeX-documents
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2081 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-30 18:04:25 +00:00
Enrico Tröger
dc4bc34e36 Add support for env wrapper in shebang detection (inspired by a patch from Yura Siamashka).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2013 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-04 10:06:06 +00:00
Nick Treleaven
046d5ef796 Fix bug with using the default extension, not the user set one, if
'New with template' is used before any documents of the same filetype
are open.
Load filetype keyfiles from filetypes_load_config(), not from
styleset_foo_init().
Add highlighting_init_styles(), highlighting_set_styles(),
simplifying a lot of styleset function code.
Remove filetype::style_func_ptr field.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2011 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-02 17:44:05 +00:00
Nick Treleaven
79ff87713a Add configurable default file extension setting for filetype
definition files.
Note: There is a bug with using the default extension, not the user
set one, if 'New with template' is used before any documents of the
same filetype are open.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2006 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-01 16:33:06 +00:00
Nick Treleaven
deb7a04d14 Only translate '%s source file' instead of whole title for filetypes
(easier for new translations).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1999 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-31 16:41:01 +00:00
Nick Treleaven
f836bbcd7f Set reStructuredText default file extension .rst.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1994 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-31 12:16:48 +00:00
Nick Treleaven
51f619f0ec Rewrite filetypes_get_from_uid() for easier maintenance.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1794 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-14 15:36:12 +00:00
Nick Treleaven
5be30988c8 Add comment about generating filetype_extensions.conf.
Update filetype_extensions.conf.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1793 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-14 15:24:01 +00:00
Nick Treleaven
b9c0dcdc8b Sort filetype groups alphabetically.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1792 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-14 15:11:54 +00:00
Nick Treleaven
2e454f7af5 Add reStructuredText filetype and parser.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1791 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-14 11:50:03 +00:00
Enrico Tröger
75c74284f8 Add filetype Haxe (patch by blackdog, thank you).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1744 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-26 09:50:12 +00:00
Nick Treleaven
ae6de4f5c6 Use extern 'app' and 'filetypes' global variables in headers, so that
G_MODULE_BIND_LOCAL can later be used when loading plugins to detect
any unresolved symbols.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1725 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-19 11:49:53 +00:00
Enrico Tröger
f158ea71a1 Fix compiler warnings.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1712 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-17 08:39:17 +00:00
Enrico Tröger
7f1dd7dacc Add shebang-like detection for PHP files starting with "<?php".
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1697 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-12 18:07:49 +00:00
Enrico Tröger
f7d95e736e Change name of XML filetype to "XML document".
Add sub menus to "Set Filetype" menu.      


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1680 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-09 12:46:16 +00:00
Enrico Tröger
693649f955 Add new filetypes CSharp and FreeBasic.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1635 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-06-22 17:34:31 +00:00
Nick Treleaven
5492a6d99b Use filetype_has_tags().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1580 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-26 15:26:05 +00:00
Nick Treleaven
58e151698e Replace filetype::has_tags member with filetype_has_tags().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1578 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-26 12:13:53 +00:00
Enrico Tröger
81c4fd0c5e Better to use setptr macro.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1577 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-26 09:23:44 +00:00
Enrico Tröger
375026cd00 Ignore case of filename extensions on Windows.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1576 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-26 09:03:02 +00:00
Enrico Tröger
6e630eb8ae Add shebank-like detection for XML files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1573 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-25 15:19:23 +00:00
Enrico Tröger
db9271df29 Add *.ash and *.bash as filetype entensions for filetype SH.
Add ash and wish to the shebang patterns.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1571 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-25 13:08:17 +00:00
Enrico Tröger
12104026d0 Backport changes from CTags SVN to fix parse problems in the Ruby parser.
Add filetype extension "*.ruby".


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1563 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-23 14:26:52 +00:00
Nick Treleaven
e3ffabcdea Add Haskell tags support from CTags patch on sf.net written by Peter
Strand (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1558 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-23 12:32:06 +00:00
Nick Treleaven
cc3d26df71 Add some menu separators to group filetype menu items.
Reorder Haskell, O-Matrix, VHDL filetypes.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1530 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-14 12:55:55 +00:00
Enrico Tröger
725ae82446 Added new filetype Haskell (patch by Guillaume Hoffmann, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1510 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-06 14:05:43 +00:00
Nick Treleaven
45a3a84697 Use the more common .pl suffix for the default Perl extension.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1509 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-05 17:01:59 +00:00
Nick Treleaven
4a7d4da2be Separate filetype menu item creation from filetypes_init_types() so
it can be called without initializing GTK (for non-GUI commands).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1478 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-04-25 15:01:14 +00:00
Nick Treleaven
14001ddc8f Split filetypes_get_from_filename() into filetypes_detect_from_file()
and filetypes_detect_from_filename().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1460 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-04-18 12:12:51 +00:00
Nick Treleaven
05164ab8ae Remove wrong UTF-8 conversion in filetypes_get_from_filename().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1455 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-04-16 11:10:22 +00:00
Enrico Tröger
398ddf6d73 Added context actions to run custom commands on current selection or the current word below cursor.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1453 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-04-15 18:09:59 +00:00
Enrico Tröger
f486728aed Added new file filter for Open File dialog to only show supported source files (list of all defined filename extensions).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1356 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-03-01 22:38:31 +00:00
Nick Treleaven
2df920bbe9 Use utils_strv_new() for all filetype patterns.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1343 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-02-27 14:53:37 +00:00
Enrico Tröger
3ddb830c07 Added *.pod to Perl file patterns.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1335 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-02-25 16:33:44 +00:00
Nick Treleaven
806dd5be1d Add descriptions for all .c source files below the file header.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1329 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-02-24 11:41:56 +00:00