Commit 52d6759f authored by Felix Paul Kühne's avatar Felix Paul Kühne

Move VLCDownloadViewController's existance from menu to app delegate

parent b7f44dd5
......@@ -12,6 +12,7 @@
#import "VLCHTTPUploaderController.h"
#import "GHRevealViewController.h"
#import "VLCMenuTableViewController.h"
#import "VLCDownloadViewController.h"
@class VLCPlaylistViewController;
@class PAPasscodeViewController;
......@@ -23,6 +24,7 @@
@property (nonatomic, readonly) VLCPlaylistViewController *playlistViewController;
@property (nonatomic, readonly) VLCDropboxTableViewController *dropboxTableViewController;
@property (nonatomic, readonly) VLCDownloadViewController *downloadViewController;
@property (nonatomic, strong) UIWindow *window;
......
......@@ -23,6 +23,7 @@
@interface VLCAppDelegate () <PAPasscodeViewControllerDelegate, VLCMediaFileDiscovererDelegate> {
PAPasscodeViewController *_passcodeLockController;
VLCDropboxTableViewController *_dropboxTableViewController;
VLCDownloadViewController *_downloadViewController;
int _idleCounter;
}
......@@ -173,6 +174,15 @@
return _dropboxTableViewController;
}
- (VLCDownloadViewController *)downloadViewController
{
if (_downloadViewController == nil) {
_downloadViewController = [[VLCDownloadViewController alloc] init];
}
return _downloadViewController;
}
#pragma mark - media discovering
- (void)mediaFileAdded:(NSString *)fileName loading:(BOOL)isLoading {
......
......@@ -21,7 +21,6 @@
#import "GHRevealViewController.h"
#import "VLCLocalServerListViewController.h"
#import "VLCOpenNetworkStreamViewController.h"
#import "VLCDownloadViewController.h"
#import "VLCSettingsController.h"
#import "UINavigationController+Theme.h"
#import "UIBarButtonItem+Theme.h"
......@@ -251,7 +250,7 @@
else if (itemIndex == 1)
viewController = [[VLCOpenNetworkStreamViewController alloc] init];
else if (itemIndex == 2)
viewController = [[VLCDownloadViewController alloc] init];
viewController = self.appDelegate.downloadViewController;
else if (itemIndex == 4)
viewController = self.appDelegate.dropboxTableViewController;
} else if (sectionNumber == 2) {
......
......@@ -66,7 +66,7 @@
<string key="NSFrame">{{10, 15}, {195, 30}}</string>
<reference key="NSSuperview" ref="234033301"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="209774297"/>
<reference key="NSNextKeyView" ref="325478617"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
......@@ -147,6 +147,7 @@
<string key="NSFrame">{{10, 49}, {300, 50}}</string>
<reference key="NSSuperview" ref="234033301"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="209774297"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
......@@ -296,6 +297,7 @@
<string key="NSFrame">{{0, 168}, {320, 215}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
......@@ -572,72 +574,6 @@
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">VLCHTTPDownloadViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="cancelDownload:">id</string>
<string key="downloadAction:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="cancelDownload:">
<string key="name">cancelDownload:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="downloadAction:">
<string key="name">downloadAction:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="activityIndicator">UIActivityIndicatorView</string>
<string key="cancelButton">UIButton</string>
<string key="currentDownloadLabel">UILabel</string>
<string key="downloadButton">UIButton</string>
<string key="downloadsTable">UITableView</string>
<string key="progressView">UIProgressView</string>
<string key="urlField">UITextField</string>
<string key="whatToDownloadHelpLabel">UILabel</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="activityIndicator">
<string key="name">activityIndicator</string>
<string key="candidateClassName">UIActivityIndicatorView</string>
</object>
<object class="IBToOneOutletInfo" key="cancelButton">
<string key="name">cancelButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="currentDownloadLabel">
<string key="name">currentDownloadLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="downloadButton">
<string key="name">downloadButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="downloadsTable">
<string key="name">downloadsTable</string>
<string key="candidateClassName">UITableView</string>
</object>
<object class="IBToOneOutletInfo" key="progressView">
<string key="name">progressView</string>
<string key="candidateClassName">UIProgressView</string>
</object>
<object class="IBToOneOutletInfo" key="urlField">
<string key="name">urlField</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo" key="whatToDownloadHelpLabel">
<string key="name">whatToDownloadHelpLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/VLCHTTPDownloadViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLCMenuButton</string>
<string key="superclassName">UIButton</string>
......
......@@ -192,7 +192,7 @@
7DA8B0FB173318E80029698C /* SourceCodePro-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7DA8B0F9173318E80029698C /* SourceCodePro-Regular.ttf */; };
7DADC55F1704FABF001DAC63 /* OBSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DADC55E1704FABF001DAC63 /* OBSlider.m */; };
7DB43835176E20CC00F460EE /* VLCDownloadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB43833176E20CC00F460EE /* VLCDownloadViewController.m */; };
7DB43836176E20CC00F460EE /* VLCHTTPDownloadViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DB43834176E20CC00F460EE /* VLCHTTPDownloadViewController.xib */; };
7DB43836176E20CC00F460EE /* VLCDownloadViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DB43834176E20CC00F460EE /* VLCDownloadViewController.xib */; };
7DBC3B441711FC6C00DCF688 /* VLCAboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DBC3B421711FC6C00DCF688 /* VLCAboutViewController.m */; };
7DBC3B451711FC6C00DCF688 /* VLCAboutViewController~iphone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DBC3B431711FC6C00DCF688 /* VLCAboutViewController~iphone.xib */; };
7DC72D5E17B7E7C7008A26D0 /* download@4x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7DC72D5B17B7E7C7008A26D0 /* download@4x.png */; };
......@@ -611,7 +611,7 @@
7DADC55E1704FABF001DAC63 /* OBSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OBSlider.m; path = ImportedSources/OBSlider/OBSlider/OBSlider.m; sourceTree = SOURCE_ROOT; };
7DB43832176E20CC00F460EE /* VLCDownloadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCDownloadViewController.h; sourceTree = "<group>"; };
7DB43833176E20CC00F460EE /* VLCDownloadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCDownloadViewController.m; sourceTree = "<group>"; };
7DB43834176E20CC00F460EE /* VLCHTTPDownloadViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VLCHTTPDownloadViewController.xib; path = ../Resources/VLCHTTPDownloadViewController.xib; sourceTree = "<group>"; };
7DB43834176E20CC00F460EE /* VLCDownloadViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VLCDownloadViewController.xib; path = ../Resources/VLCDownloadViewController.xib; sourceTree = "<group>"; };
7DBC3B411711FC6C00DCF688 /* VLCAboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCAboutViewController.h; sourceTree = "<group>"; };
7DBC3B421711FC6C00DCF688 /* VLCAboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCAboutViewController.m; sourceTree = "<group>"; };
7DBC3B431711FC6C00DCF688 /* VLCAboutViewController~iphone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = "VLCAboutViewController~iphone.xib"; path = "../Resources/VLCAboutViewController~iphone.xib"; sourceTree = "<group>"; };
......@@ -1381,7 +1381,7 @@
7D93045A17B6ACCF0054EAC6 /* VLCWiFiUploadTableViewCell.xib */,
7D93044617B687C90054EAC6 /* VLCLocalNetworkListCell~ipad.xib */,
7D93044717B687C90054EAC6 /* VLCLocalNetworkListCell~iphone.xib */,
7DB43834176E20CC00F460EE /* VLCHTTPDownloadViewController.xib */,
7DB43834176E20CC00F460EE /* VLCDownloadViewController.xib */,
7D2339AE176DE72E008D223C /* VLCOpenNetworkStreamViewController.xib */,
7DBC3B431711FC6C00DCF688 /* VLCAboutViewController~iphone.xib */,
7D9529521732EFCA006F5B40 /* VLCAboutViewController~ipad.xib */,
......@@ -1767,7 +1767,7 @@
7DF1166C176CC69A009EC05C /* volumeballslider.png in Resources */,
7DF1166D176CC69A009EC05C /* volumeballslider@2x.png in Resources */,
7D2339B0176DE72E008D223C /* VLCOpenNetworkStreamViewController.xib in Resources */,
7DB43836176E20CC00F460EE /* VLCHTTPDownloadViewController.xib in Resources */,
7DB43836176E20CC00F460EE /* VLCDownloadViewController.xib in Resources */,
A7990064176E9352009E8267 /* libraryBackground.png in Resources */,
7DD2A3A9179C04A7003EB537 /* OpenSans-Regular.ttf in Resources */,
7D93044817B687C90054EAC6 /* VLCLocalNetworkListCell~ipad.xib in Resources */,
......
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