-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
Allow Desktop Shortcut Deletion #2985
Allow Desktop Shortcut Deletion #2985
Conversation
… to an instance of an object.' exceptions
@marticliment - The base functionality for this PR is complete, however it felt odd to me to effectively have a copy paste of very similar code for the storage of the ignored updates and desktop shortcuts databases. I was thinking about maybe modifying both of them to use some sort of arbitrary mass configurator, like a settings system but allowing for more complicated storage; in these cases, dictionaries. This would also be useful for some other feature requests I was thinking about adding (unless you don't want me to; I wouldn't want to be a burden on your repository). I haven't done a whole lot of thinking; I'll do much more if you're OK with me adding it but I'm thinking the rough (very rough!) behavior would be something like an Does that sound like something that would be helpful? If you're not interested I'll mark this PR as ready for review, but if you are I'll work on it here (or I suppose make a new one; up to you). |
Also, when you test this, will you make sure the setting is off by default? I thought it was, but I'm having second thoughts now (but without a clean installation to test it). |
I will be busy this weeks, but I should be able to get this reviewed and merged in a week or two.
Perhaps the Settings class could be extended to load and store dictionaries and/or lists (perhaps with custom type parameters that can be serializable to JSON via
Again, feel free, but before implementation it'd be cool if we could discuss the implementation (a general sketch on how it'd work, etc.). Feel free to use the existing relevant issue, if any, or if not perhaps you can create the empty PR. |
Of course. Take your time :)
GitHub won't let me create an empty draft PR... That's a much better idea, hence why I decided to run it past you first :) My thoughts now would be extending the settings object to support lists and dictionaries as well as just booleans on strings. For lists, maybe
For dictionaries: (where
Although I suppose at the base level all it really needs is Set/Get if you don't want to add that many functions to the Obviously we could just serialize lists and dictionaries into strings for |
The interface you are proposing is amazing. The only thing I would say is that perhaps some methods could be considered redundant (remove(int index), Count(), ...), because while the idea is exposing a list that automatically saves and loads to/from disk, I can't really think of an usecase where you'd need the length without actually having the need to use the entire list. Also, since modifying the returned lists or values does not update the values on the settings, I'd set the return values for lists and dicts to be |
If you don't want a redundant remove item is it better to keep remove by index or remove by value? It's possible my C++ background and it's inability to remove something by value from a list without writing some ridiculous 95 character line is showing through here but I just wasn't sure about only leaving a remove by value method.
That's a good point. Unless you want some sort of Tooltip on the operation history button to say how many there are? But I think that's a stretch.
Yes, that's a good idea. I didn't know about those.
Alright, I'll go work on this when it's not, you know, almost 2am. |
Taking into account the usage the settings will have I would maintain the remove by value, as I don't see as useful remove by index in the usecases settings will be more needed for.
No, it is not a stretch, but I reckon this is the task of the operation history (or whichever class fetches said issue) to fetch the data efficiently and reuse the data read (which at the end it will need to read the entire list) for the tooltips and other info. |
You should be able to pull main with the new complex settings |
This reverts commit ef83ac3.
…sktopShortcutsDatabase
…dd button to access dialog from the settings
I have simplified the ContentDialog and moved some methods to the ShortcutManagerDatabase. |
Everything works fine on my machine, and it all looks good aside from the comments I made. |
Any user suspected of farming GitHub activity with crypto purposes will get banned. Submitting broken code wastes the contributors' time, who have to spend their free time reviewing, fixing, and testing code that does not even compile breaks other features, or does not introduce any useful changes. I appreciate your understanding.
This pull request allows users to have UniGetUI delete shortcuts automatically added to their desktop. This will be off by default, behind a setting, and require explicit user confirmation before UniGetUI deletes anything.
InstallPackageOperation
as well and have a layer setting (marticliment)Closes #2942
Closes #2080
Closes #624
Relates to #2160