Revision: 5230
http://skim-app.svn.sourceforge.net/skim-app/?rev=5230&view=rev
Author: hofman
Date: 2009-03-02 14:35:42 +0000 (Mon, 02 Mar 2009)
Log Message:
-----------
Use new Sparkle version. Set info.plist keys for Sparkle instead of
initializing prefs ourselves. Use action to update update interval popup in
prefs and observer the updater for changes.
Modified Paths:
--------------
trunk/English.lproj/PreferenceWindow.nib/classes.nib
trunk/English.lproj/PreferenceWindow.nib/info.nib
trunk/English.lproj/PreferenceWindow.nib/keyedobjects.nib
trunk/Info.plist
trunk/InitialUserDefaults.plist
trunk/SKPreferenceController.h
trunk/SKPreferenceController.m
trunk/Skim.xcodeproj/project.pbxproj
Modified: trunk/English.lproj/PreferenceWindow.nib/classes.nib
===================================================================
--- trunk/English.lproj/PreferenceWindow.nib/classes.nib 2009-03-02
14:06:26 UTC (rev 5229)
+++ trunk/English.lproj/PreferenceWindow.nib/classes.nib 2009-03-02
14:35:42 UTC (rev 5230)
@@ -13,6 +13,14 @@
<string>NSController</string>
</dict>
<dict>
+ <key>CLASS</key>
+ <string>NSApplication</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSResponder</string>
+ </dict>
+ <dict>
<key>ACTIONS</key>
<dict>
<key>changeAttributes</key>
@@ -66,25 +74,27 @@
<string>SKFontWell</string>
<key>thumbnailSizeSlider</key>
<string>NSSlider</string>
+ <key>updateIntervalPopUpButton</key>
+ <string>NSPopUpButton</string>
</dict>
<key>SUPERCLASS</key>
<string>NSWindowController</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSWindowController</string>
+ <string>NSMenu</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSResponder</string>
+ <string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSMenu</string>
+ <string>NSWindowController</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSObject</string>
+ <string>NSResponder</string>
</dict>
<dict>
<key>ACTIONS</key>
Modified: trunk/English.lproj/PreferenceWindow.nib/info.nib
===================================================================
--- trunk/English.lproj/PreferenceWindow.nib/info.nib 2009-03-02 14:06:26 UTC
(rev 5229)
+++ trunk/English.lproj/PreferenceWindow.nib/info.nib 2009-03-02 14:35:42 UTC
(rev 5230)
@@ -13,7 +13,7 @@
<integer>174</integer>
</array>
<key>IBSystem Version</key>
- <string>9F33</string>
+ <string>9G55</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
Modified: trunk/English.lproj/PreferenceWindow.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/Info.plist
===================================================================
--- trunk/Info.plist 2009-03-02 14:06:26 UTC (rev 5229)
+++ trunk/Info.plist 2009-03-02 14:35:42 UTC (rev 5230)
@@ -487,8 +487,14 @@
</array>
<key>OSAScriptingDefinition</key>
<string>Skim.sdef</string>
+ <key>SUEnableAutomaticChecks</key>
+ <true/>
<key>SUFeedURL</key>
<string>http://skim-app.sourceforge.net/skim.xml</string>
+ <key>SUPublicDSAKeyFile</key>
+ <string>dsa_pub.pem</string>
+ <key>SUScheduledCheckInterval</key>
+ <integer>86400</integer>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
Modified: trunk/InitialUserDefaults.plist
===================================================================
--- trunk/InitialUserDefaults.plist 2009-03-02 14:06:26 UTC (rev 5229)
+++ trunk/InitialUserDefaults.plist 2009-03-02 14:35:42 UTC (rev 5230)
@@ -266,10 +266,6 @@
<false/>
<key>SKAutoCloseDownloadsWindow</key>
<false/>
- <key>SUCheckAtStartup</key>
- <false/>
- <key>SUScheduledCheckInterval</key>
- <integer>86400</integer>
<key>SKShouldSetCreatorCode</key>
<false/>
<key>SKShowStatusBar</key>
Modified: trunk/SKPreferenceController.h
===================================================================
--- trunk/SKPreferenceController.h 2009-03-02 14:06:26 UTC (rev 5229)
+++ trunk/SKPreferenceController.h 2009-03-02 14:35:42 UTC (rev 5230)
@@ -42,6 +42,7 @@
@interface SKPreferenceController : NSWindowController {
IBOutlet NSTabView *tabView;
+ IBOutlet NSPopUpButton *updateIntervalPopUpButton;
IBOutlet NSSlider *thumbnailSizeSlider;
IBOutlet NSSlider *snapshotSizeSlider;
IBOutlet NSPopUpButton *texEditorPopUpButton;
Modified: trunk/SKPreferenceController.m
===================================================================
--- trunk/SKPreferenceController.m 2009-03-02 14:06:26 UTC (rev 5229)
+++ trunk/SKPreferenceController.m 2009-03-02 14:35:42 UTC (rev 5230)
@@ -56,6 +56,7 @@
static NSString *SKPreferenceWindowFrameAutosaveName = @"SKPreferenceWindow";
static void *SKPreferenceWindowDefaultsObservationContext = (void
*)@"SKPreferenceWindowDefaultsObservationContext";
+static void *SKPreferenceWindowUpdaterObservationContext = (void
*)@"SKPreferenceWindowUpdaterObservationContext";
@implementation SKPreferenceController
@@ -79,12 +80,16 @@
sud = [NSUserDefaults standardUserDefaults];
sudc = [NSUserDefaultsController sharedUserDefaultsController];
[sudc addObserver:self forKeys:[NSArray
arrayWithObjects:SKDefaultPDFDisplaySettingsKey,
SKDefaultFullScreenPDFDisplaySettingsKey, nil]
context:SKPreferenceWindowDefaultsObservationContext];
+ [[SUUpdater sharedUpdater] addObserver:self
forKeyPath:@"automaticallyChecksForUpdates" options:0
context:SKPreferenceWindowUpdaterObservationContext];
+ [[SUUpdater sharedUpdater] addObserver:self
forKeyPath:@"updateCheckInterval" options:0
context:SKPreferenceWindowUpdaterObservationContext];
}
return sharedPrefenceController;
}
- (void)dealloc {
[sudc removeObserver:self forKeys:[NSArray
arrayWithObjects:SKDefaultPDFDisplaySettingsKey,
SKDefaultFullScreenPDFDisplaySettingsKey, nil]];
+ [[SUUpdater sharedUpdater] removeObserver:self
forKeyPath:@"automaticallyChecksForUpdates"];
+ [[SUUpdater sharedUpdater] removeObserver:self
forKeyPath:@"updateCheckInterval"];
[resettableKeys release];
[super dealloc];
}
@@ -97,6 +102,24 @@
- (unsigned)retainCount { return UINT_MAX; }
+- (void)updateUpdateIntervalPopUpButton {
+ int tag = 0;
+ if ([[SUUpdater sharedUpdater] automaticallyChecksForUpdates])
+ tag = [[SUUpdater sharedUpdater] updateCheckInterval];
+ if ([updateIntervalPopUpButton selectItemWithTag:tag] == NO) {
+ int i, iMax = [updateIntervalPopUpButton numberOfItems];
+ int itemTag = 0;
+ for (i = 0; i < iMax; i++) {
+ itemTag = [[updateIntervalPopUpButton itemAtIndex:i] tag];
+ if (itemTag >= tag) {
+ [[SUUpdater sharedUpdater] setUpdateCheckInterval:itemTag];
+ return;
+ }
+ }
+ [[SUUpdater sharedUpdater] setUpdateCheckInterval:itemTag];
+ }
+}
+
- (void)updateRevertButtons {
NSDictionary *initialValues = [sudc initialValues];
[revertPDFSettingsButton setEnabled:[[initialValues
objectForKey:SKDefaultPDFDisplaySettingsKey] isEqual:[sud
dictionaryForKey:SKDefaultPDFDisplaySettingsKey]] == NO];
@@ -127,6 +150,8 @@
[self updateRevertButtons];
+ [self updateUpdateIntervalPopUpButton];
+
[textLineWell bind:SKLineWellLineWidthKey toObject:sudc
withKeyPath:VALUES_KEY_PATH(SKFreeTextNoteLineWidthKey) options:nil];
[textLineWell bind:SKLineWellStyleKey toObject:sudc
withKeyPath:VALUES_KEY_PATH(SKFreeTextNoteLineStyleKey) options:nil];
[textLineWell bind:SKLineWellDashPatternKey toObject:sudc
withKeyPath:VALUES_KEY_PATH(SKFreeTextNoteDashPatternKey) options:nil];
@@ -212,8 +237,12 @@
- (IBAction)changeUpdateInterval:(id)sender {
int checkInterval = [[sender selectedItem] tag];
- if (checkInterval)
- [[SUUpdater sharedUpdater] scheduleCheckWithInterval:checkInterval];
+ if (checkInterval > 0) {
+ [[SUUpdater sharedUpdater] setAutomaticallyChecksForUpdates:YES];
+ [[SUUpdater sharedUpdater] setUpdateCheckInterval:checkInterval];
+ } else {
+ [[SUUpdater sharedUpdater] setAutomaticallyChecksForUpdates:NO];
+ }
}
- (IBAction)changeTeXEditorPreset:(id)sender {
@@ -294,6 +323,8 @@
if ([key isEqualToString:SKDefaultPDFDisplaySettingsKey] || [key
isEqualToString:SKDefaultFullScreenPDFDisplaySettingsKey]) {
[self updateRevertButtons];
}
+ } else if (context == SKPreferenceWindowUpdaterObservationContext) {
+ [self updateUpdateIntervalPopUpButton];
} else {
[super observeValueForKeyPath:keyPath ofObject:object change:change
context:context];
}
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2009-03-02 14:06:26 UTC (rev
5229)
+++ trunk/Skim.xcodeproj/project.pbxproj 2009-03-02 14:35:42 UTC (rev
5230)
@@ -340,6 +340,20 @@
remoteGlobalIDString = CEA5F53D0E2CED0E00F65088;
remoteInfo = SkimNotesBase;
};
+ CEB34A900F5C20E60037E086 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = CE2BD8170BD4127A00A5F4DB /*
Sparkle.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = DAAEFC960DA571DF0051E0D0 /*
relaunch */;
+ remoteInfo = "relaunch tool";
+ };
+ CEB34A920F5C20E60037E086 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = CE2BD8170BD4127A00A5F4DB /*
Sparkle.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 612279D90DB5470200AB99EA /*
Sparkle Unit Tests.octest */;
+ remoteInfo = "Sparkle Unit Tests";
+ };
CEC7B4ED0CF607CA008CCD63 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CEC7B4E60CF607CA008CCD63 /*
QuickLook-Skim.xcodeproj */;
@@ -1220,6 +1234,8 @@
children = (
CE2BD8200BD4127A00A5F4DB /* Sparkle.framework
*/,
CE2BD8220BD4127A00A5F4DB /* Sparkle Test
App.app */,
+ CEB34A910F5C20E60037E086 /* relaunch */,
+ CEB34A930F5C20E60037E086 /* Sparkle Unit
Tests.octest */,
);
name = Products;
sourceTree = "<group>";
@@ -1837,6 +1853,20 @@
remoteRef = CEA5F5430E2CED1100F65088 /*
PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ CEB34A910F5C20E60037E086 /* relaunch */ = {
+ isa = PBXReferenceProxy;
+ fileType = "compiled.mach-o.executable";
+ path = relaunch;
+ remoteRef = CEB34A900F5C20E60037E086 /*
PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ CEB34A930F5C20E60037E086 /* Sparkle Unit Tests.octest */ = {
+ isa = PBXReferenceProxy;
+ fileType = wrapper.cfbundle;
+ path = "Sparkle Unit Tests.octest";
+ remoteRef = CEB34A920F5C20E60037E086 /*
PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
CEC7B4EE0CF607CA008CCD63 /* Skim.qlgenerator */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit