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.
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
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.
Now that a new enough GLib is available the signal can be
handled cleanly on the main loop using the GSource for Unix signals.
This replaces the illegal SIGTERM handling that was disabled in
fbb89f523af47b35e238678d348cfa98e56c760a.
Closes#1255
This behavior might be unwanted when changing project settings which
is unrelated to project base path and also fixes filebrowser behavior
with the updated way project-save signal is emitted.
The patch also handles the situation where "realized" is called after
project-save is called and overrides file browser's path (which is
something we don't want).