瀏覽代碼

Shake iDevice to create bug report close #7788

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Jean-Romain Prévost 12 年之前
父節點
當前提交
99d8187fb4

+ 24 - 0
AspenProject/VLCMenuViewController.m

@@ -206,6 +206,30 @@
     }
 }
 
+#pragma mark - shake to support
+
+- (BOOL)canBecomeFirstResponder {
+    return YES;
+}
+
+- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
+    if (motion == UIEventSubtypeMotionShake) {
+        UIAlertView *alert = [[UIAlertView alloc]
+                              initWithTitle:NSLocalizedString(@"BUG_REPORT_TITLE", @"")
+                              message:NSLocalizedString(@"BUG_REPORT_MESSAGE", @"") delegate:self
+                              cancelButtonTitle:NSLocalizedString(@"BUTTON_CANCEL", @"")
+                              otherButtonTitles:NSLocalizedString(@"BUG_REPORT_BUTTON", @""), nil];;
+        [alert show];
+    }
+}
+
+- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
+{
+    if (buttonIndex == 1) {
+        NSURL *url = [NSURL URLWithString:@"https://trac.videolan.org/vlc/newticket"];
+        [[UIApplication sharedApplication] openURL:url];
+    }
+}
 - (void)_dismissModalViewController
 {
     [self dismissModalViewControllerAnimated:YES];

二進制
Resources/da.lproj/Localizable.strings


二進制
Resources/de.lproj/Localizable.strings


二進制
Resources/en.lproj/Localizable.strings


二進制
Resources/es.lproj/Localizable.strings


二進制
Resources/fi.lproj/Localizable.strings


二進制
Resources/fr.lproj/Localizable.strings


二進制
Resources/id.lproj/Localizable.strings


二進制
Resources/it.lproj/Localizable.strings


二進制
Resources/ja.lproj/Localizable.strings


二進制
Resources/ru.lproj/Localizable.strings