8169 Commits

Author SHA1 Message Date
Frank Lanitz
8934d32ab2 Another update of po files as a merge changed some strings 2015-11-01 19:04:21 +01:00
Colomban Wendling
b317da6a0d Merge pull request #701 from zhekov/improve-spawning-errors
Alter spawn to return the error message only in error->message

Closes #541.
2015-11-01 19:01:54 +01:00
Frank Lanitz
fa0a034d97 Update of German translation 2015-11-01 18:58:14 +01:00
Frank Lanitz
7a8140b76a Update po files for string freeze for 1.26 2015-11-01 17:46:28 +01:00
Frank Lanitz
d3ca4299e7 Update of Greek translation 2015-11-01 17:42:28 +01:00
Dimitar Zhekov
6390830953 Fix custom command spawning error message
They are configured in Custom Commands, not Preferences.
Also fix the duplicated g_error_free().
2015-11-01 16:19:40 +02:00
Dimitar Zhekov
a99454f4a0 Clarify the template command spawning message 2015-11-01 16:00:03 +02:00
Dimitar Zhekov
ca76d87cac Fix context action spawning error message
Properly display what configuration should be checked, and show the
entire command line on parsing error.
2015-11-01 15:34:26 +02:00
elextr
f50a1a9fc4 Merge pull request #672 from kugel-/reload-docmsg
document: show informational doc message after first reload

Closes #562
2015-10-31 11:47:43 +10:00
Thomas Martitz
9b458b9fd5 document: Revert 6f5d5db and d6d4728
Now that there is a proper user indication for the "maintain history on
reload" feature we can toggle it on by default. The setting is also renamed
so that the default is effective for everyone (this was the plan).
2015-10-30 15:30:14 +01:00
Thomas Martitz
b1e9c4f3b6 document: show informational doc message after first reload
6f5d5db and d6d4728 disabled "maintain history on reload" by default,
with the intention to reenable it when we have a better method to
make it discoverable for the user. This was necessary since it became
enabled by default but could be surprising given Geany warned about
losing data before.

This commit tries to resolve the discoverability, by providing an
informational doc message that is shown once to the user, after the first
reload. The doc message also gives the option to disable this feature.
2015-10-30 15:23:44 +01:00
Dimitar Zhekov
e44e00afe0 Fix configdir encoding
configdir is initially in locale (glib) encoding. Converting it from
UTF-8 is wrong, and it must be converted _to_ UTF-8 when used in
geany_debug() - otherwise, Help -> Debug Messages fails assertion.
POSIX only, under Windows the glib encoding is also UTF-8.

Closes #658.
2015-10-29 23:37:29 +01:00
Colomban Wendling
4c6bd09b5a Merge pull request #711 from geany/elextr-patch-1
Add ".adoc" extension to asciidoc filetype
2015-10-25 16:37:34 +01:00
Colomban Wendling
4335804d23 Merge branch 'mio/update'
Manually import some upstream MIO changes.
2015-10-25 16:09:21 +01:00
Colomban Wendling
5dea35ada9 Respect Smart Home Key setting in Go To Start of Display Line 2015-10-25 14:05:37 +01:00
Colomban Wendling
326c39f8d5 Add printf attribute to vprintf() functions
This allows GCC to check vprintf() format, and makes
`-Wsuggest-attribute=format` happy.
2015-10-24 20:16:44 +02:00
Colomban Wendling
cbc85b7444 Improve memory backend of mio_read()
Drop the loop in mem_read() in favor of a single memcpy() call.

This greatly improves performances when nmemb > 1, for a small loss
for some values of size when nmemb == 1.  Gain can theoretically be
infinite since swapping nmemb and size parameters changes almost
nothing while it had a dramatic performance impact previously.  Loss
is up to about 25% in the worst case for some values of size when
nmemb is 1.

Also, now the function always copies as much data as possible, not only
whole blocks.  This follows the glibc implementation of fread() and
simplifies the code.  Doing so also fixes the position after a partial
read to be at the last readable character rather than the end of the
last read block.
2015-10-24 20:15:58 +02:00
elextr
06f2cbe6f6 Add ".adoc" extension to asciidoc filetype
Closes #708
2015-10-23 16:34:25 +10:00
Colomban Wendling
7fbe99fd8a Merge pull request #707 from b4n/waf/c99
waf: Check and enable C99 compiler support
2015-10-22 21:53:32 +02:00
Colomban Wendling
1c6b908c9e waf: Check and enable C99 compiler support
Closes #679.
2015-10-22 01:38:15 +02:00
Frank Lanitz
459983ed15 Update of Portuguese translation 2015-10-20 22:42:38 +02:00
Dimitar Zhekov
748f5689cc Unify the spawn callers error messages: custom command 2015-10-20 20:38:37 +03:00
Dimitar Zhekov
d8318b6366 Unify the spawn callers error messages: template replacement command 2015-10-20 20:37:23 +03:00
Dimitar Zhekov
389c0a223d Unify the spawn callers error messages: print command 2015-10-20 20:35:12 +03:00
Dimitar Zhekov
897197ae51 Unify the spawn callers error messages: context action 2015-10-20 20:33:41 +03:00
Dimitar Zhekov
421f8a0ce0 Unify the spawn callers error messages: terminal command 2015-10-20 20:31:37 +03:00
Dimitar Zhekov
e74dc40e11 Unify the spawn callers error messages: grep tool 2015-10-20 20:30:00 +03:00
Dimitar Zhekov
5aa0b02f00 Sync spawn glib/unix and Windows messages
In particular, the exec() and CreateProcess() errors are reported
directly, but failures in other any functions, which are extremely
rare, include some descriptive text, such as "Failed to set pipe
handle to inheritable (Access denied)". The example is artificial.
2015-10-20 20:22:51 +03:00
Dimitar Zhekov
d60a4b789d Alter spawn to cut glib citing of the program name or working dir
Mostly translate the G_SPAWN error codes back to errno, and get the
curresponding g_strerror() message.
2015-10-19 20:43:23 +03:00
Dimitar Zhekov
716c785e34 Alter spawn to return the error message only in error->message
That is, do not cite the original text, program name, or the failed
OS function name (except when the testing program is compiled).
Also cut glib citing of the original text on bad quoting.
2015-10-19 20:00:36 +03:00
Colomban Wendling
9420ec8493 Merge pull request #697 from techee/val_if_fail
Use g_return_val_if_fail() to fix build on OS X
2015-10-19 15:45:28 +02:00
Matthew Brush
d5e484cadb Update manual for changes to view menu/color schemes dialog
Closes #699
2015-10-17 11:00:56 -07:00
Jiří Techet
f9e6ceacee Use g_return_val_if_fail() to fix build on OS X 2015-10-15 20:52:08 +02:00
Colomban Wendling
7215c50277 Merge pull request #646 from b4n/new-cl-files-once
Don't open more than one document for non-existing paths from the CLI
2015-10-13 22:35:16 +02:00
Colomban Wendling
b2879e9fca tagmanager: Fix handling of scopes starting with a non-ASCII character
Fix handling of scopes starting with a non-ASCII character.

Actually, just drop the check on the first byte of the scope, as it
doesn't seem to serve any purpose as it only checks the first byte (so
isn't any kind of real validation; and as it predates Geany it's
impossible to know the real reason behind this check), and breaks
support for non-ASCII scopes.
2015-10-12 19:20:02 +02:00
Colomban Wendling
152103392c Merge pull request #376 from kugel-/keybindings-rework3
Keybindings rework
2015-10-10 13:57:47 +02:00
Dimitar Zhekov
d6e94cf9d4 Use GStatBuf instead of plain struct stat
Especially under Windows, there are 32-bit and 64-bit stat, and
g_[l]stat may use the non-default one.

Closes #677
2015-10-07 17:16:09 -07:00
Colomban Wendling
c6952c7599 Merge pull request #629 from kugel-/pluxy
Add support for plugins acting as proxies for foreign plugins,
promoting foreign plugins to first-class citizen.
2015-10-06 15:53:14 +02:00
Colomban Wendling
d0f94460ea Bump plugin API version for proxy plugins support 2015-10-06 15:43:40 +02:00
Thomas Martitz
6cb443e863 plugins: enforce geany_plugin_register_proxy() can be called once
In the future we might want to enable calling it again to set new supported
plugin types/extensions. This is not implemented yet, but in order to
allow this in the future we have to prevent it now, otherwise we'd
need to break the API.
2015-10-06 15:40:57 +02:00
Thomas Martitz
6dfe5ce942 plugins: use GQueue to restore GLib compatibility
g_ptr_array_insert() is too recent (2.40), but prepending is required. GQueue
is a fine replacement with better old-glib support, at the expense of working
with a doubly-linked list instead of plain array.
2015-10-06 15:40:57 +02:00
Thomas Martitz
7ac89deebd plugins: improve PM dialog for proxy and sub-plugins
Geany now remembers how many plugins depend on a pluxy. It uses this
information to disable the "Active" checkbox in the PM dialog.

Additionally, the PM dialog displays plugins in a hierarchical manner, so that
sub-plugins are shown next to pluxy. This is espcially handy since it makes
the sub-plugin <-> pluxy relationship really obvious, and it's easier to spot
which plugins need to be disabled before the pluxy can be disabled. This allows
to remove code to re-select the plugin because the row (respective to the
hierarchy level) does not change anymore.
2015-10-06 15:40:57 +02:00
Thomas Martitz
bbf8e882c2 demoproxy: add a demo proxy showcasing how to create a proxy plugin
This demo proxy does not actually do anything useful. It simply loads
pseudo-plugins from an ini-style file. The point is that there will be a plugin
in the PM dialog for each ini. Each ini-plugin also causes a menu item to be
generated.
2015-10-06 15:40:34 +02:00
Colomban Wendling
25bd24187b Merge pull request #621 from techee/remote_mtime
Fix the "source file has been modified" issue

Closes #605.
2015-10-06 15:00:11 +02:00
Thomas Martitz
8ac9d56fff plugins: reselect when toggling the current plugin
When enabling/disabling pluxys in the PM dialog the list of available
plugins might change. If plugins before the pluxy go/come then the wrong
plugin becomes selected (the selected row number stays the same). Re-apply
the selection to the current one in the toggle callback to overcome this issue.
2015-10-05 22:11:12 +02:00
Thomas Martitz
6e5ca69e2e plugins: add geany_plugin_register_proxy() to the plugin API
This function finally allows plugins to register themselves as a proxy
for one or more file extensions.

Lots of documentation is added to doc/plugins.dox, please refer to that for more
details.
2015-10-05 22:11:12 +02:00
Thomas Martitz
3ccf959013 plugins: introduce probe() for proxy plugins
When a file extension alone is ambigious as to whether a potential plugin is
really handled then the proxy should use the probe hook to find out. This can
be especially helpful when two pluxies work on the same file extension.

The proxy's probe() should return PROXY_IGNORED or PROXY_MATCHED accordingly.
A special flag value, PROXY_NOLOAD, can be or'ed into PROXY_MATCHED to say
that the file belongs to the proxy, but isn't directly loaded and should not
be handled by any other proxy or geany itself.

Example for PROXY_IGNORED:
geanypy only supports python2 at the moment. So, scripts written
for python3 aren't handled by it and should be skipped for the PM dialog.
Or perhaps they are handled by another proxy that supports python3.

Example for PROXY_NOLOAD:
A pluxy registers for the metadata file extension (.plugin) where author etc
is in. The actual implmentation is in a python script (.py). The .py file
is tied to the .plugin and should not be processed by other pluxies. Thus,
the pluxy also registers for the .py extension but returns
PROXY_MATCHED|PROXY_NOLOAD for it (if it would return only PROXY_MATCHED
the sub-plugin would show up twice in the PM dialog).
2015-10-05 22:11:12 +02:00
Thomas Martitz
e5bb6571c6 plugins: when loading active ones, loop until no more proxy plugins are added
During the loading of the active plugins they are also initialized (done at
startup). As a result, these plugins could be pluxys and make more plugins
available, some of which may be active as well.

Because of this the loop has to be restarted if pluxies become
available to also load active plugins that depend on the pluxy.

The loop is only restarted at the end so only nested pluxys could possibly
cause the loop to be run more than twice.
2015-10-05 22:11:12 +02:00
Thomas Martitz
203644a233 plugins: refactor GtkListStore population code into separate function 2015-10-05 22:11:12 +02:00
Thomas Martitz
bdaab9c837 plugins: generic load_data instead of module pointer in Plugin struct
Being a GModule is actually a detail of standard plugins. Future proxy plugins
might need different handles. Therefore replace the module field with a more
generic pointer and encapsulate the GModule detail further.

This pointer shall be returned from GeanyProxyFuncs::load and is passed back
to GeanyProxyFuncs::unload, and isn't interpreted by Geany.
2015-10-05 22:11:12 +02:00