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
Add Desktop directory to file dialogs #4632
Conversation
Thanks for this, but can you add it for Windows and macOS as well? We keep feature parity between all the systems (and file dialog is only shown on desktop) |
I'm afraid I don't see what is missing. I had grepped for the term "Videos" as a guidance for my change and found no other relevant places like this. The I had tried my change on Linux and on Windows and the "Desktop" favorite was available on both. |
I see that the locations are looked up, good point. |
You're right, I didn't assign an icon. The most common symbol for the desktop seems to be a monitor and I couldn't find that in the |
If you find one that works use it, if not you can add a new one :). |
I couldn't find a suitable icon, so I added one (well, actually two). After some research it seemed to me, that (at least some of) the existing symbols where taken from Polymer (source I found during research). Since Polymer allows use under BSD style licenses and fyne uses a BSD style license, I saw no problem in copying the icons. Polymer had actually defined two separate icons for the desktop: desktop-mac and desktop-windows. I kept this decision and added the two icons to fyne.
I have speculated, that this change will be released with fyne 2.5 and added according "Since" comments to |
Nice improvement thanks. But is having two different icons for desktops needed? I'm in 2 minds and curious about @Jacalz, @dweymouth or @Bluebugs thoughts |
I think the can just have the Windows one and call it just "Desktop". The difference is not significant enough to warrant two icons in my opinion |
No complaints from me. I have unified the icons. |
Please don't force push a PR that is going through reviews - in general we prefer to keep history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the tests are failing. Would you mind having a look at that?
I also think you need to update the test
package lookup functions for the renderer markup output.
I took a closer look and found that 3 fails are due to timeouts and one is unhappy about the use of Am I missing something? I'm afraid I'm not very experienced with interpreting the errors... |
Please don't request a re-review without committing changes. I still have outstanding comments requests from my latest review and I haven't had time to answer your comment yet. About the tests, yes there are unfortunately a few spurious failing tests on develop. However, all tests should not be failing as they are here. I haven't had time to look into it any further. As noted in my previous review, there is also the case about needing to update the test package to know about the new icon. |
The test failures may not be your fault but I haven't seen them all fail like this. It is strange. Will try to look at it when I can. |
It looks like a deadlock in theme lookup code - my guess would be that the test themes are not bringing along the required features that have been added. |
I'm afraid I cannot reproduce the problem locally. I only get a test failure in the |
I cannot replicate but also cannot seem to kick the CI to try again (not sure why but these workflows seem frozen?). |
Rebase on latest develop might fix things maybe? |
I have performed the suggested rebase and the tests don't fail anymore. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks better now. You just need to teach the test package about this new icon. See
Line 413 in d8e9fe0
func knownResource(rsc fyne.Resource) string { |
I have added the requested entry in the |
The test package runs the apps when in unit test mode. Without it code that used that icon would not function correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review. Thanks for the contribution.
Thanks for your thorough reviews! |
I believe that the "Desktop" directory is heavily used by many users. Thus I think it would be convenient, if it appeared in the favorites of file dialogs.
The changes are basically pure Cargo cult, but seem sensible to me and seem to work. Please correct me, if I've forgotten something.
I have not assigned an icon to this entry in the file dialogs, since the most common symbol seems to be a monitor and I couldn't find such a symbol in the
theme
package.