Skip to content

Commit

Permalink
Merge pull request #678 from Sequel-Ace/keychainImprovements
Browse files Browse the repository at this point in the history
Keychain improvements and safety checks #fixed
  • Loading branch information
Kaspik committed Dec 23, 2020
2 parents ab1e3ea + 774aad5 commit 4c3f1a8
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 212 deletions.
Expand Up @@ -830,19 +830,19 @@ - (void)updateFavoriteSelection:(id)sender

// Clear the keychain referral items as appropriate
[self setConnectionKeychainID:nil];





SPTreeNode *node = [self selectedFavoriteNode];
if ([node isGroup]) node = nil;

// Update key-value properties from the selected favourite, using empty strings where not found
NSDictionary *fav = [[node representedObject] nodeFavorite];

// Don't prefill anything if we are not using favorite
if (!fav) {
return;
}

// Keep a copy of the favorite as it currently stands

currentFavorite = [fav copy];

[connectionResizeContainer setHidden:NO];
Expand Down Expand Up @@ -926,8 +926,6 @@ - (void)updateFavoriteSelection:(id)sender

if (![[self password] length]) {
[self setPassword:nil];


}

// Store the selected favorite ID for use with the document on connection
Expand All @@ -941,8 +939,6 @@ - (void)updateFavoriteSelection:(id)sender

if (![[self sshPassword] length]) {
[self setSshPassword:nil];


}

[prefs setInteger:[[fav objectForKey:SPFavoriteIDKey] integerValue] forKey:SPLastFavoriteID];
Expand Down
1 change: 0 additions & 1 deletion Source/Controllers/SPAppController.m
Expand Up @@ -48,7 +48,6 @@
#import "SPBundleCommandRunner.h"
#import "SPCopyTable.h"
#import "SPSyntaxParser.h"
#import "SPOSInfo.h"
#import "SPTextView.h"
#import <PSMTabBar/PSMTabBarControl.h>
#import "SPFunctions.h"
Expand Down
Expand Up @@ -35,7 +35,6 @@
#import "RegexKitLite.h"
#import "MGTemplateEngine.h"
#import "ICUTemplateMatcher.h"
#import "SPOSInfo.h"

typedef NS_ENUM(NSInteger, HelpVersionNumber) {
MySQLVer56 = 11,
Expand Down
Expand Up @@ -31,7 +31,6 @@

#import "SPHelpViewerController.h"

#import "SPOSInfo.h"
#import <WebKit/WebKit.h>
#import "sequel-ace-Swift.h"

Expand Down
1 change: 0 additions & 1 deletion Source/Controllers/SubviewControllers/SPAboutController.m
Expand Up @@ -29,7 +29,6 @@
// More info at <https://github.com/sequelpro/sequelpro>

#import "SPAboutController.h"
#import "SPOSInfo.h"

static NSString *SPSnapshotBuildIndicator = @"Beta";

Expand Down
3 changes: 1 addition & 2 deletions Source/Model/SPTooltip.m
Expand Up @@ -57,7 +57,6 @@
// See more possible syntaxa in SPTooltip to init a tooltip

#import "SPTooltip.h"
#import "SPOSInfo.h"

#include <tgmath.h>

Expand Down Expand Up @@ -332,7 +331,7 @@ - (void)setContent:(NSString *)content withOptions:(NSDictionary *)displayOption
@"<body>%@</body>"
@"</html>";

NSString *tooltipColor = ([SPOSInfo isOSVersionAtLeastMajor:10 minor:10 patch:0])? @"#F0F0F0" : @"#F9FBC5";
NSString *tooltipColor = @"#F0F0F0";
NSString *bgColor = ([displayOptions objectForKey:@"backgroundcolor"]) ? [displayOptions objectForKey:@"backgroundcolor"] : tooltipColor;
BOOL isTransparent = ([displayOptions objectForKey:@"transparent"]) ? YES : NO;

Expand Down
50 changes: 0 additions & 50 deletions Source/Other/DebuggingSupport/SPOSInfo.h

This file was deleted.

67 changes: 0 additions & 67 deletions Source/Other/DebuggingSupport/SPOSInfo.m

This file was deleted.

9 changes: 9 additions & 0 deletions Source/Other/Extensions/NSImageExtensions.swift
@@ -0,0 +1,9 @@
//
// NSImageExtensions.swift
// Sequel Ace
//
// Created by Jakub Kašpar on 23.12.2020.
// Copyright © 2020 Sequel-Ace. All rights reserved.
//

import Foundation

0 comments on commit 4c3f1a8

Please sign in to comment.