Skip to content

Commit fa470ee

Browse files
committed
Fixed truncated text on thumbnails. Fixed the disappearing cursor bug. Updated to build using Xcode 14.2.
1 parent 963270e commit fa470ee

File tree

10 files changed

+175
-105
lines changed

10 files changed

+175
-105
lines changed

Controllers/PGPreferenceWindowController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ - (IBAction)changePane:(NSToolbarItem *)sender
8181
- (NSColor *)backgroundPatternColor
8282
{
8383
// NSColor *const color = [[NSUserDefaults standardUserDefaults] PG_decodedObjectForKey:@"PGBackgroundColor"];
84-
NSColor *const color = [[NSUserDefaults standardUserDefaults] PG_decodeObjectOfClass:[NSColor class] forKey:@"PGBackgroundColor"];
84+
NSColor *const color = [[NSUserDefaults standardUserDefaults] PG_decodeObjectOfClass:[NSColor class] forKey:PGBackgroundColorKey];
8585
return [[[NSUserDefaults standardUserDefaults] objectForKey:@"PGBackgroundPattern"] unsignedIntegerValue] == PGCheckerboardPattern ? [color PG_checkerboardPatternColor] : color;
8686
}
8787
- (NSScreen *)displayScreen

History.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2.2.1 (2023-04-30)
2+
- the folder count and size text would not fully display on the thumbnail if the
3+
name displayed above it was short. Fixed.
4+
- the cursor would disappear sometimes. Fixed.
5+
- updated to build using Xcode 14.2.
6+
17
2.2.0 (2022-11-05)
28
- Intel version: requires macOS 10.14 or later (only tested under 10.14;
39
the app might work as far back as 10.6)

Info.plist

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@
641641
<key>CFBundleExecutable</key>
642642
<string>${EXECUTABLE_NAME}</string>
643643
<key>CFBundleGetInfoString</key>
644-
<string>2.2.0</string>
644+
<string>2.2.1</string>
645645
<key>CFBundleHelpBookFolder</key>
646646
<string>Sequential.help</string>
647647
<key>CFBundleHelpBookName</key>
@@ -657,7 +657,7 @@
657657
<key>CFBundlePackageType</key>
658658
<string>APPL</string>
659659
<key>CFBundleShortVersionString</key>
660-
<string>2.2.0</string>
660+
<string>2.2.1</string>
661661
<key>CFBundleSignature</key>
662662
<string>????</string>
663663
<key>CFBundleURLTypes</key>
@@ -674,7 +674,7 @@
674674
</dict>
675675
</array>
676676
<key>CFBundleVersion</key>
677-
<string>2.2.0</string>
677+
<string>2.2.1</string>
678678
<key>LSApplicationCategoryType</key>
679679
<string>public.app-category.utilities</string>
680680
<key>LSArchitecturePriority</key>
@@ -729,15 +729,9 @@
729729
</array>
730730
<key>PGBundleTypeFourCCs</key>
731731
<array>
732-
<data>
733-
UEsDBA==
734-
</data>
735-
<data>
736-
UmFyIQ==
737-
</data>
738-
<data>
739-
N3rCvMKv
740-
</data>
732+
<data>UEsDBA==</data>
733+
<data>UmFyIQ==</data>
734+
<data>N3rCvMKv</data>
741735
</array>
742736
</dict>
743737
<key>PGFlickrAdapter</key>
@@ -920,9 +914,7 @@
920914
</array>
921915
<key>PGBundleTypeFourCC</key>
922916
<array>
923-
<data>
924-
JVBERg==
925-
</data>
917+
<data>JVBERg==</data>
926918
</array>
927919
</dict>
928920
<key>PGResourceAdapter</key>

