Skip to content

Conversation

gave92
Copy link
Member

@gave92 gave92 commented Apr 30, 2024

Use protocol launch for open and save file dialogs. Reason: on Windows Preview command line launch is currently broken. Files Launcher also uses protocol instead of command line.

@0x5bfa could you check if this works for you?

@gave92 gave92 requested a review from 0x5bfa April 30, 2024 19:46
@yaira2 yaira2 changed the title Use protocol launch for open and save file dialogs Code Quality: Use protocol launch for open and save file dialogs May 1, 2024
Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM both for Save and Open, thank you!
I'm working on UI parts for now.

Actually I rolled my Windows back to the latest stable and alias is also working.

@gave92 gave92 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels May 1, 2024
@gave92
Copy link
Member Author

gave92 commented May 1, 2024

Sorry also pushed a small change so that file open/save dialog always spins up a separate Files instance.

@0x5bfa
Copy link
Member

0x5bfa commented May 1, 2024

It seems that those dialogs are opened as Files app process, but they probably should be opened in the host window process, such as Notepad or Edge? Is that possible to open as a child process?

@gave92
Copy link
Member Author

gave92 commented May 1, 2024

Do you mean so it would appear under Notepad in task manager?
image
I'm not sure how Task Manager groups the processes. Maybe with CreateProcess instead of ShellExecute but then I can't use protocol launch.

@0x5bfa
Copy link
Member

0x5bfa commented May 1, 2024

It must be an issue with Windows and after having gone back from Insider to Stable, it just fixed. Maybe that version was malfunctioned. In that case, can we use alias launch as the primary way of launching and use protocol launch as another way of launching in case of failing.

I mean grouped in task bar. It currently opens in Files task bar icon.

@gave92
Copy link
Member Author

gave92 commented May 1, 2024

Aah will try with https://stackoverflow.com/questions/13924264/grouping-separate-processes-in-the-windows-taskbar

@gave92
Copy link
Member Author

gave92 commented May 1, 2024

OK it sort of works but it has issues. It definitely needs more testing, could this be done in a separate PR?

@0x5bfa
Copy link
Member

0x5bfa commented May 1, 2024

Wow, it's amazing!

I believe yes!

@yaira2 yaira2 merged commit 24a7c17 into files-community:main May 1, 2024
@gave92 gave92 deleted the opensave_protocol branch May 1, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants