-
-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Open Prinables.com Links and Zip Archives #3823
Conversation
Allows zip file to be drag and dropped or imported via the menu option Based on prusa3d/PrusaSlicer@ce38e57 and current master branch files
Currently this does NOT register with the OS to indicate this ability. It just allows Orca to parse and download when given the same link that would normally be given to PS. Should Orca be registered or should this? I am going back and forth on whether to... |
3mf is automatically opened by Bambu lab. Not sure for .zip, it should not be touched. Also there should be some popup confirmation when you open orca for the first time - do you wanna associate... yes/no |
Sorry. I didn't make it clear. I mean for the web links, not zip files |
You'da man! I thought we have to register Orca to that MIME in the OS, or am I wrong? More thoughts regarding the behavior: I'm thinking we should add a menu item so that user can register OrcaSlicer to that MIME type. What do you think? |
Yes, to inform the os that orca can open |
At the moment you can also manually specify which app to open a link with, which is how I have been testing it |
Windows - yes, but some SW ask you if you wanna use them and associate them with specific extensions... anyway this implementation could be done in future. |
I am looking into it. I have the commit that PS implemented the feature on for reference. At the moment, the trouble is that Orca inherits a downloader feature from BBL which is very different from the PS implementation. So I don't know if I should use PS implementation or keep with the BBL implementation and hack together a solution. @SoftFever do you have a preference? |
It depends - maybe some hybrid solution to have an easier life when BS will bring new things on their website or new builds will be synced. I would like to see this in the next nightly ;) |
If I went with the PS implementation, I would implement it in a way that it would only effect PS links. The rest would use the existing method. |
I would opt for this as well. |
doesn't actually control anything yet
@Ocraftyone any progress with this? To make our life easier .) |
Yup. Just took a bit of a break but I am going to implement the rest tonight. |
As-is from PS master
Update to those following: I have been working on this in my off time. I have the PS downloader mostly implemented how I like it. I am working on putting the final touches on the new download url notification and the icons associated with it. I believe that the macOS url registration has been set up and I have located the part that controls the Linux desktop integration. All that remains for url registration is to find the code that adds the link registration to the windows registry and implement link registration on Linux and windows. I would also like to implement a setting that deleted downloaded files after being imported. |
Yeah. This is PS default behavior and how file types are registered in both. I was wanting to look into using the windows settings to handle file type registration. |
Thanks. I'll take a deeper look when I get a chance |
Would be better to register/unregister itself per user request (every time) instead of any kind of implicit register action, not even . Checkbox in main setting is what @Ocraftyone did currently. There are two issues with such behavior:
Hence, we need and should require a very explicit user action to register/unregister the file type. |
@SoftFever This is something I need to address in windows too because it has the same unintuitive behavior. I think if the application thinks it should be registered, it should check the registry if it is indeed the registered application (by comparing the registered application path). if it should be registered but is not, then ask the user for intervention. This wouldn't interfere with updates, because the app would still be in the same place, but if the app is a dev version or a portable version, it wont automatically register. |
@Ocraftyone I kindly ask you to create some common interface for this functionality, so I can start implementing macOS part independently. Something like described here #3823 (comment) It seems like we are blocked here, but I don't clearly see why 😄 |
Hmm, I still think the right behaviour is |
@SoftFever Currently, Orca and PS forcibly set themselves as the handlers for the various file types on Windows. Instead, we can register the application with windows and specify the different file types it can handle. Windows will then show the application in the file associations section of the settings panel. We could then provide a link to the associations page for Orca in preferences. This would leave orca itself out of the registration process, preventing some of the messy issues it currently creates, removes the outdated registration code, and we no longer need to check if we are indeed the default application. All of that is handled by Windows. There are a few downsides to this idea. 1) Below Windows 10 won't work (but they aren't supported any more by Microsoft) and 2) portable instances of Orca won't be able to be registered (the registry steps would be handled by the CPack installer) During creating this PR, I had considered making that change a part of it, but I believe it would be a bit out of scope. My suggestion would be to leave the windows portion alone in this PR since it follows the current association standard, then in a later PR, update to a more modern implementation. Here is the inspiration for the change. Nanazip (a 7zip fork focused on a modern Windows GUI implementation) uses the idea stated above. |
…pen-ps-links # Conflicts: # src/slic3r/GUI/MainFrame.cpp
I believe the reason we are blocked is because until now only Windows has had dynamic registration functionality. On linux and macos, it was registered at install and not touched again. That, and how windows does its registration is very hacky. It just sets it every time an instance of orca starts. We need to determine if/how we should update windows to match the new macOS functionality. In the mean time, I am happy to point you to where registration is currently done in windows if you want to do a dirty implementation that we can refactor later. |
I'm fine with focusing only on Windows for this PR. I will create another PR to modify the behavior. It's very important that if we are modifying system settings, especially those of other software types, it must be initiated by the user's explicit and direct action. |
I don't quite understand this statement. Are you wanting to include the above mentioned changes in this PR or are you wanting to create a different PR that addresses the windows issues and merge that first?
Understood. I definitely think the current behavior is not ideal at all. I am surprised it hasn't been handled by the PS team yet with it being this hacky. |
Oh, I meant I will create another PR based on your PR. Once that's ready, I will merge your PR first, then that PR.
👍 |
Are you planning on going with a register button or one that goes to windows settings? |
I'm leaning towards a button |
|
@SoftFever any progress on the other PR? |
@Ocraftyone do you mind I push changes into this PR directly? |
Go for it! |
Seems I can't push changes into your branches anymore. |
Do you want to submit as a PR to my branch and I can merge it? |
Thank you! |
@Ocraftyone let me know if you find any issue with the changes there |
Allows Orca to use the "Open in PrusaSlicer" buttons on Printables.com.
Also implements zip archive support since this is needed to download entire projects from Prinatbles.