Nick Treleaven
5e4c8e0ade
Update dox for document_compare_by_display_name() with warning
...
about parameter addresses.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5718 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-13 12:16:02 +00:00
Enrico Tröger
211a963773
Rename document_sort_by_display_name() into document_compare_by_display_name(), thanks again Nick.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5714 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-12 17:20:59 +00:00
Enrico Tröger
cb66df3d76
Fix wrong casting of array pointers, thanks Nick.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5713 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-12 17:17:54 +00:00
Colomban Wendling
a788a38240
Revert "Don't update parent WorkObjects when updating one in real-time"
...
This reverts commit 877cc1d97acd185cc7e0e88bb0b014fb74e16072.
This commit broke calltips, we need another fix for it.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5711 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-11 15:54:43 +00:00
Enrico Tröger
66c8b7faee
Add ui_menu_add_document_items_sorted() and document_sort_by_display_name() to the plugin API.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5705 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-10 17:03:41 +00:00
Enrico Tröger
d91810115a
Add and use signal "document-reload" to the plugin API.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5703 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-10 13:53:05 +00:00
Nick Treleaven
39674589f4
Fix sign comparison warnings.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5647 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-29 16:48:37 +00:00
Colomban Wendling
8640d845d0
Don't update parent WorkObjects when updating one in real-time
...
Updating the parent may lead to performance issues if an object have
too many parents since they are updated recursively.
Parent objects are still updated when saving the file.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5642 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-28 20:36:06 +00:00
Colomban Wendling
4c7ad1f113
Add possibility to detect the indentation width from the file content
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5631 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-26 17:25:24 +00:00
Colomban Wendling
5713aa6804
Small code cleanups
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5629 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-26 03:12:38 +00:00
Colomban Wendling
7698bf60a7
Improve usage of G_(UN)?LIKELY()
...
G_(UN)?LIKELY() should be only used on whole conditional expressions,
and only if the branching is very highly predictable, not if it is only
more probable.
These macros should be used with care because a wrong prediction may
be a lot worst than what a good prediction can give.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5625 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 22:00:18 +00:00
Colomban Wendling
4ac3ccbd37
Make Shift-Enter in search dialog and toolbar search entries search backwards
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5621 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 16:51:02 +00:00
Nick Treleaven
d910ebc5ba
Fix compiler warnings:
...
document.c: In function ‘apply_forced_indent_settings’:
document.c:1008: warning: enumeration value ‘GEANY_FILETYPES_NONE’ not handled in switch
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5614 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-22 17:03:04 +00:00
Colomban Wendling
57996805ac
Update forced indent settings when setting the filetype
...
This makes documents created or set to a filetype with forced indent
setting (Makefile, F77) to have the correct setting right away.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5611 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-20 17:50:59 +00:00
Colomban Wendling
f60ead793d
Move document encoding conversion with BOM support to encodings.[ch]
...
Adds the new function encodings_convert_to_utf8_auto(). This makes easy
to convert file data to UTF-8 in a high-level fashion, with BOM support
and everything.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5606 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-18 15:57:02 +00:00
Colomban Wendling
676f8e6d76
Enable in-memory tag parsing
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5556 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:44:22 +00:00
Enrico Tröger
6ac2623208
Update copyright information.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Nick Treleaven
bc837b18a5
Improve error message for document_save_file() if doc->file_name is
...
NULL (reusing existing strings).
Add warning about this in the API docs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5466 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-12-06 18:04:42 +00:00
Nick Treleaven
1f2ef01d31
Warn about file truncation if unsafe file saving fails.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5455 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-12-01 13:06:01 +00:00
Nick Treleaven
3a3d8815a3
Add gio_unsafe_save_backup hidden pref (patch by Lex Trotman,
...
thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5430 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-23 16:23:22 +00:00
Nick Treleaven
80799825bd
Display better error messages when saving a document fails (patch by
...
Dimitar Zhekov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5396 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-11 13:13:37 +00:00
Nick Treleaven
6cfea4b550
Set errno to 0 before doing disk I/O to prevent confusing error
...
messages on save failure.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5395 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-10 18:19:20 +00:00
Nick Treleaven
1355795908
Fix not reporting an error message when saving a document fails.
...
Check result of fclose().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5391 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-10 13:44:10 +00:00
Nick Treleaven
9aa94483b6
Use LF line endings for templates internally instead of default
...
pref because the default can change. This fixes missing line
endings sometimes when changing default setting.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5390 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-10 13:13:28 +00:00
Enrico Tröger
3ad555d003
Fix build with GTK 2.12: explicitly include gio.h if GIO is available and to be used regardless of the USE_GIO_FILEMON flag.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5372 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-07 13:48:10 +00:00
Nick Treleaven
9542675549
Add debug message when using g_file_set_contents() to save documents.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5371 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-07 13:13:05 +00:00
Nick Treleaven
4db93b90d7
Make use_safe_file_saving hidden pref apply even when GIO is
...
available, because g_file_replace_contents() doesn't handle disk
space exhaustion.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5370 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-07 13:08:13 +00:00
Nick Treleaven
e495ce83a0
Fix resource leak when saving files with GIO (patch by Colomban
...
Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5367 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-04 18:07:44 +00:00
Nick Treleaven
f346f985df
Add filetypes_get_display_name() to get translations for filetype
...
None.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5366 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-04 18:06:09 +00:00
Nick Treleaven
47fe273033
Use g_file_replace_contents() if available to save documents - this
...
should help workaround bugs in GVFS.
Needs testing.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5361 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-02 17:42:54 +00:00
Nick Treleaven
3455a25cf4
Show mimetype icon in sidebar Documents list (patch by Colomban
...
Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5330 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-26 17:20:48 +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
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