2639 Commits

Author SHA1 Message Date
Enrico Tröger
b2cddc87a0 Move indicator functions from document.c into editor.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2587 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 17:58:56 +00:00
Nick Treleaven
8fcf2072fe Update adding a filetype section, make clearer.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2586 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 16:44:18 +00:00
Nick Treleaven
a0337bc281 Fix line breaking not getting reset for new documents sometimes.
Merge all document default settings into init_doc_struct().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2585 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 16:37:09 +00:00
Enrico Tröger
7986d13d40 Add shebang detection for Makefiles.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2584 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 16:13:16 +00:00
Enrico Tröger
6187c3d9b2 Remove unnecessary case statement for PHP files, can be handled by the default case.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2583 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:58:03 +00:00
Enrico Tröger
f04e0c3955 Change an error message to be more clear about the error.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2582 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:50:11 +00:00
Enrico Tröger
c151befff3 Add new function document_set_indicator_on_line() for future use.
Add some functions to the plugin API for the upcoming spell check plugin.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2581 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:46:48 +00:00
Enrico Tröger
392d1f863f Add preferences for default end of line characters for new files (closes #1895362) and to disable the automatic continuation of multi-line comments in C-like languages.
Enable multi-line continuation also for CSS files.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2580 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:36:27 +00:00
Nick Treleaven
08bb6ae5fc Add note about possible double colourisation after reloading
(it shouldn't be that noticeable though).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2579 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 12:11:01 +00:00
Nick Treleaven
a8ab07fd19 Recolourise the document in document_reload_file() because the
text may have changed (should fix #1948857).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2578 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 11:58:05 +00:00
Nick Treleaven
f3dcad20b3 Sort custom template file menu items by filetype, with None
filetypes first.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2577 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 11:31:07 +00:00
Nick Treleaven
b39f7b1276 Create ~/.geany/templates/files directory if it doesn't exist.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2576 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-13 17:30:28 +00:00
Nick Treleaven
bd92df27f5 Add support for custom file templates found at startup in the
~/.geany/templates/files directory. These are currently shown
underneath filetype templates in the New with Template menu.
Add ui_menu_item_get_text().
Make utils_string_replace_all() ignore empty haystacks.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2575 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-13 17:18:14 +00:00
Enrico Tröger
9449f5a0d9 Clear a document's symbol list first after it was detached from its container to prevent crashes when saving files with collapsed symbol list items.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2574 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 13:46:19 +00:00
Enrico Tröger
a8855d2ec5 Iconify the main window on Windows before de-iconifying it when opening files remotely to ensure the main window pops up.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2573 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 12:40:37 +00:00
Enrico Tröger
340dccfb73 Remove hotspot code as it was never really used.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2572 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 12:28:34 +00:00
Enrico Tröger
7793ff6bb0 Add comments to keyword types to be more clear about their usage.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2571 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 12:22:27 +00:00
Enrico Tröger
abfbc59c3f Use Javascript styles for any VBScript and ASP code embedded in a HTML file.
Use Python styles for embedded Python code.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2570 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 12:20:49 +00:00
Enrico Tröger
79df8d0c8d Use gtk_window_present() instead of gtk_widget_show() for Open File and Preferences dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2569 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-10 08:32:30 +00:00
Nick Treleaven
ef8ffb8872 Add source_only argument for filetypes_find_source() and rename.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2568 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 17:14:35 +00:00
Nick Treleaven
bd103e1d2f Set filetype::id automatically in filetype_add().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2567 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 17:07:20 +00:00
Nick Treleaven
ff212680f7 Update api_version for new line breaking struct fields.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2566 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 15:03:24 +00:00
Nick Treleaven
17070c32c1 Update Code Navigation section for build errors and message items.
Correct Load Tags menu item being in the Tools menu now.
Document 'Disk check timeout' pref.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2565 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 14:37:30 +00:00
Nick Treleaven
b8de9a9ec1 Rename old uses of line breaking -> line wrapping. This includes the
keyfile pref, so any users with this enabled will have to reset it.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2564 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 14:19:01 +00:00
Nick Treleaven
f700baa906 Rename old uses of line breaking -> line wrapping. This includes the
keyfile pref, so any users with this enabled will have to reset it.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2563 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 14:17:25 +00:00
Nick Treleaven
d131023fe7 Add basic Line Breaking option in the Document menu. Line breaking
only works when typing characters past the line breaking column
number.
Add 'Line breaking column' editor pref.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2562 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 12:13:29 +00:00
Nick Treleaven
a260b25515 Fix C headers getting detected as C++ files (iterate through
filetypes_array, not filetypes_hash as the order is not consistent
with the filetype_id enum).
Add static function filetypes_find_source().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2561 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-08 14:16:35 +00:00
Nick Treleaven
f20b4e90f1 Merge revisions 2537:2558 from the custom-filetypes branch:
Note: this breaks the API.
This commit is to restructure most of the filetypes code that
affects the plugin API, custom filetype support is not implemented.
Add filetypes_array to GeanyData for plugins to access a dynamic
array of filetype pointers.
Remove old filetypes array from API.
Use a hash table for filetypes, using filetype::name keys.
Replace filetypes_get_from_uid() with filetypes_lookup_by_name().
Store filetype::name instead of unique ID when saving sessions.
Remove all filetype UID code.
Add GEANY_MAX_BUILT_IN_FILETYPES.
Remove GEANY_MAX_FILE_TYPES - use filetypes_array->len (or
GEANY_MAX_BUILT_IN_FILETYPES) instead.
Rename GEANY_FILETYPES_ALL GEANY_FILETYPES_NONE.
Make Open dialog file filter work for filetypes added after
GEANY_FILETYPES_NONE (really the None filetype should be made the
first element in filetypes_array, but this would need rewriting
quite a lot of code).
Add deprecated aliases for GEANY_MAX_FILE_TYPES and
GEANY_FILETYPES_ALL.
Remove unused filetype::item field.
Create FullFileType private type that 'inherits' from filetype
(FullFileType* can be cast to filetype*). This is used in
filetype_new() to hide filetype struct fields from the API.
Remove radio_items[] and use FullFileType::menu_item instead.
Make filetypes_detect_from_extension() work for all filetypes
in filetypes_hash.
Add filetype_new() to create and initialize a new filetype.
Refactor open_session_file() from configuration_open_files().
Refactor get_session_file_string() from
configuration_save_session_files().
Refactor create_set_filetype_menu() from filetypes_init().
Move print_filetypes() out of parse_command_line_options();


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2559 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 16:29:48 +00:00
Nick Treleaven
eb8e2a1a65 Rename static functions for filetype creation & addition.
Make filetypes_add(), filetypes_remove() static.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2558 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 14:09:12 +00:00
Nick Treleaven
f6f49dc117 Add deprecated aliases for GEANY_MAX_FILE_TYPES and
GEANY_FILETYPES_ALL.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2557 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 14:01:30 +00:00
Nick Treleaven
00c722966c Rename GEANY_FILETYPES_ALL GEANY_FILETYPES_NONE.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2556 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 13:54:21 +00:00
Nick Treleaven
a5df9640c9 Add filetypes_array macro to allow use of filetypes[ft_id].
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2555 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 12:22:46 +00:00
Nick Treleaven
a0aa89cbe9 Make Open dialog file filter work for custom filetypes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2554 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 12:13:58 +00:00
Nick Treleaven
67316db4c5 Remove GEANY_MAX_FILE_TYPES and replace most uses of it with
filetypes_array->len.
Highlighting and templates now use GEANY_MAX_BUILT_IN_FILETYPES.
Move print_filetypes() out of parse_command_line_options();


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2553 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 11:34:38 +00:00
Nick Treleaven
a4cf5607a6 Remove unused filetype::item field.
Create FullFileType private type that 'inherits' from filetype
(FullFileType* can be cast to filetype*). This is used in
filetypes_new() to hide filetype struct fields from the API.
Remove radio_items[] and use FullFileType::menu_item instead.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2552 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-06 17:04:06 +00:00
Enrico Tröger
19ccd5129e Add a note about the limitation of matching only line by line when using regular expressions.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2551 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-06 12:43:21 +00:00
Enrico Tröger
5ec3c087f3 Fix parsing when heading tags contain attributes (part of #1896068).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2550 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-04 17:39:38 +00:00
Enrico Tröger
6563362688 Update email address of Dormouse Young.
Update of Simplified Chinese translation by Dormouse Young (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2549 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-04 16:58:20 +00:00
Enrico Tröger
e9245af57c Show an error dialog with an appropriate message when a file could not be saved.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2548 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-04 16:45:26 +00:00
Nick Treleaven
f82d979dbd Add filetypes_array to GeanyData for plugins to access a dynamic
array of filetype pointers.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2547 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-01 17:25:18 +00:00
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
fb6a87a05b Refactor get_session_file_string() from
configuration_save_session_files().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2542 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-29 12:00:13 +00:00
Nick Treleaven
7bffaa3b17 Refactor open_session_file() from configuration_open_files().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2541 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-29 11:30:19 +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
Nick Treleaven
676d7ca071 Create new branch from trunk to work on custom filetypes support.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2537 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-28 14:23:19 +00:00