Added tab for update settings

Minor fixes to sparkle integration
This commit is contained in:
michael starke
2014-02-04 21:36:11 +01:00
parent 9ba441b002
commit e84bebb4d4
8 changed files with 105 additions and 2 deletions

View File

@@ -10,6 +10,7 @@
#import "MPGeneralSettingsController.h"
#import "MPServerSettingsController.h"
#import "MPWorkflowSettingsController.h"
#import "MPUpdateSettingsController.h"
@interface MPSettingsWindowController () {
NSString *lastIdentifier;
@@ -111,14 +112,17 @@
MPGeneralSettingsController *generalSettingsController = [[MPGeneralSettingsController alloc] init];
MPServerSettingsController *serverSettingsController = [[MPServerSettingsController alloc] init];
MPWorkflowSettingsController *workflowSettingsController = [[MPWorkflowSettingsController alloc] init];
MPUpdateSettingsController *updateSettingsController = [[MPUpdateSettingsController alloc] init];
[self _addSettingsTab:generalSettingsController];
[self _addSettingsTab:serverSettingsController];
[self _addSettingsTab:workflowSettingsController];
[self _addSettingsTab:updateSettingsController];
self.defaultToolbarItems = @[ [generalSettingsController identifier],
[workflowSettingsController identifier],
[serverSettingsController identifier] ];
[serverSettingsController identifier],
[updateSettingsController identifier]];
}

View File

@@ -0,0 +1,14 @@
//
// MPUpdateSettingsController.h
// MacPass
//
// Created by Michael Starke on 04.02.14.
// Copyright (c) 2014 HicknHack Software GmbH. All rights reserved.
//
#import "MPViewController.h"
#import "MPSettingsTab.h"
@interface MPUpdateSettingsController : MPViewController <MPSettingsTab>
@end

View File

@@ -0,0 +1,35 @@
//
// MPUpdateSettingsController.m
// MacPass
//
// Created by Michael Starke on 04.02.14.
// Copyright (c) 2014 HicknHack Software GmbH. All rights reserved.
//
#import "MPUpdateSettingsController.h"
@interface MPUpdateSettingsController ()
@end
@implementation MPUpdateSettingsController
- (instancetype)init {
self = [super initWithNibName:@"UpdateSettings" bundle:nil];
return self;
}
- (NSString *)identifier {
return @"UpdateSettings";
}
- (NSImage *)image {
return [NSImage imageNamed:NSImageNameApplicationIcon];
}
- (NSString *)label {
return NSLocalizedString(@"UPDATE_SETTINGS", @"Update Settings Label");
}
@end

View File

@@ -62,7 +62,7 @@ NSString *const kMPFirefoxBundleId = @"org.mozilla.firefox";
}
- (NSString *)label {
return NSLocalizedString(@"WORKFLOW", "");
return NSLocalizedString(@"WORKFLOW_SETTINGS", "");
}
#pragma mark Actions

View File

@@ -67,6 +67,8 @@
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SUFeedURL</key>
<string>https://raw.github.com/mstarke/MacPassUpdates/master/sparklecast.xml.rss</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment defaultVersion="1080" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="MPUpdateSettingsController">
<connections>
<outlet property="view" destination="1" id="0Ig-r5-x8L"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
<rect key="frame" x="0.0" y="0.0" width="400" height="60"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<button translatesAutoresizingMaskIntoConstraints="NO" id="Z6x-oU-NC5">
<rect key="frame" x="86" y="21" width="228" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Automatically Check for Updates" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="RFg-q1-AwJ">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="Tm5-i7-V4P" name="value" keyPath="automaticallyChecksForUpdates" id="8wg-xJ-C1I"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="centerY" secondItem="Z6x-oU-NC5" secondAttribute="centerY" id="mvv-e0-Q0o"/>
<constraint firstAttribute="centerX" secondItem="Z6x-oU-NC5" secondAttribute="centerX" id="zST-bX-ffK"/>
</constraints>
</customView>
<customObject id="Tm5-i7-V4P" customClass="SUUpdater"/>
</objects>
</document>

Binary file not shown.