With single reads, the input processing is limited to
(1/0.050 * DEFAULT_IO_LENGTH) KB/sec, which is pretty low.
Moved the check whether the maximum empty G_IO_IN-s are reached to a
macro, SPAWN_CHANNEL_GIO_WATCH(sc).
When plugin calls plugin_set_key_group() several times for the same
group (when creating keybindings dynamically and needs to reset them),
it crashes with the current code the second time it gets called.
The reason is that group->plugin_keys is an array into which entries of
group->key_items point and when calling
g_ptr_array_set_size(group->key_items, 0);
it calls free_key_binding() for every item - when these items are
deallocated by g_free(group->plugin_keys) previously, calls of
free_key_binding() reference an invalid memory.
Just first resizing group->key_items (and calling free_key_binding() for
its items) and freeing group->plugin_keys afterwards fixes the problem.
Some versions of GLib under Linux continuously generate G_IO_IN-s
without any data to read when using recusrive channel watch sources,
causing 100% CPU load. This patch detects such a situation, and
automatically switches the affected source from channel watch to
50ms timeout.
This allows plugins to detect the API version of Geany at runtime. This enables
soft dependencies based on Geany's API version, perhaps using a new feature
with a fallback for older API versions. Previously the only alternatives
were hard-depending on a more recent Geany version or ignoring new features.
Since GTK 3.19.12, GtkComboBox has an intermediate GtkBox internal
child wrapping the inner GtkEntry. To get the entry,
`gtk_bin_get_child()` still works as it is part of the API, but the
change breaks the assumption we had that it works the other way around,
that `gtk_widget_get_parent(gtk_bin_get_child(combobox)) == combobox`.
So, while this assumption seemed reasonable, stop relying on it as it
is effectively not correct on GTK 3.20 and newer.
See: https://git.gnome.org/browse/gtk+/commit/?id=222c43fc60362eeb97ce2d5e3a5583a69a2e30ef
Instead of having a handler on 2 separate objects, use :select and
:deselect on the same one. Those signals are appropriate, as the
documentation mentions that submenus are popped up on :select.
Mark the associated menu items sensitive when the menu is hidden, so
that GTK's accelerator handling can trigger them. This works around
incorrect handling in Geany's code of keybindings coming from multiple
layouts for cut/copy/delete actions.
Partial workaround for #998, #1286 and #1368.
Fix signature of the snippets keybindings callback, properly blocking
further propagation of handled events thus avoiding possibly activating
another action (like a builtin Scintilla keybinding).
Fixes#1354.
Since the Scintilla C++ lexer started to fold on `()` [1], the code
looking up the current scope is confused whenever the function
signature spans multiple lines. Fix this by skipping fold levels that
correspond to parentheses.
Fixes#1279.
[1] https://sourceforge.net/p/scintilla/feature-requests/1138/
imported in 24f91981c057a7e212c09da66fb974c3ccc85bd6
This restores the previous behavior as it has been on non-Windows
systems before.
Post-1.29 we will merge #1300 which implements run helper script support
for non-Windows systems more sophisticated.
Apparently using arguments instead of putting paths directly in the
script is enough for it to work on Windows, so use a simple script
instead of a program, so it's both shorter and easier to tune.
This removes all encoding issues from passing on a script to cmd.exe on
Windows, as it now uses proper wide character API there.
Not much changes on other OSes, but we don't create temporary scripts
anymore.
Try and use Unicode variants of the Windows process creation API in
order to support filenames (and possibly environment) outside the
locale codepage.
WARNING: Implications on using Unicode environment are unknown.
It might affect the called process, or not, not sure.
Instead of fiddling with the "chcp" command in the generated batch
script on Windows, convert the whole script content into the system
codepage before executing it.
The 2.91 API switched from GdkColor to GdkRGBA, but kept the same
function names, so we need to detect this version and wrap the affected
API to convert our GdkColors to GdkRGBAs.
VTE 0.38 dropped the capability to emulate various terminals to only
support xterm. This shouldn't be so much of a problem for us, as our
setting to select the emulated terminal is hidden since 2008 and
defaults to xterm since forever, and xterm is highly compatible.
Use vte_terminal_get_adjustment() to get the adjustment, and provide an
appropriate default implementation for use if it isn't available (on
VTE < 0.9 or > 0.36).
Only warn when an extension starts with a dot, because it's unlikely to
be what the author wanted, but leave the dot there. This forces the
author to fix the extension instead of ignoring the warning.
Also, include the proxy plugin name in the warning message.
Follow-up to #1212.