Commit cd469ede authored by David's avatar David
Browse files

macosx: Cancel resume dialog as well in case current input ends

parent e9361438
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#import "MainWindow.h" #import "MainWindow.h"
#import "VLCPlaylist.h" #import "VLCPlaylist.h"
#import "VLCPlaylistInfo.h" #import "VLCPlaylistInfo.h"
#import "ResumeDialogController.h"
#import "TrackSynchronization.h" #import "TrackSynchronization.h"
#import "VideoView.h" #import "VideoView.h"
...@@ -199,6 +200,9 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var, ...@@ -199,6 +200,9 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
object:nil]; object:nil];
} }
// Cancel pending resume dialogs
[[[VLCMain sharedInstance] resumeDialog] cancel];
input_thread_t *p_input_changed = NULL; input_thread_t *p_input_changed = NULL;
// object is hold here and released then it is dead // object is hold here and released then it is dead
......
...@@ -129,6 +129,9 @@ ...@@ -129,6 +129,9 @@
- (void)cancel - (void)cancel
{ {
if (![self isWindowLoaded])
return;
if (o_countdown_timer != nil) { if (o_countdown_timer != nil) {
[o_countdown_timer invalidate]; [o_countdown_timer invalidate];
o_countdown_timer = nil; o_countdown_timer = nil;
......
...@@ -867,8 +867,6 @@ ...@@ -867,8 +867,6 @@
- (void)continuePlaybackWhereYouLeftOff:(input_thread_t *)p_input_thread - (void)continuePlaybackWhereYouLeftOff:(input_thread_t *)p_input_thread
{ {
[[[VLCMain sharedInstance] resumeDialog] cancel];
NSDictionary *recentlyPlayedFiles = [[NSUserDefaults standardUserDefaults] objectForKey:@"recentlyPlayedMedia"]; NSDictionary *recentlyPlayedFiles = [[NSUserDefaults standardUserDefaults] objectForKey:@"recentlyPlayedMedia"];
if (!recentlyPlayedFiles) if (!recentlyPlayedFiles)
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment