This pull request aims to be a complete support for systems without gvfs-fuse or fuse installed. It supersedes #963 (I'm creating a new pull request because there are some changes to the used approach, not just addressing issues from the original pull request).
The main changes of this pull request compared to #963 are:
1. More fine-grained approach to GIO usage - previously I for instance replaced all g_file_test() usages with GIO (depending on the configuration) but now it's done only for files which can possibly be remote (i.e. not for config files etc.). If not remote, g_file_...() is still used.
2. Got less crazy about USE_GIO_FILE_OPERATIONS Geany configuration and use this one only when opening/closing documents is involved in the IO. This is when things can go wrong when mixing IO methods. But for other things there's no need to maintain both g_file_...() implementation and GIO implementation and only one of them is used (depending on whether the file can be remote).
3. There's no new plugin API - basically I think plugins don't need to know the value of USE_GIO_FILE_OPERATIONS as they aren't involved in opening/closing documents. If a plugin wants to support remote files, it should use GIO. All existing API functions that could possibly involve file IO have been converted to use GIO. It's not completely black and white as some functions are also used by Geany for opening documents so these still test the USE_GIO_FILE_OPERATIONS value. Not having the file IO functions in the API leads to some duplication of code in plugins but it's not that bad and probably better than adding more and more utility functions to the API.
4. It now works not only when gvfs-fuse is uninstalled, but also when fuse is uninstalled. I was still getting the remote location mounted before I uninstalled fuse and discovered more problems on the way. I recommend testing with fuse uninstalled.
5. Some things like file properties of remote files, TM or saveactions support were missing in the previous pull request. Everything should work now.
6. TM works only for parsing edited file's buffers - there's no support for parsing remote files (we'd have to change ctags for this). I think this is OK as loading complete projects over network could take ages and everything would be frozen as we use blocking GIO. For the same reason I don't plan support for remote projects in my projectorganizer plugin. I haven't really checked how other plugins behave but I don't expect big problems. doc->file_name and doc->real_path can now be URI and if plugins do some reasonable error checking, there should be no problem and they should fail gracefully if they don't use GIO. (I haven't checked but IMO plugins shouldn't read/write doc->file_name as this would interfere with the opened buffer in Geany. Most of the checks I've seen were like if (doc->file_name != NULL) {...}).
7. I didn't get too crazy about saveactions plugin GIO support - it now only supports saving backups into a local directory and not to a remote one. I think nobody will really use remote URI as a location for backups - it would be rather impractical and slow. But can easily add this if someone thinks the opposite.
Apart from the minor limitations I mentioned, I'm not aware of anything missing - I believe this pull request ticks all checkboxes from #1145 with the exception of Windows support which I probably won't do myself and which can be done later independently of this pull request.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1414
-- Commit Summary --
* Replace g_file_test() with a GIO variant when needed
* Update utils_get_path_from_uri() to return URI when using GIO
* Keep URIs in utils_tidy_path()
* Use g_file_new_for_uri() when needed
* Don't create separate tagmanager library
* Preserve URIs in tm_get_real_path()
* Allow parsing remote files opened in the editor
* Merge implementations of write_data_to_disk() and utils_write_file()
* Use gtk_file_chooser_get_uri() in file opening/saving dialogs
* Add GIO version of document_rename_file()
* Use GIO in utils_get_file_list_full()
* Add file reading utils function
* Load project config files using the new utility function
* Remove unnecessary utils functions
* Use g_file_set_contents() instead of utils_write_file() for local files
* Use GIO in utils_mkdir()
* Add GIO implementation to utils_is_file_writable()
* Use GIO for filetypes_detect_from_file()
* Eliminate g_path_is_absolute() direct calls
* Use GIO for file properties dialog
* saveactions: Make backups work for remote files
* Document that document file_name and real_path can be URIs
-- File Changes --
M configure.ac (1)
M plugins/export.c (23)
M plugins/filebrowser.c (74)
M plugins/htmlchars.c (2)
M plugins/saveactions.c (108)
M src/Makefile.am (25)
M src/callbacks.c (10)
M src/dialogs.c (78)
M src/document.c (137)
M src/document.h (4)
M src/filetypes.c (31)
M src/keybindings.c (8)
M src/keyfile.c (8)
M src/libmain.c (13)
M src/msgwindow.c (8)
M src/osx.c (2)
M src/project.c (74)
M src/sidebar.c (2)
M src/stash.c (3)
M src/symbols.c (1)
D src/tagmanager/Makefile.am (32)
M src/tagmanager/tm_source_file.c (54)
M src/tagmanager/tm_source_file.h (3)
M src/toolbar.c (2)
M src/ui_utils.c (8)
M src/utils.c (351)
M src/utils.h (24)
M src/win32.c (4)
-- Patch Links --
https://github.com/geany/geany/pull/1414.patchhttps://github.com/geany/geany/pull/1414.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1414
By default, ctags generates scope information using
```
parent_kind:A::B::C
```
where `A::B::C` is the scope of the parent tag. This is a bit problematic when parsing such fields because we have to compare the `parent_kind` value against all valid kinds of the language and if it matches, it means that what follows is the scope. This slows down parsing of such tags and also requires that `parent_kind` is really a valid kind for the given languages.
ctags can also add extra "scope:" prefix to this field when using the sZ field specification option on the command line:
```
scope:parent_kind:A::B::C
```
This way, the scope field can be detected easily by comparing against "scope:" which speeds up parsing. Also, the parsing code doesn't care about the value behind "scope:" so "class" can be used also for languages that don't have the "class" kind.
I haven't regenerated the tag files to avoid a big diff but the result will add "scope:" for every tag's scope field and this should be done separately.
By the way, this could help anyone reviewing #3049 understand what's going on. Parsing scope fields with the `scope:` prefix happens here:
https://github.com/techee/geany/blob/f49b19f3bfe61cf7ae27075f28ec5bd7c570a1…
If scope is not obtained this way, the code tries to go through all the fields which weren't parsed before and check if they start with a kind name of that language. If they do, the field is considered to be scope, see:
https://github.com/techee/geany/blob/f49b19f3bfe61cf7ae27075f28ec5bd7c570a1…
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3592
-- Commit Summary --
* Prefix generated scope field by the "scope:" prefix
-- File Changes --
M scripts/create_tags_helper.py (6)
-- Patch Links --
https://github.com/geany/geany/pull/3592.patchhttps://github.com/geany/geany/pull/3592.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3592
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3592(a)github.com>
This change makes the main window show immediately after launching Geany
so it's immediately visible Geany started. With big files/projects this
gives users better feedback about it's starting than not showing anything
until all the files are ready.
This is a separated patch suggested by @codebrainz in https://github.com/geany/geany/pull/576. It might be a bit risky for Geany 1.27 because plugins might make some assumptions when geany-startup-complete is called so this one might need some more testing. Possible candidate for early 1.28 merge.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/924
-- Commit Summary --
* Open files session files after entering main loop
-- File Changes --
M src/libmain.c (59)
-- Patch Links --
https://github.com/geany/geany/pull/924.patchhttps://github.com/geany/geany/pull/924.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/924
This could be X windows or XFCE related, sorry I have no idea.
geany -V; geany 1.36 (built on 2020-03-22 with GTK 3.24.14, GLib 2.64.1)
OS is Mint 20.3 Una XFCE edition
To reproduce;
- open geany
- type "a" in untitled
- ctrl-n
- press and hold ctrl-tab to switch tabs, release tab key but keep ctrl key held down till popup shows
- click any menu
- release ctrl
- Now popup is stuck as always on top until geany is closed
See attached screen capture for example (you may need to download it first to view)
https://user-images.githubusercontent.com/72730470/200763465-e06bbdc2-bba1-…
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3330
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3330(a)github.com>
Hello everyone,
There is a problem while trying to use the integrated terminal. I have bash as shell. When using 'git push' or 'git pull,' I get an error message:
Bad owner or permissions on /etc/ssh/ssh_config.d/50-redhat.conf
fatal: Could not read from remote repository.
When I use git status it seems to read the remote repository, although I have GitHub return:
On branch main
Your branch is up to date with 'origin/main'.
When in fact it's not 'up to date'
I'm using Fedora Linux 39 Silverblue with Geany 2.0
All permissions are correct in my .ssh folders and the files within that folder. Everything works using external terminal, or other code editors. I prefer to use Geany.
Any suggestions?
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3679
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3679(a)github.com>
Since many distros now distribute the GTK3 version of Geany the nightly builds should also check GTK3.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2003
The real name of the struct in Lua 5.1 is luaL_Reg. Lua 5.1 contains a define for compatibility, but it is not present in LuaJIT or later 5.x releases.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/1231
-- Commit Summary --
* GeanyLua: Use luaL_Reg instead of luaL_reg
-- File Changes --
M geanylua/glspi_app.c (2)
M geanylua/glspi_dlg.c (2)
M geanylua/glspi_doc.c (2)
M geanylua/glspi_init.c (2)
M geanylua/glspi_kfile.c (2)
M geanylua/glspi_run.c (2)
M geanylua/glspi_sci.c (2)
M geanylua/gsdlg_lua.c (2)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/1231.patchhttps://github.com/geany/geany-plugins/pull/1231.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1231
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/pull/1231(a)github.com>
After opening Geany, or after creating a new tab in Geany, the default filetype is `None` and the default extension is null.
It will be quite useful to allow the user to specify a default filetype, or at least a default file extension when saving content in new Geany tabs.
A possible simple implementation would be allow the user to create `filetypes.None.conf` in which they could specify something like:
```
[settings]
# default extension used when saving files
extension=txt
```
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3847
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3847(a)github.com>