macosx: rename to VLCResumeDialogController
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Mon, 8 Aug 2016 15:45:47 +0000 (17:45 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Mon, 8 Aug 2016 16:47:29 +0000 (18:47 +0200)
12 files changed:
extras/package/macosx/Resources/English.lproj/ResumeDialog.xib
extras/package/macosx/vlc.xcodeproj/project.pbxproj
modules/gui/macosx/InputManager.m
modules/gui/macosx/Makefile.am
modules/gui/macosx/ResumeDialogController.h [deleted file]
modules/gui/macosx/ResumeDialogController.m [deleted file]
modules/gui/macosx/VLCPlaylist.m
modules/gui/macosx/VLCResumeDialogController.h [new file with mode: 0644]
modules/gui/macosx/VLCResumeDialogController.m [new file with mode: 0644]
modules/gui/macosx/VLCVoutWindowController.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index 7f5ea91..c0fdedc 100644 (file)
@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G24b" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
-        <deployment identifier="macosx"/>
         <development version="7000" identifier="xcode"/>
         <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="ResumeDialogController">
+        <customObject id="-2" userLabel="File's Owner" customClass="VLCResumeDialogController">
             <connections>
                 <outlet property="o_always_resume_chk" destination="85X-TN-2Hu" id="ttg-8c-Zbf"/>
                 <outlet property="o_restart_btn" destination="9" id="37"/>
index edba00a..9b78999 100644 (file)
@@ -22,8 +22,8 @@
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
-               1C15C7DC1B5146DB003AB729 /* ResumeDialogController.h in Sources */ = {isa = PBXBuildFile; fileRef = 633121CA1B51122700E636DA /* ResumeDialogController.h */; };
-               1C15C7DD1B5146DB003AB729 /* ResumeDialogController.m in Sources */ = {isa = PBXBuildFile; fileRef = 633121CB1B51122700E636DA /* ResumeDialogController.m */; };
+               1C15C7DC1B5146DB003AB729 /* VLCResumeDialogController.h in Sources */ = {isa = PBXBuildFile; fileRef = 633121CA1B51122700E636DA /* VLCResumeDialogController.h */; };
+               1C15C7DD1B5146DB003AB729 /* VLCResumeDialogController.m in Sources */ = {isa = PBXBuildFile; fileRef = 633121CB1B51122700E636DA /* VLCResumeDialogController.m */; };
                1C51BDE51B7A221B0056B9AA /* TimeSelectionPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1C51BDE31B7A221B0056B9AA /* TimeSelectionPanel.xib */; };
                1C57690E19DC93620099F5A6 /* topbar_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C57690D19DC93620099F5A6 /* topbar_background.png */; };
                1C67C8A51D58C0980079E1C1 /* HelpWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C67C8A41D58C0980079E1C1 /* HelpWindowController.m */; };
                5CCED71314C0D4A90057F8D1 /* ExtensionsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExtensionsManager.m; path = ../../../modules/gui/macosx/ExtensionsManager.m; sourceTree = SOURCE_ROOT; };
                5CCED71414C0D4A90057F8D1 /* VLCUIWidgets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCUIWidgets.h; path = ../../../modules/gui/macosx/VLCUIWidgets.h; sourceTree = SOURCE_ROOT; };
                5CCED71514C0D4A90057F8D1 /* VLCUIWidgets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCUIWidgets.m; path = ../../../modules/gui/macosx/VLCUIWidgets.m; sourceTree = SOURCE_ROOT; };
-               633121CA1B51122700E636DA /* ResumeDialogController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ResumeDialogController.h; path = ../../../modules/gui/macosx/ResumeDialogController.h; sourceTree = "<group>"; };
-               633121CB1B51122700E636DA /* ResumeDialogController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ResumeDialogController.m; path = ../../../modules/gui/macosx/ResumeDialogController.m; sourceTree = "<group>"; };
+               633121CA1B51122700E636DA /* VLCResumeDialogController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCResumeDialogController.h; path = ../../../modules/gui/macosx/VLCResumeDialogController.h; sourceTree = "<group>"; };
+               633121CB1B51122700E636DA /* VLCResumeDialogController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCResumeDialogController.m; path = ../../../modules/gui/macosx/VLCResumeDialogController.m; sourceTree = "<group>"; };
                633121CF1B5112C300E636DA /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/ResumeDialog.xib; sourceTree = "<group>"; };
                6B13E2A61BC67678001AD24A /* VLCScrollingClipView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCScrollingClipView.h; path = ../../../modules/gui/macosx/VLCScrollingClipView.h; sourceTree = "<group>"; };
                6B13E2A71BC67678001AD24A /* VLCScrollingClipView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCScrollingClipView.m; path = ../../../modules/gui/macosx/VLCScrollingClipView.m; sourceTree = "<group>"; };
                                8E9CA1A406D7DEE800B7186C /* prefs_widgets.m */,
                                8ED6C28503E2EB1C0059A3A7 /* prefs.h */,
                                8ED6C28603E2EB1C0059A3A7 /* prefs.m */,