Models/PGArchiveAdapter.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ - (NSArray *)nodesUnderPath:(NSString *)path
110110
NSUInteger i = [indexes firstIndex];
111111
for(; NSNotFound != i; i = [indexes indexGreaterThanIndex:i]) {
112112
@autoreleasepool { // REQUIRED otherwise the heap blows up (try it on a 50000 entry zip file)
113-
NSString *const entryPath = [_archive nameOfEntry:i];
113+
NSString *const entryPath = [_archive nameOfEntry:(int) i];
114114
if(!entryPath)
115115
continue;
116116

@@ -182,7 +182,7 @@ - (NSArray *)nodesUnderPath:(NSString *)path
182182
#endif
183183

184184
BOOL const isEntrylessFolder = !PGEqualObjects(subpath, entryPath);
185-
BOOL const isFile = !isEntrylessFolder && ![_archive entryIsDirectory:i];
185+
BOOL const isFile = !isEntrylessFolder && ![_archive entryIsDirectory:(int) i];
186186
//NSLog(@"%@\tsubpath '%@', isEntrylessFolder %u, isFile %u", StringAtDepth(depth),
187187
// [subpath substringFromIndex:194], isEntrylessFolder, isFile);
188188

@@ -191,7 +191,7 @@ - (NSArray *)nodesUnderPath:(NSString *)path
191191
[identifier setNaturalDisplayName:[subpath lastPathComponent]];
192192
PGNode *const node = [[[PGNode alloc] initWithParent:parent identifier:identifier] autorelease];
193193
if(isFile)
194-
[node setDataProvider:[[[PGArchiveDataProvider alloc] initWithArchive:_archive entry:i] autorelease]];
194+
[node setDataProvider:[[[PGArchiveDataProvider alloc] initWithArchive:_archive entry:(int) i] autorelease]];
195195
else {
196196
[node setDataProvider:[[[PGFolderDataProvider alloc] init] autorelease]];
197197
if(isEntrylessFolder) {
@@ -505,10 +505,10 @@ - (NSString *)PG_commonRootPath
505505
NSInteger i;
506506
NSString *root = nil;
507507
for(i = 0; i < [self numberOfEntries]; i++) {
508-
NSString *entryName = [self nameOfEntry:i];
508+
NSString *entryName = [self nameOfEntry:(int) i];
509509
if(PG_entryIsInvisibleForName(entryName))//if([self PG_entryIsInvisibleForName:entryName])
510510
continue;
511-
if(![self entryIsDirectory:i]) entryName = [entryName stringByDeletingLastPathComponent];
511+
if(![self entryIsDirectory:(int) i]) entryName = [entryName stringByDeletingLastPathComponent];
512512
else if([entryName hasSuffix:@"/"]) entryName = [entryName substringToIndex:[entryName length] - 1];
513513
if(!root) root = entryName;
514514
else while(!PGEqualObjects(root, entryName)) {
@@ -520,7 +520,7 @@ - (NSString *)PG_commonRootPath
520520
}
521521
- (OSType)PG_OSTypeForEntry:(int)entry
522522
{
523-
return [self entryIsDirectory:entry] ? 'fold' : [[[self attributesOfEntry:entry] objectForKey:NSFileHFSTypeCode] unsignedLongValue];
523+
return [self entryIsDirectory:entry] ? 'fold' : [[[self attributesOfEntry:entry] objectForKey:NSFileHFSTypeCode] unsignedIntValue];
524524
}
525525

526526
@end

Models/PGNode.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ + (NSArray *)pasteboardTypes
7575

7676
+ (void)initialize
7777
{
78-
srandom(time(NULL)); // Used by our shuffle sort.
78+
srandom((unsigned) time(NULL)); // Used by our shuffle sort.
7979
}
8080

8181
#pragma mark -PGNode

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,39 @@
1-
# Sequential 2.2.0 (2022-11-05).
1+
# Sequential 2.2.1 (2023-04-30).
22

3+
Sequential is an image and comic viewer for macOS.
4+
5+
Sequential can displays images in folders, PDF files, and archives of
6+
these formats: ZIP CBZ RAR CBR 7z.
37

48
This is a modernized build of Sequential for Intel and Apple Silicon Macs
59
running 10.14 (Intel) or 11.4 (Apple Silicon) or later.
610

711
The last build came out in 2010 so this program needed some work to get it
8-
working for modern Macs.
12+
to build and run on modern Macs. Several bugs have been fixed and some
13+
feature enhancements have been added.
14+
15+
There are parts of the application which probably won’t work properly
16+
(HTML URLs may not display correctly) and it may have bugs and crashes.
17+
Caveat emptor. For folders, PDFs and archives, the application works well.
918

1019
The codebase (and its dependencies) have been updated to build with Xcode
11-
13.2. Sequential is now built as an Universal app and has been tested on
20+
14.2. Sequential is now built as an Universal app and has been tested on
1221
macOS 10.14 (on an Intel Mac) and macOS 11.7.1 (on an Apple Silicon Mac).
1322

1423

1524

1625

26+
## Source code
27+
28+
The modernized Sequential source code is at <https://github.com/chuchusoft/Sequential>.
29+
1730
The original Sequential source code is at <https://github.com/btrask/Sequential>.
1831

1932

2033

2134

2235

23-
Building instructions
36+
## Building instructions
2437

2538
- decompress the source archive into a folder
2639
- dependencies are included in the source archive
@@ -33,14 +46,14 @@ Building instructions
3346

3447

3548

36-
Distribution instructions
49+
## Distribution instructions
3750

3851
- update the History file
3952

4053
- to create the source backup archive:
4154

4255
% cd ~/folder_containing_sequential_sources
43-
% tar -c -v -J -H -f Sequential_all.tar.xz --exclude=xcuserdata --exclude=.DS_Store Sequential XADMaster UniversalDetector
56+
% tar -c -v -J -H -f Sequential_all.tar.xz --exclude=xcuserdata --exclude=.DS_Store --exclude=.git --exclude=.gitignore --exclude=.gitattributes --exclude=Sequential/docs --exclude=XADMaster/Windows Sequential XADMaster UniversalDetector
4457

4558
- to distribute the built app:
4659

Sequential.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@
576576
2A37F4AEFDCFA73011CA2CEA /* PGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PGDocument.h; sourceTree = "<group>"; };
577577
2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
578578
4BC3A8DC29169EA300BF9C9E /* index.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = index.html; sourceTree = "<group>"; };
579+
4BC3A8EA2916A48B00BF9C9E /* _config.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = _config.yml; sourceTree = "<group>"; };
579580
4BC63F6D291628360099C1FF /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
580581
8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
581582
8D15AC370486D014006FF6A4 /* Sequential.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sequential.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -916,6 +917,7 @@
916917
4B10782F29169DB300AEF257 /* docs */ = {
917918
isa = PBXGroup;
918919
children = (
920+
4BC3A8EA2916A48B00BF9C9E /* _config.yml */,
919921
4BC3A8DC29169EA300BF9C9E /* index.html */,
920922
);
921923
path = docs;

Views/PGClipView.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,21 @@ - (BOOL)handleMouseDown:(NSEvent *)firstEvent
368368
handled = YES;
369369
[NSCursor pop];
370370
if(PGMouseHiddenDraggingStyle) {
371-
#if 0 // 2021/07/21 disabled because it's using deprecated APIs and it's unsure what this is doing
372371
CGAssociateMouseAndMouseCursorPosition(true);
372+
#if 1
373+
// 2022/11/09 this is probably wrong...
374+
// NSPoint const screenPoint = PGPointInRect([[self window] convertBaseToScreen:finalPoint], [[self window] PG_contentRect]);
375+
NSPoint const screenPoint = PGPointInRect([self.window convertPointToScreen:finalPoint], [self.window PG_contentRect]);
376+
CGDisplayMoveCursorToPoint(CGMainDisplayID(), //CGDirectDisplayID display,
377+
CGPointMake(round(screenPoint.x), round(CGDisplayPixelsHigh(kCGDirectMainDisplay) - screenPoint.y)));
378+
#else
379+
// 2021/07/21 disabled because it's using deprecated APIs and it's unsure what this is doing
373380
NXEventHandle const handle = NXOpenEventStatus();
374381
NSPoint const screenPoint = PGPointInRect([[self window] convertBaseToScreen:finalPoint], [[self window] PG_contentRect]);
375382
IOHIDSetMouseLocation((io_connect_t)handle, round(screenPoint.x), round(CGDisplayPixelsHigh(kCGDirectMainDisplay) - screenPoint.y)); // Use this function instead of CGDisplayMoveCursorToPoint() because it doesn't make the mouse lag briefly after being moved.
376383
NXCloseEventStatus(handle);
377-
[NSCursor unhide];
378384
#endif
385+
[NSCursor unhide];
379386
}
380387
dragMode = PGNotDragging;
381388
} else handled = [[self delegate] clipView:self handleMouseEvent:firstEvent first:_firstMouse];

0 commit comments

Comments
 (0)