Colomban Wendling
98b82550a8
Plug a few possible small memory leaks
2013-12-05 21:39:59 +01:00
Colomban Wendling
ddf67a8586
VTE: properly use the default value for invalid configured colors
2013-12-05 20:18:27 +01:00
Colomban Wendling
4aff511b01
Remove unnecessary allocation for VTE color settings
2013-12-05 20:16:54 +01:00
Colomban Wendling
69f1cc7136
Remove useless rotate_rgb()
2013-12-04 15:49:47 +01:00
Colomban Wendling
4ce6409e89
Remove useless utils_invert_color()
2013-12-04 15:46:05 +01:00
Colomban Wendling
8980970630
Unify color parsing
...
Change utils_parse_color() to use gdk_color_parse() and follow its
syntax, additionally supporting our "0x" prefix as a synonym for the
"#" prefix; and use this everywhere.
Also add utils_color_to_bgr() and utils_parse_color_to_bgr() to provide
conversion to the 24 bits BGR format used by Scintilla.
2013-12-04 15:31:17 +01:00
Colomban Wendling
1590007862
Remove an unnecessary allocation
2013-12-04 14:59:05 +01:00
Colomban Wendling
3522e81d73
Merge branch 'wip/color-parsing-improvements'
2013-12-03 03:09:41 +01:00
Colomban Wendling
f07b5457d6
Simplify fold toggling code using higher-level Scintilla API
2013-12-02 23:19:44 +01:00
Colomban Wendling
3759562d7c
Simplify reading highlighting colors with new utils_parse_color()
...
Drop redundant code converting # and short formats to hex colors now
utils_parse_color() can parse them.
2013-12-02 22:58:54 +01:00
Colomban Wendling
ebde42617a
Accept colors with only 1 digit per channel in utils_parse_color()
...
AKA short HTML color notation.
2013-12-02 22:53:35 +01:00
Colomban Wendling
11a2f0ee91
Properly validate input in utils_parse_color()
2013-12-02 22:44:40 +01:00
Colomban Wendling
507005ca54
Rename utils_strtod() to utils_parse_color()
...
Rename the function to a more sensible name, and remove unnecessary
arguments. Now, format (# or 0x) is auto-detected.
2013-12-02 22:38:11 +01:00
Colomban Wendling
f99e627bb0
Fix folding of the very last line in a level when unfolding children
...
Fix an off-by-one mistake resulting on the very last line of a nested
folded level not to be unfolded when recursively unfolding it's parent.
This was only visible when the last fold point was only one line long,
otherwise unfolding the (N-1)th line was enough.
Closes #1007 .
2013-11-23 00:45:39 +01:00
Colomban Wendling
cff36e7497
R: properly display sources and libraries in the symbol list
2013-11-20 18:41:11 +01:00
Colomban Wendling
1dfc1077c7
Fix crash in fallback mime icon loading code under GTK3
2013-11-18 22:22:57 +01:00
Roland Pallai
b63eb87599
"Enter in replace entry does Replace & Find instead of Replace" setting
...
in General/Misc/Search.
2013-11-14 00:53:40 +01:00
Arthur Rosenstein
660c441b4a
Don't prompt for reload confirmation if keeping edit history
...
No work is lost in that case (except for the redo stack, which is
normal), so the extra confirmation step seems bothersome.
2013-11-10 11:11:37 +02:00
Arthur Rosenstein
322fa65ff5
Maintain undo stack when reloading a document
2013-11-10 11:11:37 +02:00
Arthur Rosenstein
1b338d9d7d
Add UNDO_RELOAD action
2013-11-10 11:11:36 +02:00
Arthur Rosenstein
9a03d32449
Add keep_edit_history_on_reload option
...
When this option is set, the undo stack is maintained when reloading a
document.
2013-11-10 11:11:35 +02:00
Arthur Rosenstein
1b1a1da4ed
Clear redo stack when adding undo action
...
This fixes a bug in Geany where modifying the document does not clear the
redo actions stack.
2013-11-10 11:08:52 +02:00
Colomban Wendling
1f2279aefe
Always use proper functions argument lists
2013-11-10 01:43:10 +01:00
Arthur Rosenstein
0a5378134a
Add document_undo_clear_stack()
...
This function clears a single undo/redo stack.
2013-11-09 15:13:34 +02:00
Colomban Wendling
39fa004619
Fasten utils_tidy_path() a little and fix possible leaks in it
...
Fix possible leaks with bad paths, and also speed up some part of the
function by avoiding unnecessary allocations and string length
computations.
2013-11-07 23:11:15 +01:00
Colomban Wendling
c074817b8b
Fix 2 unlikely memory leaks
2013-11-07 22:57:40 +01:00
Colomban Wendling
1d8dd84a47
Fix some small type issues in printf formats
2013-11-07 21:28:23 +01:00
Colomban Wendling
5c22c9d73e
R has braces
2013-11-04 17:42:05 +01:00
Colomban Wendling
7b2f39a852
Remove an unused variable and plug a theoretical memory leak
2013-11-04 16:05:25 +01:00
Colomban Wendling
b2f4717ad3
Plug a memory leak on Windows
2013-11-03 23:35:55 +01:00
Colomban Wendling
5918532ab2
Explicit a valid cast
2013-11-03 22:31:00 +01:00
Colomban Wendling
cb588a1b82
Plug a possible memory leak
2013-11-03 22:30:55 +01:00
Colomban Wendling
0cb139638f
Plug a memory leak
2013-11-03 22:18:50 +01:00
Colomban Wendling
bc6c345153
Remove an unused variable that could be leaked
2013-11-03 22:18:26 +01:00
Colomban Wendling
47609ec102
Plug a possible memory leak
2013-11-03 01:52:12 +01:00
Colomban Wendling
02852b33b0
Simplify utils_get_hex_from_color() and plug a possible memory leak in it
2013-11-03 01:51:03 +01:00
Colomban Wendling
fd18b7455c
Plug a possible memory leak
...
There is no need to check doc->real_path since the usage is NULL-safe,
and if it actually is empty or NULL it isn't a bug in the caller itself
anyway, and this could leak.
2013-11-02 22:10:32 +01:00
Nick Treleaven
6a19a4488d
Add info on how g_spawn is broken on Windows
2013-10-31 13:54:31 +00:00
Colomban Wendling
b645eccf6e
Do not ignore keys inside inherited groups
...
When inheriting a group in a filetypes file, do not ignore local keys.
This allows for partial overrides of the parent group, like:
[settings=Parent]
key=value
All keys from Parent's group "settings" would be imported, but now the
"key" key wouldn't be ignored anymore and would override a "key" key
from the group copied from Parent if it exists.
2013-10-15 16:17:59 +02:00
Colomban Wendling
01e7fe4b79
Use GIcon for the filetype icon rather than rendered pixbuf
...
This allows to re-use the icon more easily since it's not rendered at
a particular size but simply an icon description. It also allows for
implicit icon updating when the theme changes if the display code
implements it (and GTK widgets does).
2013-10-15 15:56:44 +02:00
Colomban Wendling
d29b5912ff
Read filetype's mime type from the configuration files
...
This allows custom filetypes to define a mime type, hence the icon
displayed for this filetype; as well as moving ones for built-in
filetypes out of the code to the configuration files.
2013-10-15 03:06:01 +02:00
Nick Treleaven
d51079d598
Fix mingw-gcc 'ordered comparison of pointer with integer zero' warning
2013-10-10 12:44:15 +01:00
Colomban Wendling
1ab97fe2e0
Plug a memory leak when reading misnamed tag files
...
Don't leak the file name if we can't determine to which filetype it
belongs. Thanks to Pavel Roschin for spotting this.
Also, remove an useless second function indirection that simply made
the code harder to understand. This will make Matthew happy ;)
2013-09-25 00:00:44 +02:00
Colomban Wendling
e4eacef82b
Plug a memory leak
...
Thanks to Pavel Roschin for spotting it.
2013-09-24 16:23:48 +02:00
Colomban Wendling
af3421e688
Plug a memory leak
...
Do not evaluate a macro argument multiple times if it gets passed an
expression, especially if that expression allocates memory.
Thanks to Pavel Roschin for spotting the leak.
2013-09-23 21:54:30 +02:00
Nick Treleaven
b428042278
Add sci_word_start_position, sci_word_end_position wrappers
2013-09-19 14:15:17 +01:00
Nick Treleaven
6d2f26c494
Don't ignore word matches that vary only by case
...
The user needs to see all case variants, even when they want searching
to be done case-insensitively (which isn't supported yet).
2013-09-19 13:56:48 +01:00
Nick Treleaven
dcfbf22cf2
Don't allocate initial size based on autocompletion_max_entries
...
The user may have set that too high.
2013-09-19 13:56:46 +01:00
Colomban Wendling
4786796e9a
Fix build (oops, sorry)
2013-08-20 11:54:01 +02:00
Colomban Wendling
1fe7b4848e
Fix printing under Windows
...
For some reason the Scintilla widget's Pango context don't have a
resolution set on Windows, so we get an invalid one. Fix this by
correctly peek the resolution from the map if the context doesn't
have one by itself.
https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html#pango-cairo-context-get-resolution
Thanks to Matthew Brush for debugging this!
Closes #961 .
2013-08-20 11:51:45 +02:00