Simplify the WKClone source/dest selection
Only show confirmation #2 if using advanced partition selection.
This commit is contained in:
parent
80f9bb6d75
commit
16d47a12a6
1 changed files with 24 additions and 9 deletions
|
|
@ -740,10 +740,17 @@ class State():
|
||||||
self.update_top_panes()
|
self.update_top_panes()
|
||||||
|
|
||||||
# Confirmation #1
|
# Confirmation #1
|
||||||
self.confirm_selections(
|
advanced_selection = False
|
||||||
prompt='Are these selections correct?',
|
try:
|
||||||
source_parts=source_parts,
|
self.confirm_selections(
|
||||||
)
|
prompt='Are these selections correct? (use "No" for advanced selection)',
|
||||||
|
source_parts=source_parts,
|
||||||
|
)
|
||||||
|
except std.GenericAbort:
|
||||||
|
if std.ask('Proceed to advanced partition selection?'):
|
||||||
|
advanced_selection = True
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
# Update panes
|
# Update panes
|
||||||
self.update_progress_pane('Idle')
|
self.update_progress_pane('Idle')
|
||||||
|
|
@ -762,11 +769,18 @@ class State():
|
||||||
clean_working_dir(self)
|
clean_working_dir(self)
|
||||||
|
|
||||||
# Add block pairs
|
# Add block pairs
|
||||||
if self.mode == 'Clone':
|
if advanced_selection:
|
||||||
source_parts = self.add_clone_block_pairs()
|
if self.mode == 'Clone':
|
||||||
|
source_parts = self.add_clone_block_pairs()
|
||||||
|
else:
|
||||||
|
source_parts = select_disk_parts(self.mode, self.source)
|
||||||
|
self.add_image_block_pairs(source_parts)
|
||||||
else:
|
else:
|
||||||
source_parts = select_disk_parts(self.mode, self.source)
|
if self.mode == 'Clone':
|
||||||
self.add_image_block_pairs(source_parts)
|
self._add_block_pair(
|
||||||
|
hw_obj.Disk(self.source.path),
|
||||||
|
pathlib.Path(self.destination.path),
|
||||||
|
)
|
||||||
|
|
||||||
# Safety Checks #1
|
# Safety Checks #1
|
||||||
if self.mode == 'Clone':
|
if self.mode == 'Clone':
|
||||||
|
|
@ -775,7 +789,8 @@ class State():
|
||||||
|
|
||||||
# Confirmation #2
|
# Confirmation #2
|
||||||
self.update_progress_pane('Idle')
|
self.update_progress_pane('Idle')
|
||||||
self.confirm_selections('Start recovery?')
|
if advanced_selection:
|
||||||
|
self.confirm_selections('Start recovery?')
|
||||||
|
|
||||||
# Unmount source and/or destination under macOS
|
# Unmount source and/or destination under macOS
|
||||||
if PLATFORM == 'Darwin':
|
if PLATFORM == 'Darwin':
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue