Revision: 4426
http://skim-app.svn.sourceforge.net/skim-app/?rev=4426&view=rev
Author: hofman
Date: 2008-08-18 20:17:13 +0000 (Mon, 18 Aug 2008)
Log Message:
-----------
Add action and alternate menu items for a bookmark with document setup info.
Modified Paths:
--------------
trunk/English.lproj/MainMenu.nib/classes.nib
trunk/English.lproj/MainMenu.nib/keyedobjects.nib
trunk/Italian.lproj/MainMenu.nib/classes.nib
trunk/Italian.lproj/MainMenu.nib/info.nib
trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib
trunk/SKMainWindowController.h
trunk/SKMainWindowController.m
Modified: trunk/English.lproj/MainMenu.nib/classes.nib
===================================================================
--- trunk/English.lproj/MainMenu.nib/classes.nib 2008-08-18 19:30:09 UTC
(rev 4425)
+++ trunk/English.lproj/MainMenu.nib/classes.nib 2008-08-18 20:17:13 UTC
(rev 4426)
@@ -113,28 +113,14 @@
<string>SKOutlineView</string>
</dict>
<dict>
- <key>CLASS</key>
- <string>NSMenu</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>NSWindowController</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSResponder</string>
- </dict>
- <dict>
<key>ACTIONS</key>
<dict>
<key>addBookmark</key>
<string>id</string>
<key>addSessionBookmark</key>
<string>id</string>
+ <key>addSetupBookmark</key>
+ <string>id</string>
<key>allGoToFirstPage</key>
<string>id</string>
<key>allGoToLastPage</key>
@@ -467,6 +453,22 @@
<string>NSWindowController</string>
</dict>
<dict>
+ <key>CLASS</key>
+ <string>NSWindowController</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSResponder</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSMenu</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
<key>ACTIONS</key>
<dict>
<key>changeDashPattern</key>
@@ -605,19 +607,19 @@
</dict>
<dict>
<key>CLASS</key>
- <string>SKBookmarkOutlineView</string>
+ <string>NSSegmentedControl</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>SKOutlineView</string>
+ <string>NSControl</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSSegmentedControl</string>
+ <string>SKBookmarkOutlineView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSControl</string>
+ <string>SKOutlineView</string>
</dict>
<dict>
<key>ACTIONS</key>
@@ -681,6 +683,8 @@
<string>id</string>
<key>addSessionBookmark</key>
<string>id</string>
+ <key>addSetupBookmark</key>
+ <string>id</string>
<key>allGoToFirstPage</key>
<string>id</string>
<key>allGoToLastPage</key>
Modified: trunk/Italian.lproj/MainMenu.nib/classes.nib
===================================================================
--- trunk/Italian.lproj/MainMenu.nib/classes.nib 2008-08-18 19:30:09 UTC
(rev 4425)
+++ trunk/Italian.lproj/MainMenu.nib/classes.nib 2008-08-18 20:17:13 UTC
(rev 4426)
@@ -135,6 +135,8 @@
<string>id</string>
<key>addSessionBookmark</key>
<string>id</string>
+ <key>addSetupBookmark</key>
+ <string>id</string>
<key>allGoToFirstPage</key>
<string>id</string>
<key>allGoToLastPage</key>
@@ -487,19 +489,19 @@
</dict>
<dict>
<key>CLASS</key>
- <string>SKSnapshotTableView</string>
+ <string>SKSplitView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>SKThumbnailTableView</string>
+ <string>NSSplitView</string>
</dict>
<dict>
<key>CLASS</key>
- <string>SKSplitView</string>
+ <string>SKSnapshotTableView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSSplitView</string>
+ <string>SKThumbnailTableView</string>
</dict>
<dict>
<key>ACTIONS</key>
@@ -612,6 +614,14 @@
<string>SKOutlineView</string>
</dict>
<dict>
+ <key>CLASS</key>
+ <string>NSSegmentedControl</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSControl</string>
+ </dict>
+ <dict>
<key>ACTIONS</key>
<dict>
<key>editBookmarks</key>
@@ -644,14 +654,6 @@
</dict>
<dict>
<key>CLASS</key>
- <string>NSSegmentedControl</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSControl</string>
- </dict>
- <dict>
- <key>CLASS</key>
<string>BDSKCollapsibleView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
@@ -681,6 +683,8 @@
<string>id</string>
<key>addSessionBookmark</key>
<string>id</string>
+ <key>addSetupBookmark</key>
+ <string>id</string>
<key>allGoToFirstPage</key>
<string>id</string>
<key>allGoToLastPage</key>
Modified: trunk/Italian.lproj/MainMenu.nib/info.nib
===================================================================
--- trunk/Italian.lproj/MainMenu.nib/info.nib 2008-08-18 19:30:09 UTC (rev
4425)
+++ trunk/Italian.lproj/MainMenu.nib/info.nib 2008-08-18 20:17:13 UTC (rev
4426)
@@ -10,7 +10,7 @@
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
- <integer>29</integer>
+ <integer>908</integer>
</array>
<key>IBSystem Version</key>
<string>9E17</string>
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2008-08-18 19:30:09 UTC (rev 4425)
+++ trunk/SKMainWindowController.h 2008-08-18 20:17:13 UTC (rev 4426)
@@ -447,8 +447,9 @@
- (void)updateSnapshotsIfNeeded;
- (void)updateSnapshot:(NSTimer *)timer;
+- (IBAction)addBookmark:(id)sender;
+- (IBAction)addSetupBookmark:(id)sender;
- (IBAction)addSessionBookmark:(id)sender;
-- (IBAction)addBookmark:(id)sender;
- (void)addAnnotationsFromDictionaries:(NSArray *)noteDicts
undoable:(BOOL)undoable;
- (void)setAnnotationsFromDictionaries:(NSArray *)noteDicts
undoable:(BOOL)undoable;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2008-08-18 19:30:09 UTC (rev 4425)
+++ trunk/SKMainWindowController.m 2008-08-18 20:17:13 UTC (rev 4426)
@@ -2120,6 +2120,27 @@
contextInfo:NULL];
}
+- (void)setupBookmarkSheetDidEnd:(SKBookmarkSheetController *)controller
returnCode:(int)returnCode contextInfo:(void *)contextInfo {
+ if (returnCode == NSAlertDefaultReturn) {
+ SKBookmarkController *bmController = [SKBookmarkController
sharedBookmarkController];
+ NSDictionary *setup = [[self document] currentDocumentSetup];
+ NSString *label = [controller stringValue];
+ [bmController addBookmarkForSetup:setup label:label
toFolder:[controller selectedFolder]];
+ }
+}
+
+- (IBAction)addSetupBookmark:(id)sender {
+ if (bookmarkSheetController == nil)
+ bookmarkSheetController = [[SKBookmarkSheetController alloc] init];
+
+ [bookmarkSheetController setStringValue:[[self document] displayName]];
+
+ [bookmarkSheetController beginSheetModalForWindow: [self window]
+ modalDelegate:self
+ didEndSelector:@selector(bookmarkSheetDidEnd:returnCode:contextInfo:)
+ contextInfo:NULL];
+}
+
- (void)sessionBookmarkSheetDidEnd:(SKBookmarkSheetController *)controller
returnCode:(int)returnCode contextInfo:(void *)contextInfo {
if (returnCode == NSAlertDefaultReturn) {
SKBookmarkController *bmController = [SKBookmarkController
sharedBookmarkController];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit