This helps g-ir-scanner recognizing the data parameter as context storage,
allowing object methods to be used as callback (via wrappers). It goes even
so far that g_object_unref is propery passed as destroy func to
keybindings_set_item_full() and plugin_set_key_group_full().
See also https://sourceforge.net/p/ctags/bugs/194/
I didn't use the exact upstream patch only altering the C++ code path,
because as far as I know no c.c language recognize two consecutive
colons separated by whitespace as a single token, so there's no point
in carrying on mistakes from the past.
Both sorting by name and appearance makes sense for most languages. Some
users may prefer sorting by appearance so make it configurable in
preferences (the possibility to override the settings for specific
filetypes is preserved).
Thanks to Colomban Wendling for lots of improvements of this patch.
Fixes#313.
`GDK_space` is not guaranteed to have the value of an ASCII space
(although it does in practice), and using a GDK constant does not make
sense inside a text manipulation function.
Avoid splitting lines right before a whitespace when reflowing (e.g.
in case of several consecutive ones) not to move whitespaces at the
start of the next line, which, while they will be removed later on,
can lead to incorrect reflow width and even fully empty lines.
Prefer leave trailing spaces then, which is less of a problem.
Avoid triggering auto-indentation with consecutive whitespaces when
reflowing, as it can lead to infinite loop if auto-indent leads to
inserting full lines.
Fixes#848.
All of these typos were found by codespell, so credits go the
the authors of this incredibly useful tool.
I manually confirmed and adapted all changes, which includes
reflowing over-long lines or filling up with spaces for alignment.
Some of these typos may need forwarding to their original authors.
codespell reported a lot words where I am unsure; I have not
included those corrections.
Major changes are:
- Some types were accidentally documented, even though they couldn't be
accessed by any exported API functions. Those are removed (especially
from encodings.h).
- Some types were not documented where they should. Documentation is
added for them. Members are not necessarily documented separately if names
are self-explanatory.
- @a XXX refers to parameters of the function, it's inappropriate for
highlighting NULL (change to @c)
- As per consensus, build_info is removed from GeanyData (replaced by
pointer to avoid ABI break; added grep-able abi-todo tag so it doesn't get
forgotten)
encodings.h had a pretty large GEANY_PRIVATE part so it's worthwhile to
separate that into its own header (as per HACKING). What's left is used by the
plugin API.
Simplify and optimize creation of the sorted menus by taking advantage
of the fact they might already be partially sorted, and that we can at
least add one entry to each group in each run.
This goes from 4032 runs to 882, which while definitely not optimal for
adding 126 items, is probably totally good enough and don't warrant
duplicating the encoding array and sort it.
Though, such optimization doesn't matter as it's not what takes time in
this function, which is probably rather the widgets creation.
Rewrite a part of `encodings_init()` to remove duplication and some
hard-coded values.
This gives us the item for UHC back, that was lost when adding CP932 in
9d9f40cd15ad121ff3e3fffd40073706c297f2dd, due to a missing update of
the hard-coded group elements count.
These appear under 64-bit Windows. Only the sciwrappers.c warning is
potentially dangerous. For win32.c, the "handle" provides some useful
information, while "lStdHandle" does not.
This is useful if a plugin registers i.e. GTypes from its
geany_load_module(), i.e. to implement plugin functions as GObject
class methods.
The implementation can be considered a slight hack, but we need the
module to be know already in geany_load_module(), which is called too
early for the normal process to set it.
Closes#719.