]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx_dialog_provider/VLCProgressPanel.m
android_window: check subtitles bounds
[vlc] / modules / gui / macosx_dialog_provider / VLCProgressPanel.m
index 07c4e4a0795719194f457d2336f83c18eff1b3df..41430598e7d1ed6075598b66db795fd7364ff751 100644 (file)
@@ -1,24 +1,24 @@
 /*****************************************************************************
  * VLCProgressPanel.m: A Generic Progress Indicator Panel created for VLC
  *****************************************************************************
- * Copyright (C) 2009-2010 the VideoLAN team
+ * Copyright (C) 2009-2010 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Felix Paul Kühne <fkuehne at videolan dot org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #import "VLCProgressPanel.h"
@@ -55,6 +55,7 @@
     [_cancelButton setBordered:YES];
     [_cancelButton setTarget:self];
     [_cancelButton setAction:@selector(cancelDialog:)];
+    [_cancelButton setKeyEquivalent:@"\e"] ; // escape key
     [ourContentView addSubview:_cancelButton];
 
     s_rc.origin.x = 89;
     [ourContentView addSubview:_iconView];
 }
 
-- setDialogTitle:(NSString *)title
+- (void)setDialogTitle:(NSString *)title
 {
     [_titleField setStringValue:title];
     [self setTitle:title];
 }
 
-- setDialogMessage:(NSString *)message
+- (void)setDialogMessage:(NSString *)message
 {
     [_messageField setStringValue:message];
 }
 
-- setCancelButtonLabel:(NSString *)cancelLabel
+- (void)setCancelButtonLabel:(NSString *)cancelLabel
 {
     [_cancelButton setTitle:cancelLabel];
 }
 
-- setProgressAsDouble:(double)value
+- (void)setProgressAsDouble:(double)value
 {
     [_progressBar setDoubleValue:value];
 }
 - (IBAction)cancelDialog:(id)sender
 {
     _isCancelled = YES;
+    [_progressBar setIndeterminate:YES];
+    [_progressBar startAnimation:self];
 }
 
 @end