Skip to content

Commit

Permalink
Fixes issue with encoding menu where there was no good guess.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Rauchfuss committed Sep 23, 2009
1 parent 20c6e79 commit 2dfdcd9
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@
<h2>Page Layout and Display</h2>
</div>
<div id="contents">
Simple Comic allows users to choose how their comics are laid out for viewing. All page layout features can be set in the preferences and then be over-ridden on a per session basis.

<div class="section">
<h3>Single or dual page</h3>
Pages can be laid out as they would be in print, two pages at a time, or singly. In the case of two page layouts Simple Comic recognizes two page spreads and displays them on their own.
<h3>Page layout</h3>
<p>The pages of a comic can be displayed two at a time or singly. Set the default </p>
</div>

<div class="section">
<h3>Page order</h3>
In two page mode the pages are laid out either left to right or right to left.
Navigation in both single and dual page modes is affected by page order.
</div>
<div class="section">
<h3>Page magnification</h3>
<p>Magnifying a page </p>
</div>

<!-- <div class="section">
<h3>Page Scaling</h3>
Expand Down
4 changes: 2 additions & 2 deletions English.lproj/Help/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ <h2>Simple Comic Help</h2>
<dl>
<dt><a href="navigation.html">Navigation</a></dt>
<dd>Moving through a comic</dd>
<!-- <dt><a href="layout.html">Viewing</a></dt>
<dd>Display and layout features</dd> -->
<!-- <dt><a href="display.html">Viewing</a></dt>
<dd>Display and layout features</dd> -->
<dt><a href="preferences.html">Preferences</a></dt>
<dd>Configuring Simple Comic</dd>
<dt><a href="quicklook.html">Quicklook</a></dt>
Expand Down
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
<key>CFBundleSignature</key>
<string>TSST</string>
<key>CFBundleVersion</key>
<string>232</string>
<string>233</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSMainNibFile</key>
Expand Down
53 changes: 12 additions & 41 deletions SimpleComic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@
283C4D6A0C43DE8D00DB4FE9 /* TSSTGradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = 283C4D680C43DE8D00DB4FE9 /* TSSTGradientView.m */; };
283C4E1D0C43E6C300DB4FE9 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 283C4E1A0C43E6C200DB4FE9 /* Sparkle.framework */; };
283C4E3D0C43E6C700DB4FE9 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 283C4E1A0C43E6C200DB4FE9 /* Sparkle.framework */; };
28403538105D960B0007D916 /* Help.helpindex in Resources */ = {isa = PBXBuildFile; fileRef = 28403530105D960B0007D916 /* Help.helpindex */; };
28403539105D960B0007D916 /* help.css in Resources */ = {isa = PBXBuildFile; fileRef = 28403531105D960B0007D916 /* help.css */; };
2840353A105D960B0007D916 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 28403532105D960B0007D916 /* index.html */; };
2840353B105D960B0007D916 /* layout.html in Resources */ = {isa = PBXBuildFile; fileRef = 28403533105D960B0007D916 /* layout.html */; };
2840353C105D960B0007D916 /* navigation.html in Resources */ = {isa = PBXBuildFile; fileRef = 28403534105D960B0007D916 /* navigation.html */; };
2840353D105D960B0007D916 /* preferences.html in Resources */ = {isa = PBXBuildFile; fileRef = 28403535105D960B0007D916 /* preferences.html */; };
2840353E105D960B0007D916 /* quicklook.html in Resources */ = {isa = PBXBuildFile; fileRef = 28403536105D960B0007D916 /* quicklook.html */; };
2840353F105D960B0007D916 /* scicon.png in Resources */ = {isa = PBXBuildFile; fileRef = 28403537105D960B0007D916 /* scicon.png */; };
284348130DA95C4A00F602E2 /* UniversalDetector.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 284348050DA95C4300F602E2 /* UniversalDetector.framework */; };
284348140DA95C4A00F602E2 /* XADMaster.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 284348060DA95C4300F602E2 /* XADMaster.framework */; };
284348CD0DA95C5300F602E2 /* UniversalDetector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284348050DA95C4300F602E2 /* UniversalDetector.framework */; };
Expand Down Expand Up @@ -77,6 +69,7 @@
28C1D5600DF1FE37003392B4 /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28C1D55F0DF1FE37003392B4 /* QuickLook.framework */; };
28C2FA050DEB559000AB5E35 /* Sessions_DataModel.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 28C2FA040DEB559000AB5E35 /* Sessions_DataModel.xcdatamodeld */; };
28EF3FC00E9970BD002AD2EE /* UKXattrMetadataStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 28EF3FBF0E9970BD002AD2EE /* UKXattrMetadataStore.m */; };
28F660461067255600EC8A34 /* Help in Resources */ = {isa = PBXBuildFile; fileRef = 28F6603B1067255600EC8A34 /* Help */; };
28F998340A1FF52C0047BD97 /* TSSTKeyWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 28F998320A1FF52C0047BD97 /* TSSTKeyWindow.m */; };
28FACB850CD01D93007B7918 /* SS_PrefsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28FACB820CD01D93007B7918 /* SS_PrefsController.m */; };
28FACC880CD03C49007B7918 /* AdvancedPrefPaneView.nib in Resources */ = {isa = PBXBuildFile; fileRef = 28FACB950CD01FB8007B7918 /* AdvancedPrefPaneView.nib */; };
Expand Down Expand Up @@ -176,14 +169,6 @@
283C4D7B0C43DF5300DB4FE9 /* TSSTBezelWindow.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = TSSTBezelWindow.m; path = "Custom Windows/Bezel/TSSTBezelWindow.m"; sourceTree = "<group>"; };
283C4D7C0C43DF5300DB4FE9 /* TSSTBezelWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TSSTBezelWindow.h; path = "Custom Windows/Bezel/TSSTBezelWindow.h"; sourceTree = "<group>"; };
283C4E1A0C43E6C200DB4FE9 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = "<group>"; };
28403530105D960B0007D916 /* Help.helpindex */ = {isa = PBXFileReference; lastKnownFileType = file; path = Help.helpindex; sourceTree = "<group>"; };
28403531105D960B0007D916 /* help.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = help.css; sourceTree = "<group>"; };
28403532105D960B0007D916 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = "<group>"; };
28403533105D960B0007D916 /* layout.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = layout.html; sourceTree = "<group>"; };
28403534105D960B0007D916 /* navigation.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = navigation.html; sourceTree = "<group>"; };
28403535105D960B0007D916 /* preferences.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = preferences.html; sourceTree = "<group>"; };
28403536105D960B0007D916 /* quicklook.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = quicklook.html; sourceTree = "<group>"; };
28403537105D960B0007D916 /* scicon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = scicon.png; sourceTree = "<group>"; };
284348050DA95C4300F602E2 /* UniversalDetector.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UniversalDetector.framework; path = Frameworks/UniversalDetector.framework; sourceTree = "<group>"; };
284348060DA95C4300F602E2 /* XADMaster.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XADMaster.framework; path = Frameworks/XADMaster.framework; sourceTree = "<group>"; };
284A53550DEA60E40003F9F4 /* TSSTBookmarkSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSSTBookmarkSplitView.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -269,6 +254,7 @@
28EF3FBF0E9970BD002AD2EE /* UKXattrMetadataStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UKXattrMetadataStore.m; sourceTree = "<group>"; };
28F59A9A0B784892003530FB /* TSSTSortDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSSTSortDescriptor.h; sourceTree = "<group>"; };
28F5A5F00B7E0F8B003530FB /* TSSTPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSSTPage.h; sourceTree = "<group>"; };
28F6603C1067255600EC8A34 /* English */ = {isa = PBXFileReference; lastKnownFileType = folder; name = English; path = English.lproj/Help; sourceTree = "<group>"; };
28F998310A1FF52C0047BD97 /* TSSTKeyWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TSSTKeyWindow.h; path = "Custom Windows/Fullscreen/TSSTKeyWindow.h"; sourceTree = "<group>"; };
28F998320A1FF52C0047BD97 /* TSSTKeyWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TSSTKeyWindow.m; path = "Custom Windows/Fullscreen/TSSTKeyWindow.m"; sourceTree = "<group>"; };
28FA4FA40B8AA28000496668 /* TSSTSessionWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TSSTSessionWindowController.h; path = Session/TSSTSessionWindowController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -431,22 +417,6 @@
path = Helpers;
sourceTree = "<group>";
};
2840352F105D960B0007D916 /* Help */ = {
isa = PBXGroup;
children = (
28403530105D960B0007D916 /* Help.helpindex */,
28403531105D960B0007D916 /* help.css */,
28403532105D960B0007D916 /* index.html */,
28403533105D960B0007D916 /* layout.html */,
28403534105D960B0007D916 /* navigation.html */,
28403535105D960B0007D916 /* preferences.html */,
28403536105D960B0007D916 /* quicklook.html */,
28403537105D960B0007D916 /* scicon.png */,
);
name = Help;
path = English.lproj/Help;
sourceTree = "<group>";
};
28770B670DBA8B1C00A78646 /* Segmented Controls */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -584,7 +554,7 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
2840352F105D960B0007D916 /* Help */,
28F6603B1067255600EC8A34 /* Help */,
288693080FED554E002C6BF7 /* images */,
288692F90FED553A002C6BF7 /* icons */,
2851C59F0FC8651C002927E0 /* dsa_pub.pem */,
Expand Down Expand Up @@ -818,14 +788,7 @@
2886932E0FED554E002C6BF7 /* win_scale.tiff in Resources */,
28073CB00FF9956600D2602B /* extract.tiff in Resources */,
28073DB00FFB0EED00D2602B /* icon.tiff in Resources */,
28403538105D960B0007D916 /* Help.helpindex in Resources */,
28403539105D960B0007D916 /* help.css in Resources */,
2840353A105D960B0007D916 /* index.html in Resources */,
2840353B105D960B0007D916 /* layout.html in Resources */,
2840353C105D960B0007D916 /* navigation.html in Resources */,
2840353D105D960B0007D916 /* preferences.html in Resources */,
2840353E105D960B0007D916 /* quicklook.html in Resources */,
2840353F105D960B0007D916 /* scicon.png in Resources */,
28F660461067255600EC8A34 /* Help in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -959,6 +922,14 @@
name = KeyboardPrefPaneView.nib;
sourceTree = "<group>";
};
28F6603B1067255600EC8A34 /* Help */ = {
isa = PBXVariantGroup;
children = (
28F6603C1067255600EC8A34 /* English */,
);
name = Help;
sourceTree = "<group>";
};
28FACB920CD01F65007B7918 /* GeneralPrefPaneView.nib */ = {
isa = PBXVariantGroup;
children = (
Expand Down
9 changes: 6 additions & 3 deletions SimpleComicAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -903,12 +903,15 @@ -(NSStringEncoding)archive:(XADArchive *)archive

NSUInteger index = [encodingIdentifiers indexOfObject: [NSNumber numberWithUnsignedInteger: guess]];
NSUInteger counter = 0;
NSStringEncoding encoding;
// NSStringEncoding encoding;
NSNumber * encoding;
while(!testText)
{
[testText release];
encoding = [[encodingIdentifiers objectAtIndex: counter] unsignedIntegerValue];
testText = [[NSString alloc] initWithData: data encoding: guess];
encoding = [encodingIdentifiers objectAtIndex: counter];
if ([encoding class] != [NSNull class]) {
testText = [[NSString alloc] initWithData: data encoding: [encoding unsignedIntegerValue]];
}
index = counter++;
}

Expand Down

0 comments on commit 2dfdcd9

Please sign in to comment.