mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 12:39:29 +00:00
Displaying dialog when Sparkle is disabled
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
#import "MPTemporaryFileStorageCenter.h"
|
||||
#import "MPValueTransformerHelper.h"
|
||||
|
||||
#import "NSApplication+MPAdditions.h"
|
||||
|
||||
#import "KeePassKit/KeePassKit.h"
|
||||
|
||||
#import <Sparkle/Sparkle.h>
|
||||
@@ -95,7 +97,7 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
||||
- (void)awakeFromNib {
|
||||
_isAllowedToStoreKeyFile = NO;
|
||||
/* Update the … at the save menu */
|
||||
[[self.saveMenuItem menu] setDelegate:self];
|
||||
self.saveMenuItem.menu.delegate = self;
|
||||
|
||||
/* We want to inform anyone about the changes to keyFile remembering */
|
||||
[self bind:NSStringFromSelector(@selector(isAllowedToStoreKeyFile))
|
||||
@@ -160,8 +162,8 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
||||
[MPAutotypeDaemon defaultDaemon];
|
||||
/* Create Plugin Manager */
|
||||
[MPPluginManager sharedManager];
|
||||
#ifdef RELEASE
|
||||
/* Only enabel updater in Release */
|
||||
#ifndef DEBUG
|
||||
/* Only enable updater in Release */
|
||||
[SUUpdater sharedUpdater];
|
||||
#endif
|
||||
}
|
||||
@@ -227,9 +229,19 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
||||
}
|
||||
|
||||
- (void)showHelp:(id)sender {
|
||||
/* TODO: use Info.plist for URL */
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://github.com/mstarke/MacPass"]];
|
||||
}
|
||||
|
||||
- (void)checkForUpdates:(id)sender {
|
||||
#ifdef DEBUG
|
||||
NSAlert *alert = [NSAlert alertWithMessageText:@"Updates are disabled!" defaultButton:@"Ok" alternateButton:nil otherButton:nil informativeTextWithFormat:@"Sparkle updates are only available in offical releases of %@!", NSApp.applicationName];
|
||||
[alert runModal];
|
||||
#else
|
||||
[[SUUpdater sharedUpdater] checkForUpdates:sender];
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Private Helper
|
||||
- (void)_applicationDidFinishRestoringWindows:(NSNotification *)notification {
|
||||
|
||||
Reference in New Issue
Block a user