Revision: 6346
http://skim-app.svn.sourceforge.net/skim-app/?rev=6346&view=rev
Author: hofman
Date: 2010-03-20 13:24:40 +0000 (Sat, 20 Mar 2010)
Log Message:
-----------
superclass for preference panes, implement some properties in individual
subclasses, instantiate them in the main nib
Modified Paths:
--------------
trunk/Dutch.lproj/Localizable.strings
trunk/English.lproj/Localizable.strings
trunk/French.lproj/Localizable.strings
trunk/German.lproj/Localizable.strings
trunk/Italian.lproj/Localizable.strings
trunk/PreferenceWindow.xib
trunk/SKDisplayPreferences.h
trunk/SKDisplayPreferences.m
trunk/SKGeneralPreferences.h
trunk/SKGeneralPreferences.m
trunk/SKNotesPreferences.h
trunk/SKNotesPreferences.m
trunk/SKPreferenceController.h
trunk/SKPreferenceController.m
trunk/SKSyncPreferences.h
trunk/SKSyncPreferences.m
trunk/Skim.xcodeproj/project.pbxproj
trunk/Spanish.lproj/Localizable.strings
trunk/ru.lproj/Localizable.strings
trunk/zh_TW.lproj/Localizable.strings
Added Paths:
-----------
trunk/SKPreferencePane.h
trunk/SKPreferencePane.m
Modified: trunk/Dutch.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/English.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/French.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/German.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/Italian.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/PreferenceWindow.xib
===================================================================
--- trunk/PreferenceWindow.xib 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/PreferenceWindow.xib 2010-03-20 13:24:40 UTC (rev 6346)
@@ -12,7 +12,6 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="5"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -51,7 +50,7 @@
<string
key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<string key="NSWindowContentMinSize">{213,
107}</string>
<object class="NSView" key="NSWindowView"
id="927475153">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray"
key="NSSubviews">
<bool
key="EncodedWithXMLCoder">YES</bool>
@@ -114,7 +113,6 @@
</object>
</object>
<string key="NSFrameSize">{533,
566}</string>
- <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440,
878}}</string>
<string key="NSMinSize">{213, 129}</string>
@@ -123,6 +121,13 @@
<object class="NSCustomObject" id="921399283">
<string key="NSClassName">SKIBArray</string>
</object>
+ <object class="NSCustomObject" id="1054735158">
+ <string key="NSClassName">SKIBArray</string>
+ </object>
+ <object class="NSViewController" id="789933998"/>
+ <object class="NSViewController" id="726895119"/>
+ <object class="NSViewController" id="713526303"/>
+ <object class="NSViewController" id="171505078"/>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
@@ -199,6 +204,46 @@
</object>
<int key="connectionID">1660</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection"
key="connection">
+ <string
key="label">object1</string>
+ <reference key="source"
ref="1054735158"/>
+ <reference key="destination"
ref="789933998"/>
+ </object>
+ <int key="connectionID">1668</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection"
key="connection">
+ <string
key="label">object2</string>
+ <reference key="source"
ref="1054735158"/>
+ <reference key="destination"
ref="726895119"/>
+ </object>
+ <int key="connectionID">1669</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection"
key="connection">
+ <string
key="label">object3</string>
+ <reference key="source"
ref="1054735158"/>
+ <reference key="destination"
ref="713526303"/>
+ </object>
+ <int key="connectionID">1670</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection"
key="connection">
+ <string
key="label">object4</string>
+ <reference key="source"
ref="1054735158"/>
+ <reference key="destination"
ref="171505078"/>
+ </object>
+ <int key="connectionID">1671</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection"
key="connection">
+ <string
key="label">preferencePanes</string>
+ <reference key="source"
ref="298295156"/>
+ <reference key="destination"
ref="1054735158"/>
+ </object>
+ <int key="connectionID">1672</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -287,6 +332,32 @@
<reference key="parent"
ref="0"/>
<string key="objectName">Reset
Buttons</string>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1661</int>
+ <reference key="object"
ref="789933998"/>
+ <reference key="parent"
ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1662</int>
+ <reference key="object"
ref="726895119"/>
+ <reference key="parent"
ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1663</int>
+ <reference key="object"
ref="713526303"/>
+ <reference key="parent"
ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1664</int>
+ <reference key="object"
ref="171505078"/>
+ <reference key="parent"
ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1665</int>
+ <reference key="object"
ref="1054735158"/>
+ <reference key="parent"
ref="0"/>
+ <string
key="objectName">Preference Panes</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary"
key="flattenedProperties">
@@ -298,7 +369,14 @@
<string>1648.IBPluginDependency</string>
<string>1649.IBPluginDependency</string>
<string>1652.IBPluginDependency</string>
- <string>1657.IBPluginDependency</string>
+ <string>1661.CustomClassName</string>
+ <string>1661.IBPluginDependency</string>
+ <string>1662.CustomClassName</string>
+ <string>1662.IBPluginDependency</string>
+ <string>1663.CustomClassName</string>
+ <string>1663.IBPluginDependency</string>
+ <string>1664.CustomClassName</string>
+ <string>1664.IBPluginDependency</string>
<string>491.IBAttributePlaceholdersKey</string>
<string>491.IBPluginDependency</string>
<string>491.ImportedFromIB2</string>
@@ -321,7 +399,14 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>SKGeneralPreferences</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>SKDisplayPreferences</string>
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>SKNotesPreferences</string>
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>SKSyncPreferences</string>
+
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
<string
key="NS.key.0">ToolTip</string>
<object
class="IBToolTipAttribute" key="NS.object.0">
@@ -368,7 +453,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">1660</int>
+ <int key="maxID">1672</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray"
key="referencedPartialClassDescriptions">
@@ -622,6 +707,95 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">SKDisplayPreferences</string>
+ <string
key="superclassName">SKPreferencePane</string>
+ <object class="NSMutableDictionary"
key="actions">
+ <string
key="NS.key.0">changeDiscreteThumbnailSizes:</string>
+ <string
key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary"
key="outlets">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray"
key="dict.sortedKeys">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+
<string>antiAliasCheckButton</string>
+
<string>colorControls</string>
+
<string>colorLabels</string>
+
<string>fullScreenBackgroundColorLabelField</string>
+
<string>fullScreenBackgroundColorWell</string>
+
<string>greekingLabelField</string>
+
<string>greekingTextField</string>
+
<string>searchHighlightCheckButton</string>
+
<string>searchHighlightColorWell</string>
+
<string>tableFontComboBox</string>
+
<string>tableFontLabelField</string>
+
<string>thumbnailSizeControls</string>
+
<string>thumbnailSizeLabels</string>
+ </object>
+ <object class="NSMutableArray"
key="dict.values">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+
<string>NSButton</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+
<string>NSTextField</string>
+
<string>NSColorWell</string>
+
<string>NSTextField</string>
+
<string>NSTextField</string>
+
<string>NSButton</string>
+
<string>NSColorWell</string>
+
<string>NSComboBox</string>
+
<string>NSTextField</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ </object>
+ </object>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBProjectSource</string>
+ <string
key="minorKey">SKDisplayPreferences.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string
key="className">SKGeneralPreferences</string>
+ <string
key="superclassName">SKPreferencePane</string>
+ <object class="NSMutableDictionary"
key="actions">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray"
key="dict.sortedKeys">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+
<string>revertFullScreenPDFViewSettings:</string>
+
<string>revertPDFViewSettings:</string>
+ </object>
+ <object class="NSMutableArray"
key="dict.values">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary"
key="outlets">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray"
key="dict.sortedKeys">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+
<string>openFilesLabelField</string>
+
<string>openFilesMatrix</string>
+
<string>revertPDFSettingsButtons</string>
+
<string>savePasswordsMatrix</string>
+
<string>updateIntervalLabelField</string>
+
<string>updateIntervalPopUpButton</string>
+ </object>
+ <object class="NSMutableArray"
key="dict.values">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+
<string>NSTextField</string>
+
<string>NSMatrix</string>
+ <string>NSArray</string>
+
<string>NSMatrix</string>
+
<string>NSTextField</string>
+
<string>NSPopUpButton</string>
+ </object>
+ </object>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBProjectSource</string>
+ <string
key="minorKey">SKGeneralPreferences.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string
key="className">SKIBArray</string>
<string
key="superclassName">NSArray</string>
<object class="NSMutableDictionary"
key="outlets">
@@ -649,6 +823,47 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">SKNotesPreferences</string>
+ <string
key="superclassName">SKPreferencePane</string>
+ <object class="NSMutableDictionary"
key="outlets">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray"
key="dict.sortedKeys">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+
<string>colorLabels1</string>
+
<string>colorLabels2</string>
+
<string>colorLabels3</string>
+
<string>colorWells1</string>
+
<string>colorWells2</string>
+
<string>colorWells3</string>
+
<string>fontLabels</string>
+
<string>fontWells</string>
+
<string>lineLabels1</string>
+
<string>lineLabels2</string>
+
<string>lineWells1</string>
+
<string>lineWells2</string>
+ </object>
+ <object class="NSMutableArray"
key="dict.values">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ </object>
+ </object>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBProjectSource</string>
+ <string
key="minorKey">SKNotesPreferences.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string
key="className">SKPreferenceController</string>
<string
key="superclassName">SKWindowController</string>
<object class="NSMutableDictionary"
key="actions">
@@ -673,12 +888,14 @@
<object class="NSArray"
key="dict.sortedKeys">
<bool
key="EncodedWithXMLCoder">YES</bool>
<string>contentView</string>
+
<string>preferencePanes</string>
<string>resetButtons</string>
</object>
<object class="NSMutableArray"
key="dict.values">
<bool
key="EncodedWithXMLCoder">YES</bool>
<string>NSView</string>
-
<string>SKIBArray</string>
+ <string>NSArray</string>
+ <string>NSArray</string>
</object>
</object>
<object
class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -699,6 +916,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">SKPreferencePane</string>
+ <string
key="superclassName">SKViewController</string>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBProjectSource</string>
+ <string
key="minorKey">SKPreferencePane.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string
key="className">SKPreferenceWindow</string>
<string
key="superclassName">NSWindow</string>
<object
class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -707,6 +932,39 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">SKSyncPreferences</string>
+ <string
key="superclassName">SKPreferencePane</string>
+ <object class="NSMutableDictionary"
key="actions">
+ <string
key="NS.key.0">changeTeXEditorPreset:</string>
+ <string
key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary"
key="outlets">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray"
key="dict.sortedKeys">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+
<string>texEditorControls</string>
+
<string>texEditorLabels</string>
+ </object>
+ <object class="NSMutableArray"
key="dict.values">
+ <bool
key="EncodedWithXMLCoder">YES</bool>
+ <string>NSArray</string>
+ <string>NSArray</string>
+ </object>
+ </object>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBProjectSource</string>
+ <string
key="minorKey">SKSyncPreferences.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string
key="className">SKViewController</string>
+ <string
key="superclassName">NSViewController</string>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBProjectSource</string>
+ <string
key="minorKey">SKViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string
key="className">SKWindowController</string>
<string
key="superclassName">NSWindowController</string>
<object
class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -836,6 +1094,22 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">NSColorWell</string>
+ <string
key="superclassName">NSControl</string>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBFrameworkSource</string>
+ <string
key="minorKey">AppKit.framework/Headers/NSColorWell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string
key="className">NSComboBox</string>
+ <string
key="superclassName">NSTextField</string>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBFrameworkSource</string>
+ <string
key="minorKey">AppKit.framework/Headers/NSComboBox.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string
key="className">NSControl</string>
<string
key="superclassName">NSView</string>
<object
class="IBClassDescriptionSource" key="sourceIdentifier" id="934571016">
@@ -852,6 +1126,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">NSMatrix</string>
+ <string
key="superclassName">NSControl</string>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBFrameworkSource</string>
+ <string
key="minorKey">AppKit.framework/Headers/NSMatrix.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSMenu</string>
<string
key="superclassName">NSObject</string>
<object
class="IBClassDescriptionSource" key="sourceIdentifier" id="888686768">
@@ -1175,6 +1457,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">NSPopUpButton</string>
+ <string
key="superclassName">NSButton</string>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBFrameworkSource</string>
+ <string
key="minorKey">AppKit.framework/Headers/NSPopUpButton.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string
key="className">NSResponder</string>
<object
class="IBClassDescriptionSource" key="sourceIdentifier">
<string
key="majorKey">IBFrameworkSource</string>
@@ -1190,6 +1480,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">NSTextField</string>
+ <string
key="superclassName">NSControl</string>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBFrameworkSource</string>
+ <string
key="minorKey">AppKit.framework/Headers/NSTextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSView</string>
<object
class="IBClassDescriptionSource" key="sourceIdentifier">
<string
key="majorKey">IBFrameworkSource</string>
@@ -1216,6 +1514,18 @@
<reference key="sourceIdentifier"
ref="641301298"/>
</object>
<object class="IBPartialClassDescription">
+ <string
key="className">NSViewController</string>
+ <string
key="superclassName">NSResponder</string>
+ <object class="NSMutableDictionary"
key="outlets">
+ <string
key="NS.key.0">view</string>
+ <string
key="NS.object.0">NSView</string>
+ </object>
+ <object
class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string
key="majorKey">IBFrameworkSource</string>
+ <string
key="minorKey">AppKit.framework/Headers/NSViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string
key="className">NSWindow</string>
<object
class="IBClassDescriptionSource" key="sourceIdentifier">
<string
key="majorKey">IBFrameworkSource</string>
Modified: trunk/SKDisplayPreferences.h
===================================================================
--- trunk/SKDisplayPreferences.h 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKDisplayPreferences.h 2010-03-20 13:24:40 UTC (rev 6346)
@@ -37,10 +37,10 @@
*/
#import <Cocoa/Cocoa.h>
-#import "SKViewController.h"
+#import "SKPreferencePane.h"
-...@interface SKDisplayPreferences : SKViewController {
+...@interface SKDisplayPreferences : SKPreferencePane {
IBOutlet NSTextField *tableFontLabelField;
IBOutlet NSComboBox *tableFontComboBox;
IBOutlet NSTextField *greekingLabelField;
Modified: trunk/SKDisplayPreferences.m
===================================================================
--- trunk/SKDisplayPreferences.m 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKDisplayPreferences.m 2010-03-20 13:24:40 UTC (rev 6346)
@@ -65,6 +65,12 @@
#pragma mark Accessors
+- (NSString *)identifier { return @"SKDisplayPreferencesIdentifier"; }
+
+- (NSString *)label { return NSLocalizedString(@"Display", @"Preference pane
label"); }
+
+- (NSImage *)icon { return [NSImage imageNamed:@"DisplayPreferences"]; }
+
- (NSUInteger)countOfSizes {
return sizeof(SKDefaultFontSizes) / sizeof(CGFloat);
}
Modified: trunk/SKGeneralPreferences.h
===================================================================
--- trunk/SKGeneralPreferences.h 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKGeneralPreferences.h 2010-03-20 13:24:40 UTC (rev 6346)
@@ -37,10 +37,10 @@
*/
#import <Cocoa/Cocoa.h>
-#import "SKViewController.h"
+#import "SKPreferencePane.h"
-...@interface SKGeneralPreferences : SKViewController {
+...@interface SKGeneralPreferences : SKPreferencePane {
IBOutlet NSPopUpButton *updateIntervalPopUpButton;
IBOutlet NSArray *revertPDFSettingsButtons;
IBOutlet NSTextField *openFilesLabelField;
@@ -56,6 +56,4 @@
- (IBAction)revertPDFViewSettings:(id)sender;
- (IBAction)revertFullScreenPDFViewSettings:(id)sender;
-- (void)resetSparkleDefaults;
-
@end
Modified: trunk/SKGeneralPreferences.m
===================================================================
--- trunk/SKGeneralPreferences.m 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKGeneralPreferences.m 2010-03-20 13:24:40 UTC (rev 6346)
@@ -90,6 +90,12 @@
#pragma mark Accessors
+- (NSString *)identifier { return @"SKGeneralPreferencesIdentifier"; }
+
+- (NSString *)label { return NSLocalizedString(@"General", @"Preference pane
label"); }
+
+- (NSImage *)icon { return [NSImage imageNamed:@"GeneralPreferences"]; }
+
- (NSInteger)updateInterval {
return updateInterval;
}
@@ -142,7 +148,7 @@
#pragma mark Hooks
-- (void)resetSparkleDefaults {
+- (void)defaultsDidRevert {
NSTimeInterval interval = [[[NSBundle mainBundle]
objectForInfoDictionaryKey:@"SUScheduledCheckInterval"] doubleValue];
[[SUUpdater sharedUpdater] setUpdateCheckInterval:interval];
[[SUUpdater sharedUpdater] setAutomaticallyChecksForUpdates:interval >
0.0];
Modified: trunk/SKNotesPreferences.h
===================================================================
--- trunk/SKNotesPreferences.h 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKNotesPreferences.h 2010-03-20 13:24:40 UTC (rev 6346)
@@ -37,11 +37,11 @@
*/
#import <Cocoa/Cocoa.h>
-#import "SKViewController.h"
+#import "SKPreferencePane.h"
@class SKLineWell, SKFontWell;
-...@interface SKNotesPreferences : SKViewController {
+...@interface SKNotesPreferences : SKPreferencePane {
IBOutlet NSArray *colorLabels1;
IBOutlet NSArray *colorLabels2;
IBOutlet NSArray *colorLabels3;
Modified: trunk/SKNotesPreferences.m
===================================================================
--- trunk/SKNotesPreferences.m 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKNotesPreferences.m 2010-03-20 13:24:40 UTC (rev 6346)
@@ -121,4 +121,12 @@
[fontWell bind:@"textColor" toObject:sudc
withKeyPath:VALUES_KEY_PATH(SKFreeTextNoteFontColorKey) options:options];
}
+#pragma mark Accessors
+
+- (NSString *)identifier { return @"SKNotesPreferencesIdentifier"; }
+
+- (NSString *)label { return NSLocalizedString(@"Notes", @"Preference pane
label"); }
+
+- (NSImage *)icon { return [NSImage imageNamed:@"NotesPreferences"]; }
+
@end
Modified: trunk/SKPreferenceController.h
===================================================================
--- trunk/SKPreferenceController.h 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKPreferenceController.h 2010-03-20 13:24:40 UTC (rev 6346)
@@ -39,10 +39,12 @@
#import <Cocoa/Cocoa.h>
#import "SKWindowController.h"
+...@class SKIBArray;
@interface SKPreferenceController : SKWindowController <NSWindowDelegate,
NSTabViewDelegate> {
IBOutlet NSView *contentView;
IBOutlet NSArray *resetButtons;
+ IBOutlet NSArray *preferencePanes;
NSDictionary *resettableKeys;
NSDictionary *panes;
NSDictionary *toolbarItems;
Modified: trunk/SKPreferenceController.m
===================================================================
--- trunk/SKPreferenceController.m 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKPreferenceController.m 2010-03-20 13:24:40 UTC (rev 6346)
@@ -37,7 +37,7 @@
*/
#import "SKPreferenceController.h"
-#import "SKViewController.h"
+#import "SKPreferencePane.h"
#import "SKGeneralPreferences.h"
#import "SKDisplayPreferences.h"
#import "SKNotesPreferences.h"
@@ -52,13 +52,10 @@
#define SKPreferencesToolbarIdentifier @"SKPreferencesToolbarIdentifier"
-#define SKGeneralPreferencesIdentifier @"SKGeneralPreferencesIdentifier"
-#define SKDisplayPreferencesIdentifier @"SKDisplayPreferencesIdentifier"
-#define SKNotesPreferencesIdentifier @"SKNotesPreferencesIdentifier"
-#define SKSyncPreferencesIdentifier @"SKSyncPreferencesIdentifier"
-
#define SKPreferenceWindowFrameAutosaveName @"SKPreferenceWindow"
+#define IDENTIFIER_KEY @"identifier"
+
@implementation SKPreferenceController
+ (id)sharedPrefenceController {
@@ -92,21 +89,15 @@
SKAutoSizeLeftButtons(resetButtons);
- SKGeneralPreferences *generalPane = [[[SKGeneralPreferences alloc] init]
autorelease];
- SKDisplayPreferences *displayPane = [[[SKDisplayPreferences alloc] init]
autorelease];
- SKNotesPreferences *notesPane = [[[SKNotesPreferences alloc] init]
autorelease];
- SKSyncPreferences *syncPane = [[[SKSyncPreferences alloc] init]
autorelease];
- NSArray *allPanes = [NSArray arrayWithObjects:generalPane, displayPane,
notesPane, syncPane, nil];
- NSArray *paneIDs = [NSArray
arrayWithObjects:SKGeneralPreferencesIdentifier,
SKDisplayPreferencesIdentifier, SKNotesPreferencesIdentifier,
SKSyncPreferencesIdentifier, nil];
- panes = [[NSDictionary alloc] initWithObjects:allPanes forKeys:paneIDs];
+ panes = [[NSDictionary alloc] initWithObjects:preferencePanes
forKeys:[preferencePanes valueForKey:IDENTIFIER_KEY]];
NSSize size = NSZeroSize;
- for (NSViewController *pane in allPanes) {
+ for (SKPreferencePane *pane in preferencePanes) {
NSSize aSize = [[pane view] frame].size;
size.width = fmax(size.width, aSize.width);
size.height = fmax(size.height, aSize.height);
}
- for (NSViewController *pane in allPanes) {
+ for (SKPreferencePane *pane in preferencePanes) {
NSView *view = [pane view];
NSSize aSize = [view frame].size;
aSize.width = size.width;
@@ -117,7 +108,7 @@
frame.size.width = size.width;
[[self window] setFrame:frame display:NO];
- [self selectPaneWithIdentifier:SKGeneralPreferencesIdentifier];
+ [self selectPaneWithIdentifier:[[preferencePanes objectAtIndex:0]
identifier]];
}
- (void)windowDidResignMain:(NSNotification *)notification {
@@ -168,12 +159,13 @@
- (void)resetSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode
contextInfo:(void *)contextInfo {
if (returnCode == NSAlertDefaultReturn) {
NSString *paneID = (NSString *)contextInfo;
- if (paneID)
+ if (paneID) {
[[NSUserDefaultsController sharedUserDefaultsController]
revertToInitialValuesForKeys:[resettableKeys objectForKey:paneID]];
- else
+ [[panes objectForKey:paneID] defaultsDidRevert];
+ } else {
[[NSUserDefaultsController sharedUserDefaultsController]
revertToInitialValues:nil];
- if (paneID == nil || [paneID
isEqualToString:SKGeneralPreferencesIdentifier])
- [(SKGeneralPreferences *)[panes
objectForKey:SKGeneralPreferencesIdentifier] resetSparkleDefaults];
+ [preferencePanes
makeObjectsPerformSelector:@selector(defaultsDidRevert)];
+ }
}
}
@@ -223,7 +215,6 @@
- (void)setupToolbar {
// Create a new toolbar instance, and attach it to our document window
NSToolbar *toolbar = [[[NSToolbar alloc]
initWithIdentifier:SKPreferencesToolbarIdentifier] autorelease];
- NSToolbarItem *item;
NSMutableDictionary *tmpDict = [NSMutableDictionary dictionary];
@@ -232,38 +223,16 @@
[toolbar setVisible:YES];
[toolbar setDelegate:self];
- item = [[NSToolbarItem alloc]
initWithItemIdentifier:SKGeneralPreferencesIdentifier];
- [item setLabel:NSLocalizedString(@"General", @"Toolbar item label")];
- [item setImage:[NSImage imageNamed:@"GeneralPreferences"]];
- [item setTarget:self];
- [item setAction:@selector(selectPane:)];
- [tmpDict setObject:item forKey:SKGeneralPreferencesIdentifier];
- [item release];
+ for (SKPreferencePane *pane in preferencePanes) {
+ NSToolbarItem *item = [[NSToolbarItem alloc]
initWithItemIdentifier:[pane identifier]];
+ [item setLabel:[pane label]];
+ [item setImage:[pane icon]];
+ [item setTarget:self];
+ [item setAction:@selector(selectPane:)];
+ [tmpDict setObject:item forKey:[pane identifier]];
+ [item release];
+ }
- item = [[NSToolbarItem alloc]
initWithItemIdentifier:SKDisplayPreferencesIdentifier];
- [item setLabel:NSLocalizedString(@"Display", @"Toolbar item label")];
- [item setImage:[NSImage imageNamed:@"DisplayPreferences"]];
- [item setTarget:self];
- [item setAction:@selector(selectPane:)];
- [tmpDict setObject:item forKey:SKDisplayPreferencesIdentifier];
- [item release];
-
- item = [[NSToolbarItem alloc]
initWithItemIdentifier:SKNotesPreferencesIdentifier];
- [item setLabel:NSLocalizedString(@"Notes", @"Toolbar item label")];
- [item setImage:[NSImage imageNamed:@"NotesPreferences"]];
- [item setTarget:self];
- [item setAction:@selector(selectPane:)];
- [tmpDict setObject:item forKey:SKNotesPreferencesIdentifier];
- [item release];
-
- item = [[NSToolbarItem alloc]
initWithItemIdentifier:SKSyncPreferencesIdentifier];
- [item setLabel:NSLocalizedString(@"Sync", @"Toolbar item label")];
- [item setImage:[NSImage imageNamed:@"SyncPreferences"]];
- [item setTarget:self];
- [item setAction:@selector(selectPane:)];
- [tmpDict setObject:item forKey:SKSyncPreferencesIdentifier];
- [item release];
-
toolbarItems = [tmpDict copy];
[[self window] setToolbar:toolbar];
@@ -274,7 +243,7 @@
}
- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar {
- return [NSArray arrayWithObjects:SKGeneralPreferencesIdentifier,
SKDisplayPreferencesIdentifier, SKNotesPreferencesIdentifier,
SKSyncPreferencesIdentifier, nil];
+ return [preferencePanes valueForKey:IDENTIFIER_KEY];
}
- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar {
Added: trunk/SKPreferencePane.h
===================================================================
--- trunk/SKPreferencePane.h (rev 0)
+++ trunk/SKPreferencePane.h 2010-03-20 13:24:40 UTC (rev 6346)
@@ -0,0 +1,51 @@
+//
+// SKPreferencePane.h
+// Skim
+//
+// Created by Christiaan on 3/20/10.
+/*
+ This software is Copyright (c) 2010
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "SKViewController.h"
+
+
+...@interface SKPreferencePane : SKViewController
+
+- (NSString *)identifier;
+- (NSString *)label;
+- (NSImage *)icon;
+
+- (void)defaultsDidRevert;
+
+...@end
Added: trunk/SKPreferencePane.m
===================================================================
--- trunk/SKPreferencePane.m (rev 0)
+++ trunk/SKPreferencePane.m 2010-03-20 13:24:40 UTC (rev 6346)
@@ -0,0 +1,61 @@
+//
+// SKPreferencePane.m
+// Skim
+//
+// Created by Christiaan on 3/20/10.
+/*
+ This software is Copyright (c) 2010
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKPreferencePane.h"
+
+
+...@implementation SKPreferencePane
+
+- (NSString *)identifier {
+ [self doesNotRecognizeSelector:_cmd];
+ return nil;
+}
+
+- (NSString *)label {
+ [self doesNotRecognizeSelector:_cmd];
+ return nil;
+}
+
+- (NSImage *)icon {
+ [self doesNotRecognizeSelector:_cmd];
+ return nil;
+}
+
+- (void)defaultsDidRevert {}
+
+...@end
Modified: trunk/SKSyncPreferences.h
===================================================================
--- trunk/SKSyncPreferences.h 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKSyncPreferences.h 2010-03-20 13:24:40 UTC (rev 6346)
@@ -37,15 +37,14 @@
*/
#import <Cocoa/Cocoa.h>
-#import "SKViewController.h"
-#import "SKPreferenceController.h"
+#import "SKPreferencePane.h"
typedef struct _SKTeXEditor {
NSString *name, *command, *arguments;
} SKTeXEditor;
-...@interface SKSyncPreferences : SKViewController {
+...@interface SKSyncPreferences : SKPreferencePane {
IBOutlet NSArray *texEditorLabels;
IBOutlet NSArray *texEditorControls;
BOOL isCustomTeXEditor;
Modified: trunk/SKSyncPreferences.m
===================================================================
--- trunk/SKSyncPreferences.m 2010-03-19 10:15:26 UTC (rev 6345)
+++ trunk/SKSyncPreferences.m 2010-03-20 13:24:40 UTC (rev 6346)
@@ -84,6 +84,12 @@
#pragma mark Accessors
+- (NSString *)identifier { return @"SKSyncPreferencesIdentifier"; }
+
+- (NSString *)label { return NSLocalizedString(@"Sync", @"Preference pane
label"); }
+
+- (NSImage *)icon { return [NSImage imageNamed:@"SyncPreferences"]; }
+
+ (SKTeXEditor)TeXEditorForPreset:(NSString *)name {
NSInteger i = sizeof(SKTeXEditors) / sizeof(SKTeXEditor);
while (i--) {
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2010-03-19 10:15:26 UTC (rev
6345)
+++ trunk/Skim.xcodeproj/project.pbxproj 2010-03-20 13:24:40 UTC (rev
6346)
@@ -36,6 +36,7 @@
8D15AC310486D014006FF6A4 /* SKMainDocument.m in Sources */ =
{isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* SKMainDocument.m */;
settings = {ATTRIBUTES = (); }; };
8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa =
PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings =
{ATTRIBUTES = (); }; };
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ =
{isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */;
};
+ CE01E6A21154FE0B00004111 /* SKPreferencePane.m in Sources */ =
{isa = PBXBuildFile; fileRef = CE01E6A11154FE0B00004111 /* SKPreferencePane.m
*/; };
CE0458310FB6FAB0003CAF5D /* Scroller_Divider.tiff in Resources
*/ = {isa = PBXBuildFile; fileRef = CE04582F0FB6FAB0003CAF5D /*
Scroller_Divider.tiff */; };
CE0458320FB6FAB0003CAF5D /* Scroller_Background.tiff in
Resources */ = {isa = PBXBuildFile; fileRef = CE0458300FB6FAB0003CAF5D /*
Scroller_Background.tiff */; };
CE0463CB0B84D24300C11E4A /* SKApplication.m in Sources */ =
{isa = PBXBuildFile; fileRef = CE0463CA0B84D24300C11E4A /* SKApplication.m */;
};
@@ -484,6 +485,8 @@
45B113BF0B329A7E00DE0660 /* LICENSE */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE;
sourceTree = "<group>"; };
8D15AC360486D014006FF6A4 /* Info.plist */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path =
Info.plist; sourceTree = "<group>"; };
8D15AC370486D014006FF6A4 /* Skim.app */ = {isa =
PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0;
path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ CE01E6A01154FE0B00004111 /* SKPreferencePane.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKPreferencePane.h; sourceTree = "<group>"; };
+ CE01E6A11154FE0B00004111 /* SKPreferencePane.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKPreferencePane.m; sourceTree = "<group>"; };
CE04582F0FB6FAB0003CAF5D /* Scroller_Divider.tiff */ = {isa =
PBXFileReference; lastKnownFileType = image.tiff; path = Scroller_Divider.tiff;
sourceTree = "<group>"; };
CE0458300FB6FAB0003CAF5D /* Scroller_Background.tiff */ = {isa
= PBXFileReference; lastKnownFileType = image.tiff; path =
Scroller_Background.tiff; sourceTree = "<group>"; };
CE0463C90B84D24300C11E4A /* SKApplication.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKApplication.h; sourceTree = "<group>"; };
@@ -1481,6 +1484,8 @@
CEF60CF8114C08350074ACC4 /* SKViewController.m
*/,
CEF60CF0114C07D90074ACC4 /*
SKWindowController.h */,
CEF60CF1114C07D90074ACC4 /*
SKWindowController.m */,
+ CE01E6A01154FE0B00004111 /* SKPreferencePane.h
*/,
+ CE01E6A11154FE0B00004111 /* SKPreferencePane.m
*/,
CEF60F26114C53B40074ACC4 /*
SKGeneralPreferences.h */,
CEF60F27114C53B40074ACC4 /*
SKGeneralPreferences.m */,
CEF60F2A114C53DC0074ACC4 /*
SKDisplayPreferences.h */,
@@ -2429,6 +2434,7 @@
CEF60F32114C54360074ACC4 /* SKSyncPreferences.m
in Sources */,
CE0E8651114DBF7000E37F38 /*
SKPreferenceWindow.m in Sources */,
CE121BFB11529D15001D92ED /* SKIBArray.m in
Sources */,
+ CE01E6A21154FE0B00004111 /* SKPreferencePane.m
in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: trunk/Spanish.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/ru.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/zh_TW.lproj/Localizable.strings
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit