Closed HebaruSan closed 1 month ago
I need to test this in Windows before merging.
Hi @gsf600y, there's a ckan.exe
test build under the Artifacts dropdown here, if you'd like to take these changes for a spin:
Thanks @HebaruSan ! Downloaded, tested, and appears to be working perfectly!
One question - what's the different to selecting "Revert back to old folder" and hitting the Cancel button?
Cool, thanks for taking a look!
One question - what's the different to selecting "Revert back to old folder" and hitting the Cancel button?
They're the same. I added "Revert back to old folder" because I felt it would not necessarily be clear what the Cancel button did, and this makes it an explicit, visible option.
Ah I see, understood! I first thought "Revert" might flip back to the previous folder I was using, having stored that folder name somewhere. That's how I read "Revert" anyway, rather than "cancel" which I understand to be "don't do anything, get me out of this menu".
Background
The core issue was that the settings dialog primarily uses a live-editing paradigm (check a checkbox and the setting is updated instantly), but the cache path needs an edit/cancel/accept paradigm where the user explicitly chooses to validate and commit the input when it's ready and can address any errors or further choices at that time.
Motivation / Initial Problems
Users want a file migration option.
Some related issues were also reported:
Causes
NetModuleCache
wasn't handling mods with multiple download URLs correctly; one failed purge was treated as the mod not being cached at all when one of the other URLs might still be cachedProblems
While working on the above, a few small things came up:
Causes
shortcuts.vdf
file itself can be corruptedToolTip.SetToolTip
call was hard-coded inSettingsDialog.Designer.cs
and so got missed when looking for stringsChanges
-- Default
string as{0} (DEFAULT)
, resizability with a minimum size, auto-sizing to fit, centering on the parent window, auto-selecting the default option, accepting on double-click, accepting on Enter, and cancelling on EscapeNetModuleCache.MoveFrom
andNetFileCache.MoveFrom
are updated to support anIProgress<int>
object and recursive moving of files in subdirectories (to handle thedownloading
folder)#region
/#endregion
to organize its many groups of functionsstring
toFileInfo
because it's better and because we were using thosestring
s to makeFileInfo
s much of the time anywayCacheChanged
event after it replaces the main cache object, whichMain
uses to re-subscribe to the mod added/purged eventsNetFileCache.Remove
has an overload acccepting a sequence ofUri
s, which attempts to remove all of them and returns true if any was present, andNetModuleCache.Purge
uses this to purge a modNetModuleCache.Purge
has an overload accepting a sequence ofCkanModules
, which attempts to remove all of them and only raises theModPurged
event onceshortcuts.vdf
filesAnchor
property hasTop
removed andBottom
added, so it'll move up and down as its container resizes, and the container is initialized to the same height as the first search box, which will keep the button alignedGUIUser.RaiseSelectionDialog
no longer uses a reference inMain.selectionDialog
because this makes the dialog crash when the settings dialog tries to use itFixes #4086.