Commit Graph

5 Commits

Author SHA1 Message Date
Mustafa Quraish
ecb3f882a3 LibFileSystemAccessClient: Convert request paths to absolute if needed
FileSystemAccessServer requires all paths to be absolute, and will
just crash if this is not the case. Instead of expecting the user to
always provide an absolute path, the client just checks to see if
the path provided was absolute, and if not makes a request with the
absolute path instead.
2021-09-10 20:46:50 +04:30
Mustafa Quraish
2a968e92f0 FileSystemAccessServer: Allow read-only access without prompting
This commit adds a new request to the FileSystemAccessServer
endpoint, allowing the clients to get read-only access to a file
without getting a Dialog-box prompting the user for access.

This is only meant to be used in cases where the user has asked
specifically to open a file through the command-line arguments.
In those cases, I believe it makes sense for the read-only access
to be implicit. Always prompting the user gets a bit annoying,
especially if you just quickly want to open a file through the CLI.

The new request name has been made extremely specific to make sure
that it's only used when appropriate.
2021-09-10 20:46:50 +04:30
Timothy
95ee7069d5 FileSystemAccessServer: Add window title as parameter for opening file 2021-08-07 12:48:22 +02:00
Timothy
215f383b12 LibFileSystemAccessClient: Use WindowServer window stealing interface 2021-07-18 17:21:28 +02:00
Timothy
38594dde79 FileSystemAccessServer+TextEditor: Implement cross-process modal prompts
This transitions from synchronous IPC calls to asynchronous IPC calls
provided through a synchronous interface in LibFileSystemAccessClient
which allows the parent Application to stay responsive.

It achieves this with Promise which is pumping the Application event
loop while waiting for the Dialog to respond with the user's action.

LibFileSystemAccessClient provides a lazy singleton which also ensures
that FileSystemAccessServer is running in the event of a crash.

This also transitions TextEditor into using LibFileSystemAccessClient.
2021-07-18 17:21:28 +02:00