5298 Commits

Author SHA1 Message Date
Enrico Tröger
2d9f97debd Post release version bump
Say hello to Geany 1.32 "Bemos"!
2017-07-16 15:29:55 +02:00
Vasiliy Faronov
4f1b2a0313 Fix converting color to hex for insertion
Fixes #1527.

In win32_show_color_dialog, utils_scale_round is not necessary at all
because Get{R,G,B}Value [1] already return 0..255, which we can immediately
render as hex.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/dd144923.aspx
2017-07-08 18:46:01 +03:00
Samsul Ma'arif
1305b43a98 Update Indonesian translation (#1501)
Signed-off-by: Samsul Ma'arif <hay@samsul.web.id>
2017-05-25 10:20:15 +02:00
Dimitar Toshkov Zhekov
1a19b39721 Read stdout/stderr in a loop when using timeout callbacks
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).
2017-04-26 21:32:00 +03:00
Dimitar Toshkov Zhekov
673a714645 Fix the maximum number of G_IO_IN-s without any data
They should have been 200, not 3.
2017-04-16 18:06:55 +03:00
Jiří Techet
2707006286 Fix crash when plugin_set_key_group() is called several times by plugins (#1426)
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.
2017-04-15 20:48:03 +10:00
Nick Treleaven
5539c3f908 Update status bar after clicking detect indent type menu item 2017-04-12 09:05:56 +01:00
Dimitar Toshkov Zhekov
ce284096a9 Handle continuous G_IO_IN-s without any data
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.
2017-04-07 20:12:17 +03:00
Robert Antoni Buj Gelonch
d34ebce039 Update Catalan translators (#1440) 2017-03-22 11:18:16 +01:00
Colomban Wendling
3303bde758 Post release version bump
Say hello to Geany 1.31 "Trevin"!
2017-03-05 16:17:03 +01:00
Enrico Tröger
fc6f3ffebe Update copyright years 2017-03-05 13:27:15 +01:00
elextr
cc7f7f7164 Merge pull request #1406 from kugel-/for-upstream
api: new function geany_api_version for dynamic languages checking API version at runtime
2017-03-03 21:00:27 +10:00
Colomban Wendling
b7900b3f05 Merge pull request #1399 from techee/osx_start
Avoid gdk_display_get_name() on OS X
2017-02-27 18:09:59 +01:00
Colomban Wendling
3b105ec827 Merge pull request #1404 from b4n/search/gtk-3-20-history
Fix search history filling on GTK >= 3.20
2017-02-27 14:18:50 +01:00
Thomas Martitz
7b091809db api: new function geany_api_version
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.
2017-02-24 16:24:16 +01:00
Colomban Wendling
9a230e1f45 Fix search history filling on GTK >= 3.20
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
2017-02-21 23:23:49 +01:00
Colomban Wendling
93f273428a Update for new Scintilla styles 2017-02-21 14:16:56 +01:00
Jiří Techet
ed46b65c00 Avoid gdk_display_get_name() on OS X
More in the comment.
2017-02-16 11:45:46 +01:00
Vasiliy Faronov
7347631563 Fix setting menu item labels dynamically
Fixes https://github.com/geany/geany-plugins/issues/462
2017-02-16 01:44:53 +03:00
Colomban Wendling
2c1a71ad2b Use :select/:deselect signals for consistency
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.
2017-02-05 15:34:24 +01:00
Forkest
67d6562f20 Fix cut and copy actions in non-Latin keyboard layouts
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.
2017-02-05 12:52:51 +01:00
Colomban Wendling
d4a35947d3 Fix snippets keybindings not blocking handled events
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.
2017-01-09 14:42:20 +01:00
Thomas Martitz
129389c75b api: rework GeanyProxyProbeResults compat symbols as defines
Constants with different namespace in the same enum confuse g-ir-scanner.
2016-12-28 00:39:35 +01:00
Colomban Wendling
cad224d204 Merge pull request #1280 from b4n/current-scope
Fix the current scope shown in the statusbar
2016-12-22 13:54:16 +01:00
Colomban Wendling
19af3caa73 Fix the current scope shown in the statusbar
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
2016-12-22 13:52:12 +01:00
Colomban Wendling
a0449320b7 Post release version bump
Say hello to Geany 1.30 "Calron"!
2016-11-13 18:03:47 +01:00
Colomban Wendling
5f879126ce Merge pull request #1095 from eht16/issue1076_win32_build_working_dir_locale
Windows: Improve executing external commands on non-ASCII paths,
effectively fixing most known issues.
2016-11-13 16:29:43 +01:00
Enrico Tröger
d61b92f202 Revert "Implement the run helper as a script" on non-Windows
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.
2016-11-13 14:55:43 +01:00
Colomban Wendling
f1f577ea72 spawn: Don't depend on utils.h, and fix locale compat on Windows
utils_get_utf8_from_locale() is actually a no-op on Windows, so use the
GLib conversion directly.  We really mean locale here, not "filename
encoding".
2016-11-13 14:55:42 +01:00
Colomban Wendling
1d5d4e278a Implement the run helper as a script
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.
2016-11-13 14:55:42 +01:00
Colomban Wendling
265e27a7f3 Use a program run helper rather than a script
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.
2016-11-13 14:55:41 +01:00
Colomban Wendling
a45091413a spawn: Use Wide API on Windows
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.
2016-11-13 14:55:40 +01:00
Enrico Tröger
26adcabd69 Windows: Convert generated batch script into system codepage
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.
2016-11-13 14:55:40 +01:00
Enrico Tröger
127e94199b Windows: Convert working directory into locale encoding before spawning commands
The working directory is passed in in UTF-8 encoding but Windows API expects
locale encoding here, so convert it.

Fixes #1076.
2016-11-13 14:55:39 +01:00
Colomban Wendling
743e30ddea Merge pull request #1181 from b4n/vte-2.91
Support for VTE 2.91
2016-11-01 11:10:25 +01:00
Matthew Brush
b7839a6e42 Add "project-before-close" signal to API
Closes #1223.
2016-10-29 16:58:37 +02:00
Colomban Wendling
b0cb8440b1 VTE: Respect GTK setting for whether to show the IM method menu 2016-10-29 16:28:21 +02:00
Colomban Wendling
6cdb1842be VTE: Remove support for background image
It's a more than questionable feature that was dropped in VTE 2.91, so
remove it altogether instead of conditionally supporting it.
2016-10-29 16:12:32 +02:00
Colomban Wendling
16e90968c7 VTE: add VTE 2.91 DSO names 2016-10-29 16:09:04 +02:00
Colomban Wendling
f4b4f2b540 VTE: Don't hard-require vte_terminal_im_append_menuitems()
VTE 2.91 dropped it, and it seems that recent GTK3 doesn't have IM
context menu entries in input field's popups anymore anyway.
2016-10-29 16:09:04 +02:00
Colomban Wendling
65710c526a VTE: Add support for 2.91 GdkRGBA API variant
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.
2016-10-29 16:09:04 +02:00
Colomban Wendling
65e2c7cb05 VTE: don't hard-require vte_terminal_set_word_chars()
VTE 0.38 removed it, so only use it when available.  With >= 0.40,
use vte_terminal_set_word_char_exceptions() instead.
2016-10-29 16:09:04 +02:00
Colomban Wendling
5c757d9ec2 VTE: add debugging info to known which library was actually loaded 2016-10-29 16:09:04 +02:00
Colomban Wendling
079fe58ce9 VTE: add support for vte_terminal_spawn_sync()
VTE 0.38 removed vte_terminal_fork_command() in favor of the new
vte_terminal_spawn_sync(), so add support for this.
2016-10-29 16:09:04 +02:00
Colomban Wendling
f789aa138d VTE: drop support for selecting the emulated terminal
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.
2016-10-29 16:09:04 +02:00
Colomban Wendling
20cb94255b VTE: stop using vte_terminal_set_font_from_string()
vte_terminal_set_font_from_string() has been removed in 0.38, so use
vte_terminal_set_font() instead.
2016-10-29 16:02:32 +02:00
Colomban Wendling
d27831fa30 VTE: use proper accessor for the vertical adjustment
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).
2016-10-29 16:02:32 +02:00
Colomban Wendling
931df75faa Merge pull request #1233 from b4n/proxy/dotted-extension-warning-only
Do not strip dots from proxy plugin extensions
2016-10-29 15:35:21 +02:00
Colomban Wendling
85a2f4bc6f Do not strip dots from proxy plugin extensions
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.
2016-10-29 15:33:21 +02:00
Colomban Wendling
ae114e263c Merge pull request #1185 from b4n/error-indic-color
Allow to configure the error indicator color
2016-10-29 15:15:43 +02:00