Cancel 'MSG_TYPE_RESAVE' info bar if still open in function 'document_reload_force'.
This closes the "Deleted from Disk" message if the user clicks on the reload button.
Fixes#1330.
utils_get_uri_file_prefix() gives "file:///" for Windows and
"file://" for all other platforms. So we don't need "g_path_skip_root()"
any longer.
Using "g_path_skip_root()" removed the drive letter from the URI which
worked only as long as the file to be opened was on drive C: (or
whatever drive Windows considers as the default). But since local file
URIs including the drive letter are supported on Windows, we should use
it, so opening files on other drives works as well.
Fixes#1018.
On Windows, we need "file:///" for local file URIs while on all other
platforms the prefix is "file://" for absolute filenames.
The utility function saves us from replicating the platform
specific logic.
Add the same note about applying indentation settings on currently open
documents in the project preferences as there already is in the main
preferences dialog.
gtk_accelerator_get_default_mod_mask() behaves differently on OS X under
GTK 3 when compared to GTK 2. On GTK 2 it used to clear the GDK_MOD2_MASK
bit while on GTK 3 it's preserved. We need to clear it ourselves
otherwise e.g. <Command>S leads to <Commands><Mod2>S and none of the
keybindings work under GTK 3.
* Try non-symlinked VTE libraries on macOS before the symlinked ones
Plugins using VTE such as multiterm or debugger are linked against the
non-symlinked version of the library like libvte.9.dylib and not
libvte.dylib. When a bundle is created, all symlinks are replaced by
a copy of the symlinked file. This means there are both libvte.dylib
and libvte.9.dylib in the bundle both containing the same code. When
Geany loads libvte.dylib and plugins load libvte.9.dylib the same code
gets loaded twice and when the same type gets registered by GTK, it fails
and the whole application freezes.
This problem doesn't exist on linux or when running from the command line
on macOS because the operating system detects it's the same library
because of the symlink and it's loaded only once.
Loading the same library as the one used by plugins fixes the issue with
macOS bundle. The original symlinked name is still used as a fallback.
The patch also adds #ifdef __APPLE__ around the Apple-specific library
names which also prevents unnecessary retries on other platforms. Loading
*.so libraries is still kept as a fallback on Apple as these are legal too
and could in theory be used on OS X as well.
* Try loading newer VTE versions before older ones on GTK 2
Fix the symbols tree hierarchy by considering the whole scope when
adding a tag, avoiding choosing the wrong parent when several tags have
the same name. Until now, to avoid such misbehavior we only used to
choose the parent candidate that appeared last (line-wise) before the
child. It works in most typical situations as generally tag names are
fairly unique, and children appear right after their parent.
However, there are cases that are trickier and cannot be handled that
way. In the following valid C++ snippet, it is impossible to know
whether `function` should be listed under the namespace `A` or the
class `A` without looking at its full scope:
```C++
namespace A {
namespace B {
class A {
void method() {}
};
};
void function() {}
};
```
And it is a real-world problem for some parsers like the JSON parser
that generates numeric indices for array elements name, often leading
to several possibly close duplicates.
Additionally, to prevent trying to set a tag as its own parent, the
code guarded against accepting a parent if the child had the same name,
lading to incorrect hierarchy for `method` in cases like this:
```C++
namespace A {
class A {
void method() {}
};
};
```
So to fix this, consider the whole hierarchy of a tag for choosing its
parent, when that information is available from the parser.
Fixes#1583.
This will allow the compiler to notify any callers that it's deprecated.
The macro is guarded-out for when Geany is compiling so it won't cause
warnings when tagmanager uses it internally and for the utils_ wrapper.