Merge branch 'feature/sparkle-upgrade'
This commit is contained in:
commit
69ec359e87
2
Cartfile
2
Cartfile
|
@ -1,4 +1,4 @@
|
|||
github "sparkle-project/Sparkle" ~> 1.22
|
||||
binary "https://sparkle-project.org/Carthage/Sparkle.json"
|
||||
github "MacPass/TransformerKit" "a8b5bb73cc327ec6798569b865c32fec5eb2289f"
|
||||
github "MacPass/KeePassKit" ~> 3.2.0
|
||||
github "mstarke/HNHUi" ~> 6.0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
binary "https://sparkle-project.org/Carthage/Sparkle.json" "2.3.0"
|
||||
github "MacPass/KeePassKit" "3.2.1"
|
||||
github "MacPass/KissXML" "933f04fe5ad95c2be07ec0c2f801e140007f20fa"
|
||||
github "MacPass/TransformerKit" "a8b5bb73cc327ec6798569b865c32fec5eb2289f"
|
||||
github "mstarke/HNHUi" "6.0"
|
||||
github "sparkle-project/Sparkle" "1.27.1"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15702" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21225" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15702"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21225"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
|
@ -16,10 +16,10 @@
|
|||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="400" height="95"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="400" height="94"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="500" translatesAutoresizingMaskIntoConstraints="NO" id="Z6x-oU-NC5">
|
||||
<rect key="frame" x="22" y="59" width="221" height="18"/>
|
||||
<rect key="frame" x="22" y="59" width="225" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14" id="ppB-Ka-SVN"/>
|
||||
</constraints>
|
||||
|
@ -29,10 +29,10 @@
|
|||
</buttonCell>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pWJ-eJ-MBf">
|
||||
<rect key="frame" x="144" y="17" width="114" height="25"/>
|
||||
<rect key="frame" x="143" y="16" width="115" height="25"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="Hl5-gO-B1c">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" title="OtherViews" id="RKd-H8-eCF">
|
||||
<items>
|
||||
<menuItem title="every Hour" tag="3600" id="DjF-1I-6Nq"/>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
APPKIT_EXTERN NSString *const MPDidChangeStoredKeyFilesSettings;
|
||||
|
||||
@class MPEntryContextMenuDelegate;
|
||||
@class SPUUpdater;
|
||||
|
||||
@interface MPAppDelegate : NSObject <NSApplicationDelegate, NSMenuDelegate>
|
||||
|
||||
|
@ -36,6 +37,7 @@ APPKIT_EXTERN NSString *const MPDidChangeStoredKeyFilesSettings;
|
|||
@property (strong) IBOutlet NSMenu *exportMenu;
|
||||
|
||||
@property (strong, readonly) MPEntryContextMenuDelegate *itemActionMenuDelegate;
|
||||
@property (strong, readonly) SPUUpdater *updater;
|
||||
@property (readonly) BOOL isTerminating;
|
||||
|
||||
@property (nonatomic) BOOL isAllowedToStoreKeyFile;
|
||||
|
|
|
@ -67,6 +67,7 @@ typedef NS_OPTIONS(NSInteger, MPAppStartupState) {
|
|||
}
|
||||
|
||||
@property (strong) NSWindow *welcomeWindow;
|
||||
@property (strong) SPUUpdater *updater;
|
||||
@property (strong) IBOutlet NSWindow *passwordCreatorWindow;
|
||||
@property (strong, nonatomic) MPPreferencesWindowController *preferencesController;
|
||||
@property (strong, nonatomic) MPPasswordCreatorViewController *passwordCreatorController;
|
||||
|
@ -217,11 +218,13 @@ typedef NS_OPTIONS(NSInteger, MPAppStartupState) {
|
|||
[MPPluginHost sharedHost];
|
||||
#if !defined(DEBUG) && !defined(NO_SPARKLE)
|
||||
/* Disable updates if in debug or nosparkle */
|
||||
[SUUpdater sharedUpdater];
|
||||
SPUStandardUserDriver *userDriver = [[SPUStandardUserDriver alloc] initWithHostBundle:NSBundle.mainBundle delegate:nil];
|
||||
self.updater = [[SPUUpdater alloc] initWithHostBundle:NSBundle.mainBundle applicationBundle:NSBundle.mainBundle userDriver:userDriver delegate:nil];
|
||||
[self.updater startUpdater:nil];
|
||||
#endif
|
||||
self.startupState |= MPAppStartupStateFinishedLaunch;
|
||||
// Here we just opt-in for allowing our bar to be customized throughout the app.
|
||||
NSApplication.sharedApplication.automaticCustomizeTouchBarMenuItemEnabled = YES;
|
||||
NSApplication.sharedApplication.automaticCustomizeTouchBarMenuItemEnabled = YES;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
@ -364,7 +367,7 @@ typedef NS_OPTIONS(NSInteger, MPAppStartupState) {
|
|||
[alert addButtonWithTitle:NSLocalizedString(@"OK", @"Ok Button to dismiss disabled updates alert")];
|
||||
[alert runModal];
|
||||
#else
|
||||
[[SUUpdater sharedUpdater] checkForUpdates:sender];
|
||||
[self.updater checkForUpdates];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
//
|
||||
|
||||
#import "MPUpdatePreferencesController.h"
|
||||
#import "MPAppDelegate.h"
|
||||
|
||||
#import "NSApplication+MPAdditions.h"
|
||||
|
||||
#import <Sparkle/Sparkle.h>
|
||||
|
||||
@interface MPUpdatePreferencesController ()
|
||||
|
@ -53,9 +57,10 @@
|
|||
self.checkIntervallPopupButton.enabled = NO;
|
||||
self.automaticallyCheckForUpdatesCheckButton.enabled = NO;
|
||||
#else
|
||||
[self.checkIntervallPopupButton bind:NSSelectedTagBinding toObject:[SUUpdater sharedUpdater] withKeyPath:NSStringFromSelector(@selector(updateCheckInterval)) options:nil];
|
||||
[self.checkIntervallPopupButton bind:NSEnabledBinding toObject:[SUUpdater sharedUpdater] withKeyPath:NSStringFromSelector(@selector(automaticallyChecksForUpdates)) options:nil];
|
||||
[self.automaticallyCheckForUpdatesCheckButton bind:NSValueBinding toObject:[SUUpdater sharedUpdater] withKeyPath:NSStringFromSelector(@selector(automaticallyChecksForUpdates)) options:nil];
|
||||
SPUUpdater *updater = NSApplication.sharedApplication.mp_delegate.updater;
|
||||
[self.checkIntervallPopupButton bind:NSSelectedTagBinding toObject:updater withKeyPath:NSStringFromSelector(@selector(updateCheckInterval)) options:nil];
|
||||
[self.checkIntervallPopupButton bind:NSEnabledBinding toObject:updater withKeyPath:NSStringFromSelector(@selector(automaticallyChecksForUpdates)) options:nil];
|
||||
[self.automaticallyCheckForUpdatesCheckButton bind:NSValueBinding toObject:updater withKeyPath:NSStringFromSelector(@selector(automaticallyChecksForUpdates)) options:nil];
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue