[vlc-commits] macosx: Improve UI if users cancels dialogs
David Fuhrmann
git at videolan.org
Sun Jul 15 22:29:42 CEST 2018
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jul 15 22:13:36 2018 +0200| [0c6b1d369a4a917cf01068465d37cd1872013873] | committer: David Fuhrmann
macosx: Improve UI if users cancels dialogs
This deletes previous output if the section is cancelled.
refs #20835
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c6b1d369a4a917cf01068465d37cd1872013873
---
.../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 2781a2d44f..abdaefb2bb 100644
--- a/modules/gui/macosx/VLCConvertAndSaveWindowController.m
+++ b/modules/gui/macosx/VLCConvertAndSaveWindowController.m
@@ -395,6 +395,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)
@@ -405,7 +420,8 @@
[_destinationCancelBtn setHidden:YES];
[[_destinationFileButton animator] setHidden: NO];
[[_destinationStreamButton animator] setHidden: NO];
- b_streaming = NO;
+
+ [self resetDestination];
}
- (IBAction)browseFileDestination:(id)sender
@@ -421,11 +437,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