Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
08400fbe
Commit
08400fbe
authored
May 30, 2013
by
Felix Paul Kühne
Browse files
Add confirmation dialog before deleting media on iPad (close #8734)
parent
87f84981
Changes
2
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCPlaylistGridView.m
View file @
08400fbe
...
...
@@ -89,8 +89,17 @@
-
(
IBAction
)
removeMedia
:(
id
)
sender
{
NSUInteger
cellIndex
=
[
self
.
gridView
indexForCell
:
self
];
[
self
.
gridView
.
delegate
gridView
:
self
.
gridView
commitEditingStyle
:
UITableViewCellEditingStyleDelete
forRowAtIndex
:
cellIndex
];
/* ask user if s/he really wants to delete the media file */
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
NSLocalizedString
(
@"DELETE_FILE"
,
@""
)
message
:[
NSString
stringWithFormat
:
NSLocalizedString
(
@"DELETE_FILE_LONG"
,
@""
),
self
.
mediaObject
.
title
]
delegate
:
self
cancelButtonTitle
:
NSLocalizedString
(
@"BUTTON_CANCEL"
,
@""
)
otherButtonTitles
:
NSLocalizedString
(
@"BUTTON_DELETE"
,
@""
),
nil
];
[
alert
show
];
}
-
(
void
)
alertView
:(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
1
)
{
NSUInteger
cellIndex
=
[
self
.
gridView
indexForCell
:
self
];
[
self
.
gridView
.
delegate
gridView
:
self
.
gridView
commitEditingStyle
:
UITableViewCellEditingStyleDelete
forRowAtIndex
:
cellIndex
];
}
}
@end
Resources/en.lproj/Localizable.strings
View file @
08400fbe
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment