Since both the file tags and workspace tags are sorted, it is unnecessary
to completely resort the tags for the workspace - instead, remove the
tags belonging to the file from the workspace tags and merge the updated
file's tags into the workspace tags.
The merge is optimized for merging small number of tags into a large array.
For instance, the total number of tags in linux kernel is about 2300000
while the average number of tags per file is about 65 (35000 source files).
Most of the time merge won't be performed so we can avoid expensive
string comparisons and try to make bigger jumps to see if some merge is
needed or not (more details in the source file comments).
In addition, rename all functions, parameters, comments etc. mentioning
work_object and remove unnecessary parameters of various functions.
Delete dead code paths.
Also move common functions like tm_get_real_path() from tm_work_object to
tm_source_file.
Only manually uninstall the files we manually installed, as
uninstall-local might be run in parallel to Automake's own uninstall
targets.
We don't uninstall the directories as some docs seems to suggest
`rmdir` isn't really portable. Anyway, Automake don't uninstall
directories either so it's not a real problem.
An alternative solution would be to keep the recursive removal of
`$(DOCDIR)` but move it to `uninstall-hook`, which is guaranteed to be
run after other uninstall rules. However, recursive deletion is not
always sensible as it might remove files we didn't install, e.g. if the
user added them manually.
On startup, the Geany main window doesn't have a GdkWindow yet
(probably because it is not yet mapped). This causes many
'gdkdrawable-win32.c:2013 drawable is not a pixmap or window'
warnings when resolving shortcuts on Windows.
Since we pass the SLR_NO_UI to the Windows API, we probably
don't need the parent hWnd reference at all.
Updating the workspace is useless as the application will be shut down,
and not doing it can save a lot of time (almost 50% speedup quitting an
instance with all Geany source from `src/` open).
In addition, this patch defines the GEANY_PRIVATE macro for the tag
manager library where it wasn't defined before, removes 2 tag manager
headers from distribution as they are not needed by plugins and
in the tag manager changes the docstrings to ordinary comments for
private definitions.
3e089e4c2c914a4b8885daa65e784a227bd2d6b0 accidentally switched from
`g_get_user_config_dir()` to `g_get_user_data_dir()` as the location
for the user's configuration directory.
Before we used g_get_user_config_dir() but GLib changed the returned
location in newer versions, so use the Windows API directly
to get the old location, at least for now.
Also add utils_get_user_config_dir() wrapper.
Code is based almost completely on a patch from Matthew.