-                               633121CA1B51122700E636DA /* ResumeDialogController.h */,
-                               633121CB1B51122700E636DA /* ResumeDialogController.m */,
+                               633121CA1B51122700E636DA /* VLCResumeDialogController.h */,
+                               633121CB1B51122700E636DA /* VLCResumeDialogController.m */,
                                CC461F6C160078340022423C /* SharedDialogs.h */,
                                CC461F6D160078340022423C /* SharedDialogs.m */,
                                CCB24D5E0D54BBAE004D780C /* simple_prefs.h */,
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               1C15C7DC1B5146DB003AB729 /* ResumeDialogController.h in Sources */,
-                               1C15C7DD1B5146DB003AB729 /* ResumeDialogController.m in Sources */,
+                               1C15C7DC1B5146DB003AB729 /* VLCResumeDialogController.h in Sources */,
+                               1C15C7DD1B5146DB003AB729 /* VLCResumeDialogController.m in Sources */,
                                1CCB5F531A62A724004C3E90 /* AddonListDataSource.h in Sources */,
                                1CCB5F541A62A724004C3E90 /* AddonListDataSource.m in Sources */,
                                1CCB5F551A62A724004C3E90 /* AddonsWindowController.h in Sources */,
index 26fe1ed..b526250 100644 (file)
@@ -29,7 +29,7 @@
 #import "MainWindow.h"
 #import "VLCPlaylist.h"
 #import "VLCPlaylistInfo.h"
-#import "ResumeDialogController.h"
+#import "VLCResumeDialogController.h"
 #import "TrackSynchronization.h"
 #import "VideoView.h"
 
index eaf919b..3f9a40c 100644 (file)
@@ -57,7 +57,6 @@ libmacosx_plugin_la_SOURCES = \
        prefs_widgets.h prefs_widgets.m \
        PXSourceList.h PXSourceList.m \
        PXSourceListDataSource.h PXSourceListDelegate.h \
-       ResumeDialogController.h ResumeDialogController.m \
        SideBarItem.h SideBarItem.m \
        SharedDialogs.h SharedDialogs.m \
        simple_prefs.h simple_prefs.m \
@@ -85,4 +84,5 @@ libmacosx_plugin_la_SOURCES = \
        VLCRendererDiscovery.h VLCRendererDiscovery.m \
        VLCRendererItem.h VLCRendererItem.m \
        VLCRendererDialog.h VLCRendererDialog.m \
+       VLCResumeDialogController.h VLCResumeDialogController.m \
        VLCVideoEffectsWindowController.h VLCVideoEffectsWindowController.m
