Sparkle: Update API a bit
This updates the API interface calls a bit, and borrows about 20 lines of code from WireShark. Signed-off-by: Christopher Snowhill <kode54@gmail.com>xcode15
parent
02a7fe84cb
commit
504ddcf82b
|
@ -7,7 +7,6 @@
|
||||||
@class PlaylistController;
|
@class PlaylistController;
|
||||||
@class PlaylistView;
|
@class PlaylistView;
|
||||||
@class PlaylistLoader;
|
@class PlaylistLoader;
|
||||||
@class SUUpdater;
|
|
||||||
@class PreferencesController;
|
@class PreferencesController;
|
||||||
|
|
||||||
@interface AppController : NSObject {
|
@interface AppController : NSObject {
|
||||||
|
@ -47,8 +46,6 @@
|
||||||
|
|
||||||
IBOutlet NSWindowController *spotlightWindowController;
|
IBOutlet NSWindowController *spotlightWindowController;
|
||||||
|
|
||||||
IBOutlet SUUpdater *updater;
|
|
||||||
|
|
||||||
IBOutlet FileTreeViewController *fileTreeViewController;
|
IBOutlet FileTreeViewController *fileTreeViewController;
|
||||||
|
|
||||||
IBOutlet PreferencesController *preferencesController;
|
IBOutlet PreferencesController *preferencesController;
|
||||||
|
@ -110,6 +107,8 @@
|
||||||
- (void)showPathSuggester;
|
- (void)showPathSuggester;
|
||||||
+ (void)globalShowPathSuggester;
|
+ (void)globalShowPathSuggester;
|
||||||
|
|
||||||
|
- (IBAction)checkForUpdates:(id)sender;
|
||||||
|
|
||||||
@property NSWindow *mainWindow;
|
@property NSWindow *mainWindow;
|
||||||
@property NSWindow *miniWindow;
|
@property NSWindow *miniWindow;
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,22 @@ BOOL kAppControllerShuttingDown = NO;
|
||||||
|
|
||||||
static AppController *kAppController = nil;
|
static AppController *kAppController = nil;
|
||||||
|
|
||||||
|
@interface SparkleBridge : NSObject
|
||||||
|
+ (SPUStandardUpdaterController *)sharedStandardUpdaterController;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation SparkleBridge
|
||||||
|
|
||||||
|
+ (SPUStandardUpdaterController *)sharedStandardUpdaterController {
|
||||||
|
static SPUStandardUpdaterController *sharedStandardUpdaterController_ = nil;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
sharedStandardUpdaterController_ = [[SPUStandardUpdaterController alloc] initWithUpdaterDelegate: nil userDriverDelegate: nil];
|
||||||
|
});
|
||||||
|
return sharedStandardUpdaterController_;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation AppController {
|
@implementation AppController {
|
||||||
BOOL _isFullToolbarStyle;
|
BOOL _isFullToolbarStyle;
|
||||||
}
|
}
|
||||||
|
@ -172,8 +188,9 @@ static AppController *kAppController = nil;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// Prevent updates automatically in debug builds
|
// Prevent updates automatically in debug builds
|
||||||
[updater setAutomaticallyChecksForUpdates:NO];
|
[[[SparkleBridge sharedStandardUpdaterController] updater] setAutomaticallyChecksForUpdates:NO];
|
||||||
#endif
|
#endif
|
||||||
|
[[[SparkleBridge sharedStandardUpdaterController] updater] setUpdateCheckInterval:3600];
|
||||||
|
|
||||||
[[totalTimeField cell] setBackgroundStyle:NSBackgroundStyleRaised];
|
[[totalTimeField cell] setBackgroundStyle:NSBackgroundStyleRaised];
|
||||||
|
|
||||||
|
@ -785,4 +802,8 @@ static AppController *kAppController = nil;
|
||||||
[kAppController showPathSuggester];
|
[kAppController showPathSuggester];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (IBAction)checkForUpdates:(id)sender {
|
||||||
|
[[SparkleBridge sharedStandardUpdaterController] checkForUpdates:[[NSApplication sharedApplication] delegate]];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -1382,7 +1382,7 @@
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem title="Check for Updates..." id="302">
|
<menuItem title="Check for Updates..." id="302">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="checkForUpdates:" target="1303" id="1304"/>
|
<action selector="checkForUpdates:" target="226" id="jEY-i9-qwZ"/>
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem isSeparatorItem="YES" id="1100">
|
<menuItem isSeparatorItem="YES" id="1100">
|
||||||
|
@ -2201,7 +2201,6 @@ Gw
|
||||||
<outlet property="shuffleButton" destination="1637" id="Nzr-Mw-z9P"/>
|
<outlet property="shuffleButton" destination="1637" id="Nzr-Mw-z9P"/>
|
||||||
<outlet property="spotlightWindowController" destination="1675" id="1677"/>
|
<outlet property="spotlightWindowController" destination="1675" id="1677"/>
|
||||||
<outlet property="totalTimeField" destination="778" id="1659"/>
|
<outlet property="totalTimeField" destination="778" id="1659"/>
|
||||||
<outlet property="updater" destination="1303" id="gDn-jb-V0R"/>
|
|
||||||
</connections>
|
</connections>
|
||||||
</customObject>
|
</customObject>
|
||||||
<menu title="Menu" autoenablesItems="NO" id="513" userLabel="DockMenu">
|
<menu title="Menu" autoenablesItems="NO" id="513" userLabel="DockMenu">
|
||||||
|
@ -2459,7 +2458,6 @@ Gw
|
||||||
<point key="canvasLocation" x="-117" y="-407"/>
|
<point key="canvasLocation" x="-117" y="-407"/>
|
||||||
</menu>
|
</menu>
|
||||||
<customObject id="1217" userLabel="PreferencesController" customClass="PreferencesController"/>
|
<customObject id="1217" userLabel="PreferencesController" customClass="PreferencesController"/>
|
||||||
<customObject id="1303" userLabel="SUUpdater" customClass="SUUpdater"/>
|
|
||||||
<customObject id="1319" userLabel="PlaylistLoader" customClass="PlaylistLoader">
|
<customObject id="1319" userLabel="PlaylistLoader" customClass="PlaylistLoader">
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="playbackController" destination="705" id="EBV-A8-3bM"/>
|
<outlet property="playbackController" destination="705" id="EBV-A8-3bM"/>
|
||||||
|
|
Loading…
Reference in New Issue