[vlc-commits] macosx: Improve UI if users cancels dialogs
David Fuhrmann
git at videolan.org
Sun Jul 15 22:31:34 CEST 2018
vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jul 15 22:13:36 2018 +0200| [72dd08b59ac86bb546e70bb5df0f3b7e04957fe3] | committer: David Fuhrmann
macosx: Improve UI if users cancels dialogs
This deletes previous output if the section is cancelled.
refs #20835
(cherry picked from commit 0c6b1d369a4a917cf01068465d37cd1872013873)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=72dd08b59ac86bb546e70bb5df0f3b7e04957fe3
---
.../gui/macosx/VLCConvertAndSaveWindowController.m | 23 +++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/modules/gui/macosx/VLCConvertAndSaveWindowController.m b/modules/gui/macosx/VLCConvertAndSaveWindowController.m
index 6877dc9214..b84e80cf75 100644
--- a/modules/gui/macosx/VLCConvertAndSaveWindowController.m
+++ b/modules/gui/macosx/VLCConvertAndSaveWindowController.m
@@ -392,6 +392,21 @@
[_okButton setTitle:_NS("Stream")];
}
+- (void)resetDestination
+{
+ [self setOutputDestination:@""];
+
+ // File panel
+ [[_fileDestinationFileName animator] setHidden: YES];
+ [[_fileDestinationFileNameStub animator] setHidden: NO];
+
+ // Stream panel
+ [_streamDestinationURLLabel setStringValue:_NS("Select Streaming Method")];
+ b_streaming = NO;
+
+ [self updateOKButton];
+}
+
- (IBAction)cancelDestination:(id)sender
{
if ([_streamDestinationView superview] != nil)
@@ -402,7 +417,8 @@
[_destinationCancelBtn setHidden:YES];
[[_destinationFileButton animator] setHidden: NO];
[[_destinationStreamButton animator] setHidden: NO];
- b_streaming = NO;
+
+ [self resetDestination];
}
- (IBAction)browseFileDestination:(id)sender
@@ -418,11 +434,8 @@
[_fileDestinationFileName setStringValue: [[NSFileManager defaultManager] displayNameAtPath:_outputDestination]];
[[_fileDestinationFileNameStub animator] setHidden: YES];
[[_fileDestinationFileName animator] setHidden: NO];
- } else {
- [self setOutputDestination:@""];
- [[_fileDestinationFileName animator] setHidden: YES];
- [[_fileDestinationFileNameStub animator] setHidden: NO];
}
+
[self updateOKButton];
}];
}
More information about the vlc-commits
mailing list