Permalink
Browse files

navigate pages with space bar

git-svn-id: https://ichm.googlecode.com/svn/trunk@56 e1f60c0e-2a54-0410-99cd-d3f60e83567d
  • Loading branch information...
1 parent 2826260 commit 53c6a314494c35cc1a3c1be35dd97792911f5957 iamawalrus committed Nov 4, 2008
View
2 CHMDocument.h
@@ -83,6 +83,8 @@ struct chmFile;
- (IBAction)goBack:(id)sender;
- (IBAction)goHistory:(id)sender;
- (IBAction)goHome:(id)sender;
+- (IBAction)gotoNextPage:(id)sender;
+- (IBAction)gotoPrevPage:(id)sender;
- (IBAction)locateTOC:(id)sender;
View
28 CHMDocument.m
@@ -12,10 +12,11 @@
#import <PSMTabBarControl/PSMTabBarControl.h>
#import "ITSSProtocol.h"
#import "CHMTableOfContent.h"
-#import "CHMWebView.h"
+#import "CHMWebViewController.h"
#import "ICHMApplication.h"
#import "CHMTextEncodingMenu.h"
#import "BookmarkController.h"
+#import "CHMWebView.h"
#import "lcid.h"
static NSString* ICHMToolbarIdentifier = @"ICHM Toolbar Identifier";
@@ -806,7 +807,7 @@ - (void)webViewShow:(WebView *)sender
{
for(NSTabViewItem* item in [docTabView tabViewItems])
{
- CHMWebView *chmwv = [item identifier];
+ CHMWebViewController *chmwv = [item identifier];
if([chmwv webView] == sender)
{
curWebView = sender;
@@ -862,6 +863,24 @@ - (IBAction)goHistory:(id)sender
}
}
+- (IBAction)gotoNextPage:(id)sender
+{
+ int selectedRow = [tocView selectedRow];
+ LinkItem *topic = [tocView itemAtRow:selectedRow];
+ LinkItem* nextPage = [tocSource getNextPage:topic];
+ if (nextPage)
+ [self loadPath:[nextPage path]];
+}
+
+- (IBAction)gotoPrevPage:(id)sender
+{
+ int selectedRow = [tocView selectedRow];
+ LinkItem *topic = [tocView itemAtRow:selectedRow];
+ LinkItem* prevPage = [tocSource getPrevPage:topic];
+ if (prevPage)
+ [self loadPath:[prevPage path]];
+}
+
- (IBAction)locateTOC:(id)sender
{
NSURL * url = [[[[curWebView mainFrame] dataSource] request] URL];
@@ -953,10 +972,11 @@ - (void) setupTabBar
- (NSTabViewItem*)createWebViewInTab:(id)sender
{
- CHMWebView * chmWebView = [[CHMWebView alloc] init];
+ CHMWebViewController * chmWebView = [[CHMWebViewController alloc] init];
// init the webview
WebView *newView = [chmWebView webView];
+ [(CHMWebView*)newView setDocument:self];
[newView setPreferencesIdentifier:WebVewPreferenceIndentifier];
if ([webViews count] == 0)
{
@@ -1338,7 +1358,7 @@ - (IBAction)focusOnSearch:(id)sender
# pragma mark find panel
- (IBAction)showFindPanel:(id)sender
{
- CHMWebView * chmWebView = (CHMWebView*)[[docTabView selectedTabViewItem] identifier];
+ CHMWebViewController * chmWebView = (CHMWebViewController*)[[docTabView selectedTabViewItem] identifier];
return [chmWebView showFindPanel:sender];
}
View
7 CHMTableOfContent.h
@@ -13,6 +13,7 @@
LinkItem *rootItems;
NSMutableArray *itemStack;
+ NSMutableArray *pageList;
LinkItem *curItem;
}
@property (readonly) LinkItem *rootItems;
@@ -23,6 +24,8 @@
- (LinkItem *)itemForPath:(NSString*)path withStack:(NSMutableArray*)stack;
- (int)rootChildrenCount;
- (void)sort;
+- (LinkItem*)getNextPage:(LinkItem*)item;
+- (LinkItem*)getPrevPage:(LinkItem*)item;
@end
@interface CHMSearchResult : CHMTableOfContent
@@ -40,7 +43,9 @@
NSString *_name;
NSString *_path;
NSMutableArray *_children;
+ NSUInteger pageID;
}
+@property (readonly) NSUInteger pageID;
- (id)initWithName:(NSString *)name Path:(NSString *)path;
- (int)numberOfChildren;
@@ -52,8 +57,10 @@
- (void)purge;
- (void)setName:(NSString *)name;
- (void)setPath:(NSString *)path;
+- (void)setPageID:(NSUInteger)pid;
- (void)appendChild:(LinkItem *)item;
- (LinkItem*)find_by_path:(NSString *)path withStack:(NSMutableArray*)stack;
+- (void)enumerateItemsWithSEL:(SEL)selector ForTarget:(id)target;
- (void)sort;
@end
View
58 CHMTableOfContent.m
@@ -11,6 +11,7 @@
#import "CHMDocument.h"
@implementation LinkItem
+@synthesize pageID;
- (id)init
{
@@ -52,6 +53,11 @@ - (void)setPath:(NSString *)path
[_path retain];
}
+- (void)setPageID:(NSUInteger)pid
+{
+ pageID = pid;
+}
+
- (int)numberOfChildren
{
return _children ? [_children count] : 0;
@@ -110,6 +116,17 @@ - (LinkItem*)find_by_path:(NSString *)path withStack:(NSMutableArray*)stack
return nil;
}
+- (void)enumerateItemsWithSEL:(SEL)selector ForTarget:(id)target
+{
+ if (![_path isEqualToString:@"/"])
+ [target performSelector:selector withObject:self];
+
+ for (LinkItem* item in _children)
+ {
+ [item enumerateItemsWithSEL:selector ForTarget:target];
+ }
+}
+
- (void)sort
{
NSSortDescriptor *sd = [[NSSortDescriptor alloc] initWithKey:@"uppercaseName" ascending:YES];
@@ -139,6 +156,8 @@ @interface CHMTableOfContent (Private)
- (void)push_item;
- (void)pop_item;
- (void)new_item;
+
+- (void)addToPageList:(LinkItem*)item;
@end
@implementation CHMTableOfContent
@@ -178,6 +197,7 @@ @implementation CHMTableOfContent
- (id)initWithData:(NSData *)data encodingName:(NSString*)encodingName
{
itemStack = [[NSMutableArray alloc] init];
+ pageList = [[NSMutableArray alloc] init];
rootItems = [[LinkItem alloc] initWithName:@"root" Path:@"/"];
curItem = rootItems;
@@ -192,6 +212,7 @@ - (id)initWithData:(NSData *)data encodingName:(NSString*)encodingName
xmlFreeDoc( doc );
}
[rootItems purge];
+ [rootItems enumerateItemsWithSEL:@selector(addToPageList:) ForTarget:self];
return self;
}
@@ -241,6 +262,21 @@ - (void)sort
[rootItems sort];
}
+- (LinkItem*)getNextPage:(LinkItem*)item
+{
+ NSUInteger idx = [item pageID] + 1;
+ if (idx == [pageList count])
+ return nil;
+ return [pageList objectAtIndex:idx];
+}
+
+- (LinkItem*)getPrevPage:(LinkItem*)item
+{
+ NSUInteger idx = [item pageID] - 1;
+ if (idx == -1)
+ return nil;
+ return [pageList objectAtIndex:idx];
+}
# pragma mark NSOutlineView datasource
- (int)outlineView:(NSOutlineView *)outlineView
numberOfChildrenOfItem:(id)item
@@ -297,6 +333,28 @@ - (void)pop_item
[itemStack removeLastObject];
}
+- (void)addToPageList:(LinkItem*)item
+{
+ if ([item path] == nil)
+ return;
+
+ LinkItem* latest = [pageList lastObject];
+
+ if(nil == latest)
+ {
+ [pageList addObject:item];
+ }
+ else
+ {
+ NSURL *baseURL = [NSURL URLWithString:@"http://dummy.com"];
+ NSURL *url = [NSURL URLWithString:[item path] relativeToURL:baseURL];
+ NSURL *curUrl = [NSURL URLWithString:[latest path] relativeToURL:baseURL];
+ if (![[url path] isEqualToString:[curUrl path]])
+ [pageList addObject:item];
+ }
+ [item setPageID:([pageList count] - 1)];
+}
+
# pragma mark NSXMLParser delegation
static void elementDidStart( CHMTableOfContent *context, const xmlChar *name, const xmlChar **atts )
{
View
17 CHMWebView.h
@@ -2,22 +2,17 @@
// CHMWebView.h
// ichm
//
-// Created by Robin Lu on 7/29/08.
+// Created by Robin Lu on 11/4/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
-@class WebView;
+#import <WebKit/WebKit.h>
+@class CHMDocument;
-@interface CHMWebView : NSViewController {
- IBOutlet WebView* webView;
- IBOutlet NSView* findPanel;
- IBOutlet NSSearchField* searchField;
+@interface CHMWebView : WebView {
+ CHMDocument* chmDocument;
}
-@property (readonly) WebView* webView;
-@property (readonly) NSSearchField* searchField;
-
-- (IBAction)hideFindPanel:(id)sender;
-- (IBAction)showFindPanel:(id)sender;
+- (void)setDocument:(CHMDocument*)doc;
@end
View
38 CHMWebView.m
@@ -2,49 +2,27 @@
// CHMWebView.m
// ichm
//
-// Created by Robin Lu on 7/29/08.
+// Created by Robin Lu on 11/4/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "CHMWebView.h"
-#import <WebKit/WebKit.h>
+#import "CHMDocument.h"
@implementation CHMWebView
-@synthesize webView;
-@synthesize searchField;
-
-- (id) init
+- (void)setDocument:(CHMDocument*)doc
{
- if (![super initWithNibName:@"CHMWebView" bundle:nil])
- return nil;
- [self loadView];
- [self hideFindPanel:self];
- return self;
+ chmDocument = doc;
}
-- (IBAction)hideFindPanel:(id)sender
+- (void)scrollPageDown:(id)sender
{
- if ([findPanel isHidden])
- return;
- [findPanel setHidden:YES];
- float webViewHeight = [webView frame].size.height;
- webViewHeight = webViewHeight + 27;
- [webView setFrame:NSMakeRect([webView frame].origin.x, [webView frame].origin.y, [webView frame].size.width, webViewHeight)];
- [webView setNeedsDisplay:YES];
+ [chmDocument gotoNextPage:sender];
}
-- (IBAction)showFindPanel:(id)sender
+- (void)scrollPageUp:(id)sender
{
- if ([findPanel isHidden])
- {
- [findPanel setHidden:NO];
- float webViewHeight = [webView frame].size.height;
- webViewHeight = webViewHeight - 27;
- [webView setFrame:NSMakeRect([webView frame].origin.x, [webView frame].origin.y, [webView frame].size.width, webViewHeight)];
- [webView setNeedsDisplay:YES];
- }
- [[[self view] window] makeFirstResponder:searchField];
+ [chmDocument gotoPrevPage:sender];
}
-
@end
View
23 CHMWebViewController.h
@@ -0,0 +1,23 @@
+//
+// CHMWebView.h
+// ichm
+//
+// Created by Robin Lu on 7/29/08.
+// Copyright 2008 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+@class WebView;
+
+@interface CHMWebViewController : NSViewController {
+ IBOutlet WebView* webView;
+ IBOutlet NSView* findPanel;
+ IBOutlet NSSearchField* searchField;
+}
+
+@property (readonly) WebView* webView;
+@property (readonly) NSSearchField* searchField;
+
+- (IBAction)hideFindPanel:(id)sender;
+- (IBAction)showFindPanel:(id)sender;
+@end
View
50 CHMWebViewController.m
@@ -0,0 +1,50 @@
+//
+// CHMWebView.m
+// ichm
+//
+// Created by Robin Lu on 7/29/08.
+// Copyright 2008 __MyCompanyName__. All rights reserved.
+//
+
+#import "CHMWebViewController.h"
+#import <WebKit/WebKit.h>
+
+@implementation CHMWebViewController
+
+@synthesize webView;
+@synthesize searchField;
+
+- (id) init
+{
+ if (![super initWithNibName:@"CHMWebView" bundle:nil])
+ return nil;
+ [self loadView];
+ [self hideFindPanel:self];
+ return self;
+}
+
+- (IBAction)hideFindPanel:(id)sender
+{
+ if ([findPanel isHidden])
+ return;
+ [findPanel setHidden:YES];
+ float webViewHeight = [webView frame].size.height;
+ webViewHeight = webViewHeight + 27;
+ [webView setFrame:NSMakeRect([webView frame].origin.x, [webView frame].origin.y, [webView frame].size.width, webViewHeight)];
+ [webView setNeedsDisplay:YES];
+}
+
+- (IBAction)showFindPanel:(id)sender
+{
+ if ([findPanel isHidden])
+ {
+ [findPanel setHidden:NO];
+ float webViewHeight = [webView frame].size.height;
+ webViewHeight = webViewHeight - 27;
+ [webView setFrame:NSMakeRect([webView frame].origin.x, [webView frame].origin.y, [webView frame].size.width, webViewHeight)];
+ [webView setNeedsDisplay:YES];
+ }
+ [[[self view] window] makeFirstResponder:searchField];
+}
+
+@end
View
18 Dutch.lproj/CHMWebView.xib
@@ -2,13 +2,12 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="6"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -19,7 +18,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">CHMWebView</string>
+ <string key="NSClassName">CHMWebViewController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -28,7 +27,7 @@
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomView" id="1005">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -224,7 +223,6 @@
</object>
</object>
<string key="NSFrameSize">{480, 272}</string>
- <reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
</object>
@@ -594,7 +592,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -625,8 +623,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
</object>
View
12 Dutch.lproj/MainMenu.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2575,7 +2575,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2606,8 +2606,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
View
32 English.lproj/CHMWebView.xib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="6"/>
+ <integer value="1" id="9"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -19,7 +19,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">CHMWebView</string>
+ <string key="NSClassName">CHMWebViewController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -164,7 +164,7 @@
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>cancel</string>
- <integer value="1"/>
+ <reference ref="9"/>
</object>
</object>
</object>
@@ -417,6 +417,7 @@
<string>10.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
+ <string>2.CustomClassName</string>
<string>2.IBPluginDependency</string>
<string>6.IBPluginDependency</string>
<string>6.IBViewIntegration.shadowBlurRadius</string>
@@ -441,6 +442,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>CHMWebView</string>
<string>com.apple.WebKitIBPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<real value="0.000000e+00" id="635788586"/>
@@ -595,6 +597,14 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">CHMWebView</string>
+ <string key="superclassName">WebView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">CHMWebView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -626,7 +636,15 @@
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="minorKey">CHMWebViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">CHMWebViewController</string>
+ <string key="superclassName">NSViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
</object>
View
13 English.lproj/MainMenu.xib
@@ -2,13 +2,12 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="562"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2576,7 +2575,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2607,8 +2606,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
View
14 German.lproj/CHMWebView.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -18,7 +18,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">CHMWebView</string>
+ <string key="NSClassName">CHMWebViewController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -592,7 +592,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -623,8 +623,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
</object>
View
12 German.lproj/MainMenu.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2575,7 +2575,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2606,8 +2606,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
View
14 Spanish.lproj/CHMWebView.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -18,7 +18,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">CHMWebView</string>
+ <string key="NSClassName">CHMWebViewController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -592,7 +592,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -623,8 +623,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
</object>
View
12 Spanish.lproj/MainMenu.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2575,7 +2575,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2606,8 +2606,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
View
26 ichm.xcodeproj/project.pbxproj
@@ -29,9 +29,12 @@
C35B9BDF0E39E48D00A63BC3 /* PSMTabBarControl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C35B9BCD0E39E38500A63BC3 /* PSMTabBarControl.framework */; };
C36FD4240E482D3800496822 /* CHMWebView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C36FD4230E482D3800496822 /* CHMWebView.xib */; };
C36FD52C0E48403F00496822 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C36FD52B0E48403F00496822 /* Localizable.strings */; };
+ C3907F3D0EC005430018AA80 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3907F3C0EC005430018AA80 /* Quartz.framework */; };
+ C3907F690EC005B30018AA80 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3907F680EC005B30018AA80 /* ApplicationServices.framework */; };
+ C390802E0EC027070018AA80 /* CHMWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = C390802D0EC027070018AA80 /* CHMWebView.m */; };
C39A12160E607D330009C875 /* view.tif in Resources */ = {isa = PBXBuildFile; fileRef = C39A12150E607D330009C875 /* view.tif */; };
C3A79CC30E30438B00FF4485 /* CHMTableOfContent.m in Sources */ = {isa = PBXBuildFile; fileRef = C3A79CC20E30438B00FF4485 /* CHMTableOfContent.m */; };
- C3AA9B220E3EC8A200D2FB53 /* CHMWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = C3AA9B210E3EC8A200D2FB53 /* CHMWebView.m */; };
+ C3AA9B220E3EC8A200D2FB53 /* CHMWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C3AA9B210E3EC8A200D2FB53 /* CHMWebViewController.m */; };
C3BF8BA00E4FDD7200AE3BEE /* CHMBookmark.m in Sources */ = {isa = PBXBuildFile; fileRef = C3BF8B9F0E4FDD7200AE3BEE /* CHMBookmark.m */; };
C3C082250E4557E700D58E19 /* TB_Sidebar.png in Resources */ = {isa = PBXBuildFile; fileRef = C3C082240E4557E700D58E19 /* TB_Sidebar.png */; };
C3C396F90E3F8E2800A52FBE /* chm_lib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3C396F80E3F8E2800A52FBE /* chm_lib.framework */; };
@@ -116,12 +119,16 @@
C38B8E870E627FF300E0DC42 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = zh_TW; path = zh_TW.lproj/Bookmark.xib; sourceTree = "<group>"; };
C38B8E880E627FFA00E0DC42 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/Localizable.strings; sourceTree = "<group>"; };
C38B8EA00E628B8D00E0DC42 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/Localizable.strings; sourceTree = "<group>"; };
+ C3907F3C0EC005430018AA80 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = /System/Library/Frameworks/Quartz.framework; sourceTree = "<absolute>"; };
+ C3907F680EC005B30018AA80 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
+ C390802C0EC027070018AA80 /* CHMWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMWebView.h; sourceTree = "<group>"; };
+ C390802D0EC027070018AA80 /* CHMWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMWebView.m; sourceTree = "<group>"; };
C39A12150E607D330009C875 /* view.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = view.tif; sourceTree = "<group>"; };
C3A79CC10E30438B00FF4485 /* CHMTableOfContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMTableOfContent.h; sourceTree = "<group>"; };
C3A79CC20E30438B00FF4485 /* CHMTableOfContent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMTableOfContent.m; sourceTree = "<group>"; };
C3AA9B1D0E3EC88600D2FB53 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/CHMWebView.xib; sourceTree = "<group>"; };
- C3AA9B200E3EC8A200D2FB53 /* CHMWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMWebView.h; sourceTree = "<group>"; };
- C3AA9B210E3EC8A200D2FB53 /* CHMWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMWebView.m; sourceTree = "<group>"; };
+ C3AA9B200E3EC8A200D2FB53 /* CHMWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMWebViewController.h; sourceTree = "<group>"; };
+ C3AA9B210E3EC8A200D2FB53 /* CHMWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMWebViewController.m; sourceTree = "<group>"; };
C3BF8B9E0E4FDD7200AE3BEE /* CHMBookmark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMBookmark.h; sourceTree = "<group>"; };
C3BF8B9F0E4FDD7200AE3BEE /* CHMBookmark.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMBookmark.m; sourceTree = "<group>"; };
C3C082240E4557E700D58E19 /* TB_Sidebar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TB_Sidebar.png; sourceTree = "<group>"; };
@@ -157,6 +164,8 @@
C35B9BCE0E39E38500A63BC3 /* PSMTabBarControl.framework in Frameworks */,
C3C396F90E3F8E2800A52FBE /* chm_lib.framework in Frameworks */,
C346DF070E530E8B00A76373 /* Sparkle.framework in Frameworks */,
+ C3907F3D0EC005430018AA80 /* Quartz.framework in Frameworks */,
+ C3907F690EC005B30018AA80 /* ApplicationServices.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -177,6 +186,8 @@
1058C7A8FEA54F5311CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
+ C3907F680EC005B30018AA80 /* ApplicationServices.framework */,
+ C3907F3C0EC005430018AA80 /* Quartz.framework */,
C3DB24CD0E2DB849000E5A20 /* WebKit.framework */,
2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */,
13E42FBA07B3F13500E4EEF1 /* CoreData.framework */,
@@ -221,9 +232,11 @@
C3DB252E0E2DD646000E5A20 /* ICHMApplication.m */,
C3D6EE090E3D9E5C00A823A2 /* CHMOutlineView.h */,
C3D6EE0A0E3D9E5C00A823A2 /* CHMOutlineView.m */,
- C3AA9B200E3EC8A200D2FB53 /* CHMWebView.h */,
- C3AA9B210E3EC8A200D2FB53 /* CHMWebView.m */,
+ C3AA9B200E3EC8A200D2FB53 /* CHMWebViewController.h */,
+ C3AA9B210E3EC8A200D2FB53 /* CHMWebViewController.m */,
C3E9715D0E4BEAA000B7B36D /* lcid.h */,
+ C390802C0EC027070018AA80 /* CHMWebView.h */,
+ C390802D0EC027070018AA80 /* CHMWebView.m */,
);
name = Classes;
sourceTree = "<group>";
@@ -406,14 +419,15 @@
C3A79CC30E30438B00FF4485 /* CHMTableOfContent.m in Sources */,
C33A4ABB0E34E92D00277D64 /* CHMDocument.m in Sources */,
C3D6EE0B0E3D9E5C00A823A2 /* CHMOutlineView.m in Sources */,
- C3AA9B220E3EC8A200D2FB53 /* CHMWebView.m in Sources */,
+ C3AA9B220E3EC8A200D2FB53 /* CHMWebViewController.m in Sources */,
C3ED1D870E4307F500C1B93A /* CHMTextEncodingMenu.m in Sources */,
C33D3ACA0E4F05E500F7B487 /* Bookmarks.xcdatamodel in Sources */,
C33D3AD80E4F1E3800F7B487 /* CHMFile.m in Sources */,
C33D3AD90E4F1E3800F7B487 /* CHMTag.m in Sources */,
C33D3B0E0E4F245600F7B487 /* BookmarkController.m in Sources */,
C3BF8BA00E4FDD7200AE3BEE /* CHMBookmark.m in Sources */,
C3D5D3350E5159D5007C51BD /* BookmarkView.m in Sources */,
+ C390802E0EC027070018AA80 /* CHMWebView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
14 zh_CN.lproj/CHMWebView.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -18,7 +18,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">CHMWebView</string>
+ <string key="NSClassName">CHMWebViewController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -592,7 +592,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -623,8 +623,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
</object>
View
12 zh_CN.lproj/MainMenu.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2575,7 +2575,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2606,8 +2606,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
View
14 zh_TW.lproj/CHMWebView.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -18,7 +18,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">CHMWebView</string>
+ <string key="NSClassName">CHMWebViewController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -592,7 +592,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -623,8 +623,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
</object>
View
12 zh_TW.lproj/MainMenu.xib
@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9E17</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.SystemVersion">9F33</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2575,7 +2575,7 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">CHMWebView</string>
+ <string key="className">CHMWebViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2606,8 +2606,8 @@
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">CHMWebView.h</string>
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">

0 comments on commit 53c6a31

Please sign in to comment.