Skip to content

Commit 05ef15a

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents a9da583 + 5df58b0 commit 05ef15a

File tree

455 files changed

+766
-105375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

455 files changed

+766
-105375
lines changed

PGBookmarkController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ - (void)_updateMenuItemForBookmark:(PGBookmark *)aBookmark
162162
NSMutableAttributedString *const title = [[[NSMutableAttributedString alloc] init] autorelease];
163163
[title appendAttributedString:[[aBookmark documentIdentifier] attributedStringWithAncestory:NO]];
164164
if(!PGEqualObjects([aBookmark documentIdentifier], [aBookmark fileIdentifier])) {
165-
[[title mutableString] appendFormat:@" %d ", 0x25B8];
165+
[[title mutableString] appendFormat:@" %C ", (unichar)0x25B8];
166166
[title appendAttributedString:[[aBookmark fileIdentifier] attributedStringWithAncestory:NO]];
167167
}
168168
[item setAttributedTitle:title];

PGDisplayController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ - (void)_updateInfoPanelText
912912
if(node) {
913913
text = [[node identifier] displayName];
914914
PGNode *const parent = [node parentNode];
915-
if([parent parentNode]) text = [NSString stringWithFormat:@"%@ %d %@", [[parent identifier] displayName], 0x25B8, text];
915+
if([parent parentNode]) text = [NSString stringWithFormat:@"%@ %C %@", [[parent identifier] displayName], (unichar)0x25B8, text];
916916
} else text = NSLocalizedString(@"No image", @"Label for when no image is being displayed in the window.");
917917
[[_infoPanel content] setStringValue:text];
918918
}

PGDocumentController.h

-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ typedef NSUInteger PGImageScaleConstraint;
8585
IBOutlet NSMenuItem *selectPreviousDocument;
8686
IBOutlet NSMenuItem *selectNextDocument;
8787

88-
NSTimer *_updateTimer;
8988
NSArray *_recentDocumentIdentifiers;
9089
BOOL _fullscreen;
9190

@@ -104,7 +103,6 @@ typedef NSUInteger PGImageScaleConstraint;
104103
+ (PGDocumentController *)sharedDocumentController;
105104

106105
- (IBAction)orderFrontStandardAboutPanel:(id)sender;
107-
- (IBAction)installUpdate:(id)sender;
108106
- (IBAction)showPreferences:(id)sender;
109107
- (IBAction)switchToFileManager:(id)sender;
110108

PGDocumentController.m

+2-57
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#import <Carbon/Carbon.h>
2727
#import <sys/resource.h>
2828
#import <objc/Protocol.h>
29-
#import "Sparkle/Sparkle.h"
3029
#import <tgmath.h>
3130

3231
// Models
@@ -73,10 +72,6 @@
7372
static NSString *const PGRecentItemsDeprecatedKey = @"PGRecentDocuments"; // Deprecated after 1.2.2.
7473
static NSString *const PGFullscreenKey = @"PGFullscreen";
7574

76-
static NSString *const PGCheckForUpdatesKey = @"PGCheckForUpdates";
77-
static NSString *const PGUpdateAvailableKey = @"PGUpdateAvailable";
78-
static NSString *const PGNextUpdateCheckDateKey = @"PGNextUpdateCheckDate";
79-
8075
static NSString *const PGPathFinderApplicationName = @"Path Finder";
8176

8277
static PGDocumentController *PGSharedDocumentController = nil;
@@ -86,8 +81,6 @@ @interface PGDocumentController(Private)
8681
- (void)_awakeAfterLocalizing;
8782
- (void)_setFullscreen:(BOOL)flag;
8883
- (PGDocument *)_openNew:(BOOL)flag document:(PGDocument *)document display:(BOOL)display;
89-
- (void)_scheduleNextUpdateCheckWithDate:(NSDate *)date;
90-
- (void)_checkForUpdates;
9184

9285
@end
9386

@@ -118,8 +111,6 @@ + (void)initialize
118111
no, PGDimOtherScreensKey,
119112
[NSNumber numberWithInteger:PGEndLocation], PGBackwardsInitialLocationKey,
120113
[NSNumber numberWithUnsignedInteger:PGScaleFreely], PGImageScaleConstraintKey,
121-
yes, PGCheckForUpdatesKey,
122-
no, PGUpdateAvailableKey,
123114
nil]];
124115
}
125116