diff --git a/modules/gui/macosx/ResumeDialogController.h b/modules/gui/macosx/ResumeDialogController.h
deleted file mode 100644 (file)
index 08c6fb9..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*****************************************************************************
- * ResumeDialogController.h: MacOS X interface module
- *****************************************************************************
- * Copyright (C) 2015 VLC authors and VideoLAN
- *
- * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
- *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
- *
- * 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
- * (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.
- *
- * 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.
- *****************************************************************************/
-
-#import <Cocoa/Cocoa.h>
-
-#import <vlc_common.h>
-#import <vlc_input.h>
-
-enum ResumeResult {
-    RESUME_RESTART,
-    RESUME_NOW
-};
-
-typedef void(^CompletionBlock)(enum ResumeResult);
-
-@interface ResumeDialogController : NSWindowController
-{
-    IBOutlet id o_title_lbl;
-    IBOutlet id o_text_lbl;
-
-    IBOutlet id o_restart_btn;
-    IBOutlet id o_resume_btn;
-    IBOutlet id o_always_resume_chk;
-
-    NSTimer *o_countdown_timer;
-}
-
-- (IBAction)buttonClicked:(id)sender;
-- (IBAction)resumeSettingChanged:(id)sender;
-
-- (void)showWindowWithItem:(input_item_t *)p_item withLastPosition:(NSInteger)pos completionBlock:(CompletionBlock)block;
-
-- (void)updateCocoaWindowLevel:(NSInteger)i_level;
-
-- (void)cancel;
-
-@end
diff --git a/modules/gui/macosx/ResumeDialogController.m b/modules/gui/macosx/ResumeDialogController.m
deleted file mode 100644 (file)
index 5031c89..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*****************************************************************************
- * ResumeDialogController.m: MacOS X interface module
- *****************************************************************************
- * Copyright (C) 2015 VLC authors and VideoLAN
- *
- * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
- *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
- *
- * 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
- * (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.
- *
- * 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.
- *****************************************************************************/
-
-
-#import "ResumeDialogController.h"
-
-#import "intf.h"
-#import "StringUtility.h"
-
-@interface ResumeDialogController()
-{
-    int currentResumeTimeout;
-    CompletionBlock completionBlock;
-}
-@end
-
-@implementation ResumeDialogController
-
-- (id)init
-{
-    self = [super initWithWindowNibName:@"ResumeDialog"];
-
-    return self;
-}
-
-- (void)windowDidLoad
-{
-    [o_title_lbl setStringValue:_NS("Continue playback?")];
-    [o_resume_btn setTitle:_NS("Continue")];
-
-    [o_always_resume_chk setTitle:_NS("Always continue media playback")];
-}
-
-- (void)showWindowWithItem:(input_item_t *)p_item withLastPosition:(NSInteger)pos completionBlock:(CompletionBlock)block
-{
-    NSWindow *w = [self window];
-
-    currentResumeTimeout = 10;
-    completionBlock = [block copy];
-
-
-    NSString *o_restartButtonLabel = _NS("Restart playback");
-    o_restartButtonLabel = [o_restartButtonLabel stringByAppendingFormat:@" (%d)", currentResumeTimeout];
-    [o_restart_btn setTitle:o_restartButtonLabel];
-
-    char *psz_title_name = input_item_GetTitleFbName(p_item);
-    NSString *o_title = toNSStr(psz_title_name);
-    free(psz_title_name);
-    NSString *labelString = [NSString stringWithFormat:_NS("Playback of \"%@\" will continue at %@"), o_title, [[VLCStringUtility sharedInstance] stringForTime:pos]];
-    [o_text_lbl setStringValue:labelString];
-    [o_always_resume_chk setState: NSOffState];
-
-    o_countdown_timer = [NSTimer scheduledTimerWithTimeInterval:1
-                                                         target:self
-                                                       selector:@selector(updateAlertWindow:)
-                                                       userInfo:nil
-                                                        repeats:YES];
-
-    [w setLevel:[[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]];
-    [w center];
-
-    [w makeKeyAndOrderFront:nil];
-}
-
-- (void)updateAlertWindow:(NSTimer *)timer
-{
-    --currentResumeTimeout;
-    if (currentResumeTimeout <= 0) {
-        [self buttonClicked:o_restart_btn];
-        [timer invalidate];
-        timer = nil;
-    }
-
-    NSString *buttonLabel = _NS("Restart playback");
-    buttonLabel = [buttonLabel stringByAppendingFormat:@" (%d)", currentResumeTimeout];
-
-    [o_restart_btn setTitle:buttonLabel];
-}
-
-- (IBAction)buttonClicked:(id)sender
-{
-    enum ResumeResult resumeResult;
-
-    if (sender == o_restart_btn)
-        resumeResult = RESUME_RESTART;
-    else if (sender == o_resume_btn)
-        resumeResult = RESUME_NOW;
-
-    [[self window] close];
-
-    if (completionBlock) {
-        completionBlock(resumeResult);
-        completionBlock = nil;
-    }
-}
-
-- (IBAction)resumeSettingChanged:(id)sender
-{
-    int newState = [sender state] == NSOnState ? 1 : 0;
-    msg_Dbg(getIntf(), "Changing resume setting to %i", newState);
-    config_PutInt(getIntf(), "macosx-continue-playback", newState);
-}
-
-- (void)updateCocoaWindowLevel:(NSInteger)i_level
-{
-    if (self.isWindowLoaded && [self.window isVisible] && [self.window level] != i_level)
-        [self.window setLevel: i_level];
-}
-
-- (void)cancel
-{
-    if (![self isWindowLoaded])
-        return;
-
-    if (o_countdown_timer != nil) {
-        [o_countdown_timer invalidate];
-        o_countdown_timer = nil;
-    }
-
-    [[self window] close];
-}
-
-@end
index d71c133..a608bbf 100644 (file)
@@ -45,7 +45,7 @@
 #import "VLCPlaylist.h"
 #import "MainMenu.h"
 #import "VLCPlaylistInfo.h"
-#import "ResumeDialogController.h"
+#import "VLCResumeDialogController.h"
 #import "open.h"
 
 #include <vlc_keys.h>
diff --git a/modules/gui/macosx/VLCResumeDialogController.h b/modules/gui/macosx/VLCResumeDialogController.h
new file mode 100644 (file)
index 0000000..cad5cdb
--- /dev/null
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * VLCResumeDialogController.m: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2015 VLC authors and VideoLAN
+ *
+ * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
+ *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
+ *
+ * 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
+ * (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.
+ *
+ * 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.
+ *****************************************************************************/
+
+#import <Cocoa/Cocoa.h>
+
+#import <vlc_common.h>
+#import <vlc_input.h>
+
+enum ResumeResult {
+    RESUME_RESTART,
+    RESUME_NOW
+};
+
+typedef void(^CompletionBlock)(enum ResumeResult);
+
+@interface VLCResumeDialogController : NSWindowController
+{
+    IBOutlet id o_title_lbl;
+    IBOutlet id o_text_lbl;
+
+    IBOutlet id o_restart_btn;
+    IBOutlet id o_resume_btn;
+    IBOutlet id o_always_resume_chk;
+
+    NSTimer *o_countdown_timer;
+}
+
+- (IBAction)buttonClicked:(id)sender;
+- (IBAction)resumeSettingChanged:(id)sender;
+
+- (void)showWindowWithItem:(input_item_t *)p_item withLastPosition:(NSInteger)pos completionBlock:(CompletionBlock)block;
+
+- (void)updateCocoaWindowLevel:(NSInteger)i_level;
+
+- (void)cancel;
+
+@end
diff --git a/modules/gui/macosx/VLCResumeDialogController.m b/modules/gui/macosx/VLCResumeDialogController.m
new file mode 100644 (file)
index 0000000..97617f6
--- /dev/null
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ * VLCResumeDialogController.m: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2015 VLC authors and VideoLAN
+ *
+ * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
+ *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
+ *
+ * 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
+ * (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.
+ *
+ * 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.
+ *****************************************************************************/
+
+
+#import "VLCResumeDialogController.h"
+
+#import "intf.h"
+#import "StringUtility.h"
+
+@interface VLCResumeDialogController()
+{
+    int currentResumeTimeout;
+    CompletionBlock completionBlock;
+}
+@end
+
+@implementation VLCResumeDialogController
+
+- (id)init
+{
+    self = [super initWithWindowNibName:@"ResumeDialog"];
+
+    return self;
+}
+
+- (void)windowDidLoad
+{
+    [o_title_lbl setStringValue:_NS("Continue playback?")];
+    [o_resume_btn setTitle:_NS("Continue")];
+
+    [o_always_resume_chk setTitle:_NS("Always continue media playback")];
+}
+
+- (void)showWindowWithItem:(input_item_t *)p_item withLastPosition:(NSInteger)pos completionBlock:(CompletionBlock)block
+{
+    NSWindow *w = [self window];
+
+    currentResumeTimeout = 10;
+    completionBlock = [block copy];
+
+
+    NSString *o_restartButtonLabel = _NS("Restart playback");
+    o_restartButtonLabel = [o_restartButtonLabel stringByAppendingFormat:@" (%d)", currentResumeTimeout];
+    [o_restart_btn setTitle:o_restartButtonLabel];
+
+    char *psz_title_name = input_item_GetTitleFbName(p_item);
+    NSString *o_title = toNSStr(psz_title_name);
+    free(psz_title_name);
+    NSString *labelString = [NSString stringWithFormat:_NS("Playback of \"%@\" will continue at %@"), o_title, [[VLCStringUtility sharedInstance] stringForTime:pos]];
+    [o_text_lbl setStringValue:labelString];
+    [o_always_resume_chk setState: NSOffState];
+
+    o_countdown_timer = [NSTimer scheduledTimerWithTimeInterval:1
+                                                         target:self
+                                                       selector:@selector(updateAlertWindow:)
+                                                       userInfo:nil
+                                                        repeats:YES];
+
+    [w setLevel:[[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]];
+    [w center];
+
+    [w makeKeyAndOrderFront:nil];
+}
+
+- (void)updateAlertWindow:(NSTimer *)timer
+{
+    --currentResumeTimeout;
+    if (currentResumeTimeout <= 0) {
+        [self buttonClicked:o_restart_btn];
+        [timer invalidate];
+        timer = nil;
+    }
+
+    NSString *buttonLabel = _NS("Restart playback");
+    buttonLabel = [buttonLabel stringByAppendingFormat:@" (%d)", currentResumeTimeout];
+
+    [o_restart_btn setTitle:buttonLabel];
+}
+
+- (IBAction)buttonClicked:(id)sender
+{
+    enum ResumeResult resumeResult;
+
+    if (sender == o_restart_btn)
+        resumeResult = RESUME_RESTART;
+    else if (sender == o_resume_btn)
+        resumeResult = RESUME_NOW;
+
+    [[self window] close];
+
+    if (completionBlock) {
+        completionBlock(resumeResult);
+        completionBlock = nil;
+    }
+}
+
+- (IBAction)resumeSettingChanged:(id)sender
+{
+    int newState = [sender state] == NSOnState ? 1 : 0;
+    msg_Dbg(getIntf(), "Changing resume setting to %i", newState);
+    config_PutInt(getIntf(), "macosx-continue-playback", newState);
+}
+
+- (void)updateCocoaWindowLevel:(NSInteger)i_level
+{
+    if (self.isWindowLoaded && [self.window isVisible] && [self.window level] != i_level)
+        [self.window setLevel: i_level];
+}
+
+- (void)cancel
+{
+    if (![self isWindowLoaded])
+        return;
+
+    if (o_countdown_timer != nil) {
+        [o_countdown_timer invalidate];
+        o_countdown_timer = nil;
+    }
+
+    [[self window] close];
+}
+
+@end
index fcb05f0..6f1c76b 100644 (file)
@@ -35,7 +35,7 @@
 #import "VLCPlaylistInfo.h"
 #import "VLCBookmarksWindowController.h"
 #import "TrackSynchronization.h"
-#import "ResumeDialogController.h"
+#import "VLCResumeDialogController.h"
 #import "VLCPlaylist.h"
 
 static atomic_bool b_intf_starting = ATOMIC_VAR_INIT(false);
index 1511b03..b805662 100644 (file)
@@ -60,7 +60,7 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
 @class VLCMainMenu;
 @class VLCPlaylist;
 @class VLCInputManager;
-@class ResumeDialogController;
+@class VLCResumeDialogController;
 @class VLCSimplePrefs;
 @class VLCPrefs;
 @class VLCCoreDialogProvider;
@@ -92,7 +92,7 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
 - (VLCPrefs *)preferences;
 - (VLCPlaylist *)playlist;
 - (VLCCoreDialogProvider *)coreDialogProvider;
-- (ResumeDialogController *)resumeDialog;
+- (VLCResumeDialogController *)resumeDialog;
 - (VLCInputManager *)inputManager;
 - (ExtensionsManager *)extensionsManager;
 - (VLCStatusBarIcon *)statusBarIcon;
index 86007a8..1ae5591 100644 (file)
@@ -58,7 +58,7 @@
 #import "TrackSynchronization.h"
 #import "ExtensionsManager.h"
 #import "BWQuincyManager.h"
-#import "ResumeDialogController.h"
+#import "VLCResumeDialogController.h"
 #import "DebugMessageVisualizer.h"
 #import "ConvertAndSave.h"
 
@@ -171,7 +171,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
     VLCCoreDialogProvider *_coredialogs;
     VLCBookmarksWindowController *_bookmarks;
     VLCCoreInteraction *_coreinteraction;
-    ResumeDialogController *_resume_dialog;
+    VLCResumeDialogController *_resume_dialog;
     VLCInputManager *_input_manager;
     VLCPlaylist *_playlist;
     VLCDebugMessageVisualizer *_messagePanelController;
@@ -626,10 +626,10 @@ static VLCMain *sharedInstance = nil;
     return _coredialogs;
 }
 
-- (ResumeDialogController *)resumeDialog
+- (VLCResumeDialogController *)resumeDialog
 {
     if (!_resume_dialog)
-        _resume_dialog = [[ResumeDialogController alloc] init];
+        _resume_dialog = [[VLCResumeDialogController alloc] init];
 
     return _resume_dialog;
 }