620 Commits

Author SHA1 Message Date
Nick Treleaven
c25d9856fe Add 'Ensure consistent line endings' file saving pref (patch by
Manuel Bua, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5321 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-25 16:24:55 +00:00
Nick Treleaven
6738d3bc1e Use secondary text for 'file not found on disk' dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5298 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-15 17:24:13 +00:00
Nick Treleaven
59690a1617 Avoid delay and redrawing when automatically opening a new document
after closing one.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5265 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-30 14:49:54 +00:00
Nick Treleaven
d8dce113a2 Add symbol_list_sort_mode per-filetype setting, set to sort by line
number by default for Markdown, reStructuredText and Txt2Tags.
Add utils_get_setting() macro for reading a key from a home or
system keyfile.
Move GeanyFiletypePrivate to filetypesprivate.h.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5262 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-30 13:50:33 +00:00
Nick Treleaven
3fe15d0ebb Add hidden pref new_document_after_close for whether to open a new
document automatically, off by default.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5257 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-23 16:24:43 +00:00
Nick Treleaven
90dc51914d Fix segfault on idle callback when quitting.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5254 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-23 14:20:29 +00:00
Nick Treleaven
9c71adb4bd Open a new document automatically after closing all documents.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5244 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-20 12:19:26 +00:00
Nick Treleaven
e664c8344f Allow per-document indent width setting (patch by Jiří Techet,
updated by Erik de Castro Lopo - thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5228 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-14 15:01:29 +00:00
Nick Treleaven
71a63eec9b Show Save As when saving if the document filename doesn't have an
absolute path, so command-line new files can be saved without a
prompt, but file templates still prompt the user.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5222 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-09 17:31:27 +00:00
Nick Treleaven
8e54555bea Add Close button to the detected file changed dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5206 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-08 14:56:27 +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
9fec7e064e Fix Undo/Redo button state after the last document has been closed.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4940 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-22 19:38:49 +00:00
Enrico Tröger
48064120f8 Small improvements to speed up quit process with many open documents.
Avoid calling gtk_notebook_remove_page() on exit as it takes a lot of time.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4921 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-16 17:43:24 +00:00
Nick Treleaven
e2c321b2e2 Only replace template filename matching start of word on saving.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4901 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-11 12:10:31 +00:00
Nick Treleaven
bf09ed5c48 Fix replacing {filename} template wildcard for custom file
templates with non-default file extension.
Add search_find_text() for POSIX regex searches.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4873 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-05 12:50:59 +00:00
Nick Treleaven
f38b468348 Add function document_apply_indent_settings() for use later.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4872 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-05 12:07:45 +00:00
Enrico Tröger
4d34795c94 Declare document_stop_file_monitoring() as static.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4858 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:42:33 +00:00
Nick Treleaven
5bbd6a30d7 Fix wrong selection range after Replace in Selection.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4784 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-25 13:43:37 +00:00
Nick Treleaven
a190e1bfb7 Use 3rd person for more API dox.
Change 'This is a wrapper function for...' to 'Wraps...' in brief
descriptions.
Change 'After all...' to 'Afterwards...'.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4760 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-15 13:01:16 +00:00
Nick Treleaven
138cbaa02f Use 3rd person (gets not get) for API function brief descriptions.
Avoid using 'convenience function' in API brief descriptions.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4757 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-12 18:15:48 +00:00
Nick Treleaven
aaa1e9657a Merge gnu-regex branch:
Use POSIX system/GNU regex engine for find & replace 'Use regular
expressions' option. This alters regex syntax a bit - see the docs
for details; we now support '?' operator and replacement backslash
escaping is more standard.
Make regex search imply replacing escaped chars.
Allow \0 backreference replacement for the whole match.
Note: Replace All may be slower; if this is a problem please let me
know.
- code:
Add argument to utils_str_replace_escape() for keeping
uninterpreted backslash escapes e.g. '\\', '\e'.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4746 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-09 16:56:04 +00:00
Nick Treleaven
17ad8ba1b8 Move search_replace_range() to search.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/gnu-regex@4740 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-08 13:28:04 +00:00
Nick Treleaven
361b128d81 Refactor document_replace_range() with search_replace_range().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/gnu-regex@4739 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-08 13:23:32 +00:00
Enrico Tröger
0865b45ed9 Fix broken 'Save' action in 'Resave missing file' dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4728 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-07 15:41:25 +00:00
Enrico Tröger
25ec844cfa Fix duplicate mnemonics on 'resave missing file' dialog, also move the question from the secondary to the main text to be more compatible with the Gnome HIG.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4727 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-07 15:32:34 +00:00
Nick Treleaven
f96c3d1a00 Move new regex code to search.c: search_find_next(),
search_replace_target().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/gnu-regex@4720 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-02 13:21:41 +00:00
Nick Treleaven
3927eb059b Fix not replacing escapes within a backreference match.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/gnu-regex@4718 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-01 18:28:57 +00:00
Nick Treleaven
e669410ad1 Fix regex search for '\\'.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/gnu-regex@4717 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-01 18:16:28 +00:00
Enrico Tröger
995a467901 Fix document_try_focus() to make it work with the sidebar document list as well.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4712 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-28 14:32:38 +00:00
Nick Treleaven
6c1a52d58c Implement regex backreference replacement for \0 (whole match) and
groups \1 to \9.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/gnu-regex@4706 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-26 16:08:34 +00:00
Nick Treleaven
d4dd143357 Implement single POSIX regex replacement - escape replacements are
done with utils_str_replace_escape().
Warning: regex backreference replacement is still to do.
Make utils_str_replace_escape() accept unnecessary escapes (e.g.
'\e' goes to 'e').



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/gnu-regex@4705 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-25 18:30:43 +00:00
Nick Treleaven
463100341f Make Find dialog Next button use GNU/system regex instead of
Scintilla engine.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/gnu-regex@4704 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-24 15:27:12 +00:00
Enrico Tröger
3bcaedd28f Allow saving remote files using g_file_set_contents() as well (patch by Алексей Антипов, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4641 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-06 16:00:11 +00:00
Nick Treleaven
cfa2b8b532 Show 'Replaced X matches in Y documents' message when using Replace in
Session.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4533 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-18 17:05:13 +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
Enrico Tröger
554ccd4f60 Mark the document only as changed if it is not closed afterwards.
Prevent possible segfaults if the document was closed when it is missing from the filesystem.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4501 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 20:29:45 +00:00
Enrico Tröger
16f67dc702 When closing a document after it was deleted from the filesystem, don't ask whether it should be saved first.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4498 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 15:50:53 +00:00
Enrico Tröger
0be8ea8b8c Make dialogs_show_prompt() more flexible to take up to three button/response code pairs to be shown.
Add a close button to the dialog when asking to Re-Save a deleted file (closes #2916954, based on a patch by Dominik Stadler, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4495 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 15:37:40 +00:00
Enrico Tröger
d91e7b762b Add document_need_save_as().
Show the Save As also for documents created from filetype templates instead of saving them directly with the untitled filename.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4494 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 15:36:52 +00:00
Nick Treleaven
cf540a712f Deprecate documents_foreach() as it looks more like a function; use
foreach_document() instead.
Generate dox even for GEANY_DISABLE_DEPRECATED declarations.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4399 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-04 15:28:38 +00:00
Nick Treleaven
de6d967182 Improve 'Detect from file' indentation pref by ignoring lines with
indentation wider than 24 characters as this is more likely to be
alignment than indentation.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4371 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-26 18:13:50 +00:00
Nick Treleaven
d17141ca9a Support loading global tags files for custom filetypes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4343 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-20 12:07:12 +00:00
Nick Treleaven
68657d327b Add filetype "tag_parser" key so custom filetypes can use an existing
tag parser.
Add tm_source_file_get_named_lang().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4339 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-19 14:24:40 +00:00
Nick Treleaven
120af21ccb Call editor_apply_update_prefs() from editor_create_widget() so
correct tab width and other settings are applied for Split Window
plugin.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4323 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-15 17:55:30 +00:00
Nick Treleaven
0b8c46a8a8 Add highlighting_set_styles() to API, use for Split Window plugin so
filetypes.common settings get set too.
Make highlighting_set_styles() take GeanyFiletype pointer instead of
filetype id.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4322 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-15 16:54:15 +00:00
Nick Treleaven
539f8b3068 Add document_get_notebook_page() to API.
Minor edits of dox.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4311 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-14 12:21:18 +00:00
Enrico Tröger
541d7689ff Apply set default encoding for existing files only if the files are non-Unicode (patch by Alexey Antipov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4294 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-11 10:51:12 +00:00
Nick Treleaven
caec1ec7c3 Rename treeviews.[hc] -> sidebar.[hc].
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4252 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-28 11:16:59 +00:00
Nick Treleaven
a60a63cc39 Fix showing the document before reload dialog when opening an
already-open file.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4232 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-24 16:19:27 +00:00
Enrico Tröger
ae11cb9b1a When reloading files, use the previously set encoding instead of detecting it again (closes #2862041).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4223 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-21 20:48:50 +00:00