@@ -129,10 +120,6 @@ - (IBAction)orderFrontStandardAboutPanel:(id)sender
129120
{
130121
[[PGAboutBoxController sharedAboutBoxController] showWindow:self];
131122
}
132-
- (IBAction)installUpdate:(id)sender
133-
{
134-
[[SUUpdater sharedUpdater] checkForUpdates:sender]; // We validate this menu item specially but its behavior can just use the normal Sparkle mechanism.
135-
}
136123
- (IBAction)showPreferences:(id)sender
137124
{
138125
[[PGPreferenceWindowController sharedPrefController] showWindow:self];
@@ -444,21 +431,6 @@ - (PGDocument *)_openNew:(BOOL)flag document:(PGDocument *)document display:(BOO
444431
if(display) [document createUI];
445432
return document;
446433
}
447-
- (void)_scheduleNextUpdateCheckWithDate:(NSDate *)date
448-
{
449-
if(![[NSUserDefaults standardUserDefaults] boolForKey:PGCheckForUpdatesKey]) return;
450-
NSDate *const d = date ? date : [NSDate dateWithTimeIntervalSinceNow:604800.0f];
451-
[[NSUserDefaults standardUserDefaults] setObject:d forKey:PGNextUpdateCheckDateKey];
452-
[_updateTimer invalidate];
453-
[_updateTimer release];
454-
_updateTimer = [[self PG_performSelector:@selector(_checkForUpdates) withObject:nil fireDate:d interval:0.0f options:PGRetainTarget] retain];
455-
}
456-
- (void)_checkForUpdates
457-
{
458-
if(![[NSUserDefaults standardUserDefaults] boolForKey:PGCheckForUpdatesKey]) return;
459-
[[SUUpdater sharedUpdater] checkForUpdateInformation];
460-
[self _scheduleNextUpdateCheckWithDate:nil];
461-
}
462434

463435
#pragma mark -NSResponder
464436

@@ -501,13 +473,6 @@ - (id)init
501473
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleAppleEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL];
502474
[self setNextResponder:[NSApp nextResponder]];
503475
[NSApp setNextResponder:self];
504-
505-
NSDate *updateDate = [[NSUserDefaults standardUserDefaults] objectForKey:PGNextUpdateCheckDateKey];
506-
if(updateDate && [updateDate earlierDate:[NSDate date]] == updateDate) {
507-
[self _checkForUpdates];
508-
updateDate = nil;
509-
}
510-
[self _scheduleNextUpdateCheckWithDate:updateDate];
511476
}
512477
}
513478
return self;
@@ -518,8 +483,6 @@ - (void)dealloc
518483
[self PG_removeObserver];
519484
[defaultPageMenu release];
520485
[windowsMenuSeparator release];
521-
[_updateTimer invalidate];
522-
[_updateTimer release];
523486
[_recentDocumentIdentifiers release];
524487
[_documents release];
525488
[_fullscreenController release];
@@ -537,9 +500,6 @@ - (BOOL)validateMenuItem:(NSMenuItem *)anItem
537500
SEL const action = [anItem action];
538501

539502
// Sequential:
540-
if(@selector(installUpdate:) == action) {
541-
[anItem setTitle:[[NSUserDefaults standardUserDefaults] boolForKey:PGUpdateAvailableKey] ? NSLocalizedString(@"Install Update...", @"Update menu item title. One of two states.") : NSLocalizedString(@"Check for Updates...", @"Update menu item title. One of two states.")];
542-
}
543503
if(@selector(switchToFileManager:) == action) [anItem setTitle:NSLocalizedString((self.pathFinderRunning ? @"Switch to Path Finder" : @"Switch to Finder"), @"Switch to Finder or Path Finder (www.cocoatech.com). Two states of the same item.")];
544504

545505
// Window:
@@ -571,9 +531,9 @@ - (void)awakeFromNib
571531
[scaleSlider setMinValue:log2(PGScaleMin)];
572532
[scaleSlider setMaxValue:log2(PGScaleMax)];
573533

574-
[selectPreviousDocument setKeyEquivalent:[NSString stringWithFormat:@"%d", 0x21E1]];
534+
[selectPreviousDocument setKeyEquivalent:[NSString stringWithFormat:@"%C", (unichar)0x21E1]];
575535
[selectPreviousDocument setKeyEquivalentModifierMask:NSCommandKeyMask];
576-
[selectNextDocument setKeyEquivalent:[NSString stringWithFormat:@"%d", 0x21E3]];
536+
[selectNextDocument setKeyEquivalent:[NSString stringWithFormat:@"%C", (unichar)0x21E3]];
577537
[selectNextDocument setKeyEquivalentModifierMask:NSCommandKeyMask];
578538

579539
[self _setFullscreen:_fullscreen];
@@ -582,21 +542,6 @@ - (void)awakeFromNib
582542
[self performSelector:@selector(_awakeAfterLocalizing) withObject:nil afterDelay:0.0f inModes:[NSArray arrayWithObject:(NSString *)kCFRunLoopCommonModes]];
583543
}
584544

585-
#pragma mark -NSObject(SUUpdaterDelegateInformalProtocol)
586-
587-
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update
588-
{
589-
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:PGUpdateAvailableKey];
590-
}
591-
- (void)updaterDidNotFindUpdate:(SUUpdater *)update
592-
{
593-
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:PGUpdateAvailableKey];
594-
}
595-
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update
596-
{
597-
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:PGUpdateAvailableKey];
598-
}
599-
600545
#pragma mark -<NSApplicationDelegate>
601546

602547
- (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename

0 commit comments

Comments
 (0)