-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Implementation of clone and fake in GUI #2665
Conversation
Use RaiseMessage instead of RaiseProgress Call UpdateInstancesList() at the end of the clone/fake tasks to update the listt in the instance selection dialog
So have it now as a suboption of the KSP selection dialog, see the screenshot in the PR message. One more thing: I now pass the current |
I get this when I click Select Known Instance:
I think it's because |
Let's set the menu's renderer in Mono so it'll look nice with dark themes: Lines 28 to 31 in c49489b
|
I think this is a different problem, happens if I click Select Known Instance when the select instance window appears at startup (so before the main form has displayed):
Presumably |
Yep, get it too. The call stack:
This part:
There Edit: well, you got it too in your comment, didn't see the edit before I typed mine. |
Yeah, actually I completely forgot to process direct textbox inputs. It does nothing whether the path is valid or not. |
Calling |
Fix `NullReferenceException` for broken KSP installs Fix `NullReferenceException` if you open the dialog at startup Set the dropdown menu renderer in mono Consider manual path textbox entries for clone and validate them Better handle the tasks, don't close window before they finished, but show progress bar
This should solve all the issues @HebaruSan reported yet. I moved I close the dialog window out of the tasks, so I need to invoke the |
There's still something fishy with the validation and/or threading. If I open the dialog and click OK it says to fill in the new name and path, and then if I click OK again after doing that I get a very hard crash.
|
Hmm, I cannot recreate this crash.
|
Yes, that's what I remember doing. ... Confirmed with another attempt, I just repeated it. |
I redid the task code a bit: |
It was a mono window size problem again... |
Created DasSkelett#2 with my UI suggestions. |
If we're adding all this functionality, we should rename the "Select KSP Instance" dialog and menu item to "Manage KSP Instances" |
I see that the error message is also wrong, IOException is not the right one to throw for invalid destination paths. I think I'll create a new Kraken for that. For your first issue: This makes me think if it even makes sense to copy hidden files and folders too when cloning KSP instances. Probably not, but I would like to hear your opinions first before I change |
Not sure what the deal was with that .git directory. It may have been an invalid link thanks to having moved the Steam library to a different hard disk.
When I delete the useless .git* directory entries, cloning works on that instance, too. So the only issue there is the error message in the second screenshot. |
Oups, forgot the new Kraken. Hang on... Edit: Actually, we have a |
PR KSP-CKAN#2665 changed the IOException to PathErrorKraken in `CopyDirectory()`. Now the new tests for `CopyDirectory()` assert the new kraken.
My attempt to implement the clone and fake functions in the GUI.
Accessible via File > Select KSP Install >New KSP instance > Clone or fake new instance:
The window itself looks like this:
or on windows:
Won't win beauty prizes with that, but it works (hopefully).
Should be pretty self-explanatory (haha).
Has all the features of the CLI implementation: