Revision: 4412
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4412&view=rev
Author:   hofman
Date:     2008-08-15 12:52:03 +0000 (Fri, 15 Aug 2008)

Log Message:
-----------
Support bookmarks for a session. Implemented as a folder bookmark that's 
presented as a single bookmark.

Modified Paths:
--------------
    trunk/English.lproj/MainMenu.nib/classes.nib
    trunk/English.lproj/MainMenu.nib/info.nib
    trunk/English.lproj/MainMenu.nib/keyedobjects.nib
    trunk/NSImage_SKExtensions.h
    trunk/NSImage_SKExtensions.m
    trunk/SKBookmark.h
    trunk/SKBookmark.m
    trunk/SKBookmarkController.h
    trunk/SKBookmarkController.m
    trunk/SKMainWindowController.h
    trunk/SKMainWindowController.m

Modified: trunk/English.lproj/MainMenu.nib/classes.nib
===================================================================
--- trunk/English.lproj/MainMenu.nib/classes.nib        2008-08-15 09:49:12 UTC 
(rev 4411)
+++ trunk/English.lproj/MainMenu.nib/classes.nib        2008-08-15 12:52:03 UTC 
(rev 4412)
@@ -1,130 +1,959 @@
-{
-    IBClasses =     (
-                {
-            ACTIONS =             {
-                addBookmark = id;
-                allGoToFirstPage = id;
-                allGoToLastPage = id;
-                allGoToNextPage = id;
-                allGoToPreviousPage = id;
-                alternatePaste = id;
-                alternateZoomToFit = id;
-                autoCropAll = id;
-                autoSelectContent = id;
-                changeAnnotationMode = id;
-                changeDisplayBox = id;
-                changeLeftSidePaneState = id;
-                changeRightSidePaneState = id;
-                changeToolMode = id;
-                chooseTransition = id;
-                convertNotes = id;
-                createNewNote = id;
-                crop = id;
-                cropAll = id;
-                deselectAll = id;
-                displayCropBox = id;
-                displayFacingPages = id;
-                displayMediaBox = id;
-                displaySinglePages = id;
-                doGoBack = id;
-                doGoForward = id;
-                doGoToFirstPage = id;
-                doGoToLastPage = id;
-                doGoToNextPage = id;
-                doGoToPage = id;
-                doGoToPreviousPage = id;
-                doZoomIn = id;
-                doZoomOut = id;
-                doZoomToActualSize = id;
-                doZoomToFit = id;
-                doZoomToPhysicalSize = id;
-                doZoomToSelection = id;
-                editBookmarks = id;
-                editNote = id;
-                emailArchive = id;
-                emailDiskImage = id;
-                getInfo = id;
-                goToMarkedPage = id;
-                markPage = id;
-                newDocumentFromClipboard = id;
-                orderFrontLineInspector = id;
-                orderFrontNotesPanel = id;
-                password = id;
-                performFit = id;
-                readNotes = id;
-                rotateAllLeft = id;
-                rotateAllRight = id;
-                rotateLeft = id;
-                rotateRight = id;
-                saveArchive = id;
-                saveDiskImage = id;
-                savePDFSettingToDefaults = id;
-                searchPDF = id;
-                smartAutoCropAll = id;
-                takeSnapshot = id;
-                toggleAutoScale = id;
-                toggleDisplayAsBook = id;
-                toggleDisplayContinuous = id;
-                toggleDisplayPageBreaks = id;
-                toggleFullScreen = id;
-                toggleHideNotes = id;
-                toggleLeftSidePane = id;
-                togglePresentation = id;
-                toggleReadingBar = id;
-                toggleRightSidePane = id;
-                toggleSplitPDF = id;
-                toggleStatusBar = id;
-            };
-            CLASS = FirstResponder;
-            LANGUAGE = ObjC;
-            SUPERCLASS = NSObject;
-        },
-                {
-            CLASS = NSView;
-            LANGUAGE = ObjC;
-            SUPERCLASS = NSResponder;
-        },
-                {
-            ACTIONS =             {
-                editBookmarks = id;
-                openBookmark = id;
-                saveCurrentOpenDocuments = id;
-                showDownloads = id;
-                showPreferencePanel = id;
-                showReleaseNotes = id;
-                visitWebSite = id;
-                visitWiki = id;
-            };
-            CLASS = SKApplicationController;
-            LANGUAGE = ObjC;
-            SUPERCLASS = NSObject;
-        },
-                {
-            CLASS = SKDocumentController;
-            LANGUAGE = ObjC;
-            SUPERCLASS = NSDocumentController;
-        },
-                {
-            CLASS = SKSplashContentView;
-            LANGUAGE = ObjC;
-            SUPERCLASS = NSView;
-        },
-                {
-            ACTIONS =             {
-                fadeOut = id;
-            };
-            CLASS = SKSplashWindow;
-            LANGUAGE = ObjC;
-            SUPERCLASS = NSWindow;
-        },
-                {
-            ACTIONS =             {
-                checkForUpdates = id;
-            };
-            CLASS = SUUpdater;
-            LANGUAGE = ObjC;
-            SUPERCLASS = NSObject;
-        }
-    );
-    IBVersion = 1;
-}
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+       <key>IBClasses</key>
+       <array>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>dismissNoteTypeSheet</key>
+                               <string>id</string>
+                               <key>displayAllNoteTypes</key>
+                               <string>id</string>
+                               <key>selectNoteTypes</key>
+                               <string>id</string>
+                               <key>toggleDisplayNoteType</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKNoteOutlineView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>OUTLETS</key>
+                       <dict>
+                               <key>noteTypeMatrix</key>
+                               <string>NSMatrix</string>
+                               <key>noteTypeSheet</key>
+                               <string>NSWindow</string>
+                       </dict>
+                       <key>SUPERCLASS</key>
+                       <string>SKOutlineView</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>BDSKGradientView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSView</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>findNext</key>
+                               <string>id</string>
+                               <key>findNextAndOrderOutFindPanel</key>
+                               <string>id</string>
+                               <key>findPrevious</key>
+                               <string>id</string>
+                               <key>performFindPanelAction</key>
+                               <string>id</string>
+                               <key>pickFindString</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKFindController</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>OUTLETS</key>
+                       <dict>
+                               <key>findField</key>
+                               <string>NSTextField</string>
+                               <key>ignoreCaseCheckbox</key>
+                               <string>NSButton</string>
+                               <key>ownerController</key>
+                               <string>NSObjectController</string>
+                       </dict>
+                       <key>SUPERCLASS</key>
+                       <string>NSWindowController</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>deleteBookmark</key>
+                               <string>id</string>
+                               <key>doubleClickBookmark</key>
+                               <string>id</string>
+                               <key>insertBookmarkFolder</key>
+                               <string>id</string>
+                               <key>insertBookmarkSeparator</key>
+                               <string>id</string>
+                               <key>toggleStatusBar</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKBookmarkController</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>OUTLETS</key>
+                       <dict>
+                               <key>outlineView</key>
+                               <string>SKBookmarkOutlineView</string>
+                               <key>statusBar</key>
+                               <string>SKStatusBar</string>
+                       </dict>
+                       <key>SUPERCLASS</key>
+                       <string>NSWindowController</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>SKThumbnailTableView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>SKTableView</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>SKTocOutlineView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <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>allGoToFirstPage</key>
+                               <string>id</string>
+                               <key>allGoToLastPage</key>
+                               <string>id</string>
+                               <key>allGoToNextPage</key>
+                               <string>id</string>
+                               <key>allGoToPreviousPage</key>
+                               <string>id</string>
+                               <key>alternateZoomToFit</key>
+                               <string>id</string>
+                               <key>autoCropAll</key>
+                               <string>id</string>
+                               <key>autoSelectContent</key>
+                               <string>id</string>
+                               <key>changeAnnotationMode</key>
+                               <string>id</string>
+                               <key>changeColor</key>
+                               <string>id</string>
+                               <key>changeColorFill</key>
+                               <string>id</string>
+                               <key>changeDisplayBox</key>
+                               <string>id</string>
+                               <key>changeDisplayContinuous</key>
+                               <string>id</string>
+                               <key>changeDisplayMode</key>
+                               <string>id</string>
+                               <key>changeDisplaySinglePages</key>
+                               <string>id</string>
+                               <key>changeFindPaneState</key>
+                               <string>id</string>
+                               <key>changeFont</key>
+                               <string>id</string>
+                               <key>changeLeftSidePaneState</key>
+                               <string>id</string>
+                               <key>changeRightSidePaneState</key>
+                               <string>id</string>
+                               <key>changeScaleFactor</key>
+                               <string>id</string>
+                               <key>changeToolMode</key>
+                               <string>id</string>
+                               <key>chooseScale</key>
+                               <string>id</string>
+                               <key>chooseTransition</key>
+                               <string>id</string>
+                               <key>createNewCircleNote</key>
+                               <string>id</string>
+                               <key>createNewLineNote</key>
+                               <string>id</string>
+                               <key>createNewMarkupNote</key>
+                               <string>id</string>
+                               <key>createNewNote</key>
+                               <string>id</string>
+                               <key>createNewTextNote</key>
+                               <string>id</string>
+                               <key>crop</key>
+                               <string>id</string>
+                               <key>cropAll</key>
+                               <string>id</string>
+                               <key>displayFacingPages</key>
+                               <string>id</string>
+                               <key>displaySinglePages</key>
+                               <string>id</string>
+                               <key>doAutoScale</key>
+                               <string>id</string>
+                               <key>doGoBack</key>
+                               <string>id</string>
+                               <key>doGoForward</key>
+                               <string>id</string>
+                               <key>doGoToFirstPage</key>
+                               <string>id</string>
+                               <key>doGoToLastPage</key>
+                               <string>id</string>
+                               <key>doGoToNextPage</key>
+                               <string>id</string>
+                               <key>doGoToPage</key>
+                               <string>id</string>
+                               <key>doGoToPreviousPage</key>
+                               <string>id</string>
+                               <key>doZoomIn</key>
+                               <string>id</string>
+                               <key>doZoomOut</key>
+                               <string>id</string>
+                               <key>doZoomToActualSize</key>
+                               <string>id</string>
+                               <key>doZoomToFit</key>
+                               <string>id</string>
+                               <key>doZoomToPhysicalSize</key>
+                               <string>id</string>
+                               <key>doZoomToSelection</key>
+                               <string>id</string>
+                               <key>editNote</key>
+                               <string>id</string>
+                               <key>enterFullScreen</key>
+                               <string>id</string>
+                               <key>enterPresentation</key>
+                               <string>id</string>
+                               <key>exitFullScreen</key>
+                               <string>id</string>
+                               <key>getInfo</key>
+                               <string>id</string>
+                               <key>goBackOrForward</key>
+                               <string>id</string>
+                               <key>goToMarkedPage</key>
+                               <string>id</string>
+                               <key>goToPreviousNextFirstLastPage</key>
+                               <string>id</string>
+                               <key>markPage</key>
+                               <string>id</string>
+                               <key>password</key>
+                               <string>id</string>
+                               <key>performFit</key>
+                               <string>id</string>
+                               <key>rotateAllLeft</key>
+                               <string>id</string>
+                               <key>rotateAllLeftRight</key>
+                               <string>id</string>
+                               <key>rotateAllRight</key>
+                               <string>id</string>
+                               <key>rotateLeft</key>
+                               <string>id</string>
+                               <key>rotateRight</key>
+                               <string>id</string>
+                               <key>savePDFSettingToDefaults</key>
+                               <string>id</string>
+                               <key>search</key>
+                               <string>id</string>
+                               <key>searchNotes</key>
+                               <string>id</string>
+                               <key>searchPDF</key>
+                               <string>id</string>
+                               <key>selectColor</key>
+                               <string>id</string>
+                               <key>smartAutoCropAll</key>
+                               <string>id</string>
+                               <key>takeSnapshot</key>
+                               <string>id</string>
+                               <key>toggleAutoActualSize</key>
+                               <string>id</string>
+                               <key>toggleAutoScale</key>
+                               <string>id</string>
+                               <key>toggleCaseInsensitiveSearch</key>
+                               <string>id</string>
+                               <key>toggleDisplayAsBook</key>
+                               <string>id</string>
+                               <key>toggleDisplayContinuous</key>
+                               <string>id</string>
+                               <key>toggleDisplayPageBreaks</key>
+                               <string>id</string>
+                               <key>toggleFullScreen</key>
+                               <string>id</string>
+                               <key>toggleHideNotes</key>
+                               <string>id</string>
+                               <key>toggleLeftSidePane</key>
+                               <string>id</string>
+                               <key>togglePresentation</key>
+                               <string>id</string>
+                               <key>toggleReadingBar</key>
+                               <string>id</string>
+                               <key>toggleRightSidePane</key>
+                               <string>id</string>
+                               <key>toggleSplitPDF</key>
+                               <string>id</string>
+                               <key>toggleStatusBar</key>
+                               <string>id</string>
+                               <key>toggleWholeWordSearch</key>
+                               <string>id</string>
+                               <key>zoomInActualOut</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKMainWindowController</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>OUTLETS</key>
+                       <dict>
+                               <key>backForwardButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>circleNoteButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>colorSwatch</key>
+                               <string>SKColorSwatch</string>
+                               <key>colorsButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>continuousButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>cropButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>currentLeftSideView</key>
+                               <string>NSView</string>
+                               <key>currentRightSideView</key>
+                               <string>NSView</string>
+                               <key>customizeButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>displayBoxButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>displayModeButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>findArrayController</key>
+                               <string>NSArrayController</string>
+                               <key>findButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>findTableView</key>
+                               <string>NSTableView</string>
+                               <key>findView</key>
+                               <string>NSView</string>
+                               <key>fontsButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>fullScreenButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>groupedFindArrayController</key>
+                               <string>NSArrayController</string>
+                               <key>groupedFindTableView</key>
+                               <string>NSTableView</string>
+                               <key>groupedFindView</key>
+                               <string>NSView</string>
+                               <key>infoButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>leftPaneButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>leftSideButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>leftSideCollapsibleView</key>
+                               <string>BDSKCollapsibleView</string>
+                               <key>leftSideContentView</key>
+                               <string>NSView</string>
+                               <key>leftSideEdgeView</key>
+                               <string>BDSKEdgeView</string>
+                               <key>leftSideGradientView</key>
+                               <string>BDSKGradientView</string>
+                               <key>leftSideView</key>
+                               <string>NSView</string>
+                               <key>lineNoteButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>linesButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>markupNoteButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>nextPageButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>noteArrayController</key>
+                               <string>NSArrayController</string>
+                               <key>noteButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>noteOutlineView</key>
+                               <string>SKNoteOutlineView</string>
+                               <key>noteSearchField</key>
+                               <string>NSSearchField</string>
+                               <key>noteView</key>
+                               <string>NSView</string>
+                               <key>outlineView</key>
+                               <string>SKTocOutlineView</string>
+                               <key>ownerController</key>
+                               <string>NSObjectController</string>
+                               <key>pageNumberField</key>
+                               <string>NSTextField</string>
+                               <key>pdfEdgeView</key>
+                               <string>BDSKEdgeView</string>
+                               <key>pdfSplitView</key>
+                               <string>SKSplitView</string>
+                               <key>pdfView</key>
+                               <string>SKPDFView</string>
+                               <key>presentationButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>previousNextFirstLastPageButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>previousNextPageButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>previousPageButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>printButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>rightPaneButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>rightSideButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>rightSideCollapsibleView</key>
+                               <string>BDSKCollapsibleView</string>
+                               <key>rightSideContentView</key>
+                               <string>NSView</string>
+                               <key>rightSideEdgeView</key>
+                               <string>BDSKEdgeView</string>
+                               <key>rightSideGradientView</key>
+                               <string>BDSKGradientView</string>
+                               <key>rightSideView</key>
+                               <string>NSView</string>
+                               <key>rotateLeftButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>rotateLeftRightButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>rotateRightButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>scaleField</key>
+                               <string>NSTextField</string>
+                               <key>searchField</key>
+                               <string>NSSearchField</string>
+                               <key>singleTwoUpButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>snapshotArrayController</key>
+                               <string>NSArrayController</string>
+                               <key>snapshotTableView</key>
+                               <string>SKSnapshotTableView</string>
+                               <key>snapshotView</key>
+                               <string>NSView</string>
+                               <key>splitView</key>
+                               <string>SKSplitView</string>
+                               <key>textNoteButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>thumbnailArrayController</key>
+                               <string>NSArrayController</string>
+                               <key>thumbnailTableView</key>
+                               <string>SKThumbnailTableView</string>
+                               <key>thumbnailView</key>
+                               <string>NSView</string>
+                               <key>tocView</key>
+                               <string>NSView</string>
+                               <key>toolModeButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>zoomActualButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>zoomFitButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>zoomInActualOutButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>zoomInOutButton</key>
+                               <string>NSSegmentedControl</string>
+                               <key>zoomSelectionButton</key>
+                               <string>NSSegmentedControl</string>
+                       </dict>
+                       <key>SUPERCLASS</key>
+                       <string>NSWindowController</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>changeDashPattern</key>
+                               <string>id</string>
+                               <key>changeEndLineStyle</key>
+                               <string>id</string>
+                               <key>changeLineStyle</key>
+                               <string>id</string>
+                               <key>changeLineWidth</key>
+                               <string>id</string>
+                               <key>changeStartLineStyle</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>NSObject</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>SKSplitView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSSplitView</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>SKSnapshotTableView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>SKThumbnailTableView</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>startAnimation</key>
+                               <string>id</string>
+                               <key>stopAnimation</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKStatusBar</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>OUTLETS</key>
+                       <dict>
+                               <key>leftCell</key>
+                               <string>id</string>
+                               <key>rightCell</key>
+                               <string>id</string>
+                       </dict>
+                       <key>SUPERCLASS</key>
+                       <string>NSControl</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>BDSKEdgeView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>BDSKContainerView</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>checkForUpdates</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SUUpdater</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSObject</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>NSWindow</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSResponder</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>SKColorSwatch</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>OUTLETS</key>
+                       <dict>
+                               <key>target</key>
+                               <string>id</string>
+                       </dict>
+                       <key>SUPERCLASS</key>
+                       <string>NSControl</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>convertNotes</key>
+                               <string>id</string>
+                               <key>emailArchive</key>
+                               <string>id</string>
+                               <key>emailDiskImage</key>
+                               <string>id</string>
+                               <key>readNotes</key>
+                               <string>id</string>
+                               <key>saveArchive</key>
+                               <string>id</string>
+                               <key>saveDiskImage</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKPDFDocument</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>OUTLETS</key>
+                       <dict>
+                               <key>readNotesAccessoryView</key>
+                               <string>NSView</string>
+                               <key>replaceNotesCheckButton</key>
+                               <string>NSButton</string>
+                       </dict>
+                       <key>SUPERCLASS</key>
+                       <string>NSDocument</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>NSDocument</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSObject</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>SKBookmarkOutlineView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <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>
+                               <string>id</string>
+                               <key>openBookmark</key>
+                               <string>id</string>
+                               <key>orderFrontLineInspector</key>
+                               <string>id</string>
+                               <key>orderFrontNotesPanel</key>
+                               <string>id</string>
+                               <key>saveCurrentOpenDocuments</key>
+                               <string>id</string>
+                               <key>showDownloads</key>
+                               <string>id</string>
+                               <key>showPreferencePanel</key>
+                               <string>id</string>
+                               <key>showReleaseNotes</key>
+                               <string>id</string>
+                               <key>visitWebSite</key>
+                               <string>id</string>
+                               <key>visitWiki</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKApplicationController</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSObject</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>BDSKCollapsibleView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>BDSKContainerView</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>NSView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSResponder</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>NSMenuItem</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSObject</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>addBookmark</key>
+                               <string>id</string>
+                               <key>addSessionBookmark</key>
+                               <string>id</string>
+                               <key>allGoToFirstPage</key>
+                               <string>id</string>
+                               <key>allGoToLastPage</key>
+                               <string>id</string>
+                               <key>allGoToNextPage</key>
+                               <string>id</string>
+                               <key>allGoToPreviousPage</key>
+                               <string>id</string>
+                               <key>alternatePaste</key>
+                               <string>id</string>
+                               <key>alternateZoomToFit</key>
+                               <string>id</string>
+                               <key>autoCropAll</key>
+                               <string>id</string>
+                               <key>autoSelectContent</key>
+                               <string>id</string>
+                               <key>changeAnnotationMode</key>
+                               <string>id</string>
+                               <key>changeDisplayBox</key>
+                               <string>id</string>
+                               <key>changeLeftSidePaneState</key>
+                               <string>id</string>
+                               <key>changeRightSidePaneState</key>
+                               <string>id</string>
+                               <key>changeToolMode</key>
+                               <string>id</string>
+                               <key>chooseTransition</key>
+                               <string>id</string>
+                               <key>convertNotes</key>
+                               <string>id</string>
+                               <key>createNewNote</key>
+                               <string>id</string>
+                               <key>crop</key>
+                               <string>id</string>
+                               <key>cropAll</key>
+                               <string>id</string>
+                               <key>deselectAll</key>
+                               <string>id</string>
+                               <key>displayCropBox</key>
+                               <string>id</string>
+                               <key>displayFacingPages</key>
+                               <string>id</string>
+                               <key>displayMediaBox</key>
+                               <string>id</string>
+                               <key>displaySinglePages</key>
+                               <string>id</string>
+                               <key>doGoBack</key>
+                               <string>id</string>
+                               <key>doGoForward</key>
+                               <string>id</string>
+                               <key>doGoToFirstPage</key>
+                               <string>id</string>
+                               <key>doGoToLastPage</key>
+                               <string>id</string>
+                               <key>doGoToNextPage</key>
+                               <string>id</string>
+                               <key>doGoToPage</key>
+                               <string>id</string>
+                               <key>doGoToPreviousPage</key>
+                               <string>id</string>
+                               <key>doZoomIn</key>
+                               <string>id</string>
+                               <key>doZoomOut</key>
+                               <string>id</string>
+                               <key>doZoomToActualSize</key>
+                               <string>id</string>
+                               <key>doZoomToFit</key>
+                               <string>id</string>
+                               <key>doZoomToPhysicalSize</key>
+                               <string>id</string>
+                               <key>doZoomToSelection</key>
+                               <string>id</string>
+                               <key>editBookmarks</key>
+                               <string>id</string>
+                               <key>editNote</key>
+                               <string>id</string>
+                               <key>emailArchive</key>
+                               <string>id</string>
+                               <key>emailDiskImage</key>
+                               <string>id</string>
+                               <key>getInfo</key>
+                               <string>id</string>
+                               <key>goToMarkedPage</key>
+                               <string>id</string>
+                               <key>markPage</key>
+                               <string>id</string>
+                               <key>newDocumentFromClipboard</key>
+                               <string>id</string>
+                               <key>orderFrontLineInspector</key>
+                               <string>id</string>
+                               <key>orderFrontNotesPanel</key>
+                               <string>id</string>
+                               <key>password</key>
+                               <string>id</string>
+                               <key>performFit</key>
+                               <string>id</string>
+                               <key>readNotes</key>
+                               <string>id</string>
+                               <key>rotateAllLeft</key>
+                               <string>id</string>
+                               <key>rotateAllRight</key>
+                               <string>id</string>
+                               <key>rotateLeft</key>
+                               <string>id</string>
+                               <key>rotateRight</key>
+                               <string>id</string>
+                               <key>saveArchive</key>
+                               <string>id</string>
+                               <key>saveDiskImage</key>
+                               <string>id</string>
+                               <key>savePDFSettingToDefaults</key>
+                               <string>id</string>
+                               <key>searchPDF</key>
+                               <string>id</string>
+                               <key>smartAutoCropAll</key>
+                               <string>id</string>
+                               <key>takeSnapshot</key>
+                               <string>id</string>
+                               <key>toggleAutoScale</key>
+                               <string>id</string>
+                               <key>toggleDisplayAsBook</key>
+                               <string>id</string>
+                               <key>toggleDisplayContinuous</key>
+                               <string>id</string>
+                               <key>toggleDisplayPageBreaks</key>
+                               <string>id</string>
+                               <key>toggleFullScreen</key>
+                               <string>id</string>
+                               <key>toggleHideNotes</key>
+                               <string>id</string>
+                               <key>toggleLeftSidePane</key>
+                               <string>id</string>
+                               <key>togglePresentation</key>
+                               <string>id</string>
+                               <key>toggleReadingBar</key>
+                               <string>id</string>
+                               <key>toggleRightSidePane</key>
+                               <string>id</string>
+                               <key>toggleSplitPDF</key>
+                               <string>id</string>
+                               <key>toggleStatusBar</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>FirstResponder</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSObject</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>addAnnotation</key>
+                               <string>id</string>
+                               <key>alternatePaste</key>
+                               <string>id</string>
+                               <key>autoSelectContent</key>
+                               <string>id</string>
+                               <key>changeAnnotationMode</key>
+                               <string>id</string>
+                               <key>changeToolMode</key>
+                               <string>id</string>
+                               <key>copy</key>
+                               <string>id</string>
+                               <key>cut</key>
+                               <string>id</string>
+                               <key>delete</key>
+                               <string>id</string>
+                               <key>deselectAll</key>
+                               <string>id</string>
+                               <key>editActiveAnnotation</key>
+                               <string>id</string>
+                               <key>editThisAnnotation</key>
+                               <string>id</string>
+                               <key>endAnnotationEdit</key>
+                               <string>id</string>
+                               <key>paste</key>
+                               <string>id</string>
+                               <key>pasteAsPlainText</key>
+                               <string>id</string>
+                               <key>removeActiveAnnotation</key>
+                               <string>id</string>
+                               <key>removeThisAnnotation</key>
+                               <string>id</string>
+                               <key>selectNextActiveAnnotation</key>
+                               <string>id</string>
+                               <key>selectPreviousActiveAnnotation</key>
+                               <string>id</string>
+                               <key>takeSnapshot</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKPDFView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>PDFView</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>BDSKContainerView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>OUTLETS</key>
+                       <dict>
+                               <key>contentView</key>
+                               <string>id</string>
+                       </dict>
+                       <key>SUPERCLASS</key>
+                       <string>NSView</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>newDocumentFromClipboard</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKDocumentController</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSDocumentController</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>copy</key>
+                               <string>id</string>
+                               <key>delete</key>
+                               <string>id</string>
+                               <key>scrollToBeginningOfDocument</key>
+                               <string>id</string>
+                               <key>scrollToEndOfDocument</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKTableView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSTableView</string>
+               </dict>
+               <dict>
+                       <key>ACTIONS</key>
+                       <dict>
+                               <key>copy</key>
+                               <string>id</string>
+                               <key>delete</key>
+                               <string>id</string>
+                               <key>scrollToBeginningOfDocument</key>
+                               <string>id</string>
+                               <key>scrollToEndOfDocument</key>
+                               <string>id</string>
+                       </dict>
+                       <key>CLASS</key>
+                       <string>SKOutlineView</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSOutlineView</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
+                       <string>NSResponder</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSObject</string>
+               </dict>
+       </array>
+       <key>IBVersion</key>
+       <string>1</string>
+</dict>
+</plist>

Modified: trunk/English.lproj/MainMenu.nib/info.nib
===================================================================
--- trunk/English.lproj/MainMenu.nib/info.nib   2008-08-15 09:49:12 UTC (rev 
4411)
+++ trunk/English.lproj/MainMenu.nib/info.nib   2008-08-15 12:52:03 UTC (rev 
4412)
@@ -2,20 +2,19 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
 <plist version="1.0">
 <dict>
-       <key>IBDocumentLocation</key>
-       <string>23 68 356 240 0 0 1440 938 </string>
-       <key>IBEditorPositions</key>
-       <dict>
-               <key>29</key>
-               <string>140 614 584 44 0 0 1440 938 </string>
-       </dict>
        <key>IBFramework Version</key>
-       <string>489.0</string>
+       <string>670</string>
+       <key>IBLastKnownRelativeProjectPath</key>
+       <string>../Skim.xcodeproj</string>
+       <key>IBOldestOS</key>
+       <integer>5</integer>
        <key>IBOpenObjects</key>
        <array>
-               <integer>29</integer>
+               <integer>700</integer>
        </array>
        <key>IBSystem Version</key>
-       <string>9D34</string>
+       <string>9E17</string>
+       <key>targetFramework</key>
+       <string>IBCocoaFramework</string>
 </dict>
 </plist>

Modified: trunk/NSImage_SKExtensions.h
===================================================================
--- trunk/NSImage_SKExtensions.h        2008-08-15 09:49:12 UTC (rev 4411)
+++ trunk/NSImage_SKExtensions.h        2008-08-15 12:52:03 UTC (rev 4412)
@@ -139,6 +139,9 @@
 + (NSImage *)smallMissingFileImage;
 + (NSImage *)tinyMissingFileImage;
 
++ (NSImage *)smallMultipleFilesImage;
++ (NSImage *)tinyMultipleFilesImage;
+
 - (void)drawFlippedInRect:(NSRect)dstRect fromRect:(NSRect)srcRect 
operation:(NSCompositingOperation)op fraction:(float)delta;
 - (void)drawFlipped:(BOOL)isFlipped inRect:(NSRect)dstRect 
fromRect:(NSRect)srcRect operation:(NSCompositingOperation)op 
fraction:(float)delta;
 

Modified: trunk/NSImage_SKExtensions.m
===================================================================
--- trunk/NSImage_SKExtensions.m        2008-08-15 09:49:12 UTC (rev 4411)
+++ trunk/NSImage_SKExtensions.m        2008-08-15 12:52:03 UTC (rev 4412)
@@ -2211,6 +2211,34 @@
     return image;
 }
 
++ (NSImage *)smallMultipleFilesImage {
+    static NSImage *image = nil;
+    if(image == nil) {
+        image = [[NSImage alloc] initWithSize:smallImageSize];
+        NSImage *multipleFilesImage = [[NSWorkspace sharedWorkspace] 
iconForFiles:[NSArray arrayWithObjects:@"", @"", nil]];
+        NSRect sourceRect = {NSZeroPoint, [multipleFilesImage size]};
+        NSRect targetRect = {NSZeroPoint, smallImageSize};
+        [image lockFocus];
+        [multipleFilesImage drawInRect:targetRect fromRect:sourceRect 
operation:NSCompositeCopy fraction:1.0];
+        [image unlockFocus];
+    }
+    return image;
+}
+
++ (NSImage *)tinyMultipleFilesImage {
+    static NSImage *image = nil;
+    if(image == nil) {
+        image = [[NSImage alloc] initWithSize:tinyImageSize];
+        NSImage *multipleFilesImage = [[NSWorkspace sharedWorkspace] 
iconForFiles:[NSArray arrayWithObjects:@"", @"", nil]];
+        NSRect sourceRect = {NSZeroPoint, [multipleFilesImage size]};
+        NSRect targetRect = {NSZeroPoint, tinyImageSize};
+        [image lockFocus];
+        [multipleFilesImage drawInRect:targetRect fromRect:sourceRect 
operation:NSCompositeCopy fraction:1.0];
+        [image unlockFocus];
+    }
+    return image;
+}
+
 - (void)drawFlippedInRect:(NSRect)dstRect fromRect:(NSRect)srcRect 
operation:(NSCompositingOperation)op fraction:(float)delta {
     [NSGraphicsContext saveGraphicsState];
     NSAffineTransform *transform = [NSAffineTransform transform];

Modified: trunk/SKBookmark.h
===================================================================
--- trunk/SKBookmark.h  2008-08-15 09:49:12 UTC (rev 4411)
+++ trunk/SKBookmark.h  2008-08-15 12:52:03 UTC (rev 4412)
@@ -41,6 +41,7 @@
 enum {
     SKBookmarkTypeBookmark,
     SKBookmarkTypeFolder,
+    SKBookmarkTypeSession,
     SKBookmarkTypeSeparator
 };
 
@@ -50,6 +51,7 @@
 
 - (id)initWithPath:(NSString *)aPath pageIndex:(unsigned)aPageIndex 
label:(NSString *)aLabel;
 - (id)initFolderWithChildren:(NSArray *)aChildren label:(NSString *)aLabel;
+- (id)initSessionWithChildren:(NSArray *)aChildren label:(NSString *)aLabel;
 - (id)initFolderWithLabel:(NSString *)aLabel;
 - (id)initSeparator;
 - (id)initWithProperties:(NSDictionary *)dictionary;

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2008-08-15 09:49:12 UTC (rev 4411)
+++ trunk/SKBookmark.m  2008-08-15 12:52:03 UTC (rev 4412)
@@ -42,6 +42,7 @@
 #import "SKRuntime.h"
 
 static NSString *SKBookmarkTypeBookmarkString = @"bookmark";
+static NSString *SKBookmarkTypeSessionString = @"session";
 static NSString *SKBookmarkTypeFolderString = @"folder";
 static NSString *SKBookmarkTypeSeparatorString = @"separator";
 
@@ -69,6 +70,9 @@
 }
 @end
 
[EMAIL PROTECTED] SKSessionBookmark : SKFolderBookmark
[EMAIL PROTECTED]
+
 @interface SKSeparatorBookmark : SKBookmark
 @end
 
@@ -113,6 +117,12 @@
     return [self initFolderWithChildren:[NSArray array] label:aLabel];
 }
 
+- (id)initSessionWithChildren:(NSArray *)aChildren label:(NSString *)aLabel {
+    if (self != defaultPlaceholderBookmark)
+        [self release];
+    return [[SKSessionBookmark alloc] initSessionWithChildren:aChildren 
label:aLabel];
+}
+
 - (id)initSeparator {
     if (self != defaultPlaceholderBookmark)
         [self release];
@@ -129,6 +139,13 @@
         return [self initFolderWithChildren:newChildren label:[dictionary 
objectForKey:SKBookmarkLabelKey]];
     } else if ([[dictionary objectForKey:SKBookmarkTypeKey] 
isEqualToString:SKBookmarkTypeSeparatorString]) {
         return [self initSeparator];
+    } else if ([[dictionary objectForKey:SKBookmarkTypeKey] 
isEqualToString:SKBookmarkTypeSessionString]) {
+        NSEnumerator *dictEnum = [[dictionary 
objectForKey:SKBookmarkChildrenKey] objectEnumerator];
+        NSDictionary *dict;
+        NSMutableArray *newChildren = [NSMutableArray array];
+        while (dict = [dictEnum nextObject])
+            [newChildren addObject:[[[[self class] alloc] 
initWithProperties:dict] autorelease]];
+        return [self initSessionWithChildren:newChildren label:[dictionary 
objectForKey:SKBookmarkLabelKey]];
     } else {
         return [self initWithAlias:[BDAlias aliasWithData:[dictionary 
objectForKey:SKBookmarkAliasDataKey]] pageIndex:[[dictionary 
objectForKey:SKBookmarkPageIndexKey] unsignedIntValue] label:[dictionary 
objectForKey:SKBookmarkLabelKey]];
     }
@@ -157,6 +174,8 @@
 - (unsigned int)pageIndex { return NSNotFound; }
 - (NSNumber *)pageNumber { return nil; }
 
+- (NSArray *)session { return nil; }
+
 - (NSArray *)children { return nil; }
 - (unsigned int)countOfChildren { return 0; }
 - (SKBookmark *)objectInChildrenAtIndex:(unsigned int)anIndex { return nil; }
@@ -375,6 +394,28 @@
 
 #pragma mark -
 
[EMAIL PROTECTED] SKSessionBookmark
+
+- (id)initSessionWithChildren:(NSArray *)aChildren label:(NSString *)aLabel {
+    return [super initFolderWithChildren:aChildren label:aLabel];
+}
+
+- (NSDictionary *)properties {
+    return [NSDictionary 
dictionaryWithObjectsAndKeys:SKBookmarkTypeSessionString, SKBookmarkTypeKey, 
[children valueForKey:SKBookmarkPropertiesKey], SKBookmarkChildrenKey, label, 
SKBookmarkLabelKey, nil];
+}
+
+- (int)bookmarkType {
+    return SKBookmarkTypeSession;
+}
+
+- (NSImage *)icon {
+    return [NSImage tinyMultipleFilesImage];
+}
+
[EMAIL PROTECTED]
+
+#pragma mark -
+
 @implementation SKSeparatorBookmark
 
 - (id)copyWithZone:(NSZone *)aZone {

Modified: trunk/SKBookmarkController.h
===================================================================
--- trunk/SKBookmarkController.h        2008-08-15 09:49:12 UTC (rev 4411)
+++ trunk/SKBookmarkController.h        2008-08-15 12:52:03 UTC (rev 4412)
@@ -55,6 +55,8 @@
 - (SKBookmark *)bookmarkRoot;
 
 - (void)addBookmarkForPath:(NSString *)path pageIndex:(unsigned)pageIndex 
label:(NSString *)label toFolder:(SKBookmark *)folder;
+- (void)addBookmarkForPaths:(NSArray *)paths pageIndexes:(NSArray 
*)pageIndexes label:(NSString *)label toFolder:(SKBookmark *)folder;
+- (void)openBookmark:(SKBookmark *)bookmark;
 - (void)openBookmarks:(NSArray *)items;
 
 - (IBAction)doubleClickBookmark:(id)sender;

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2008-08-15 09:49:12 UTC (rev 4411)
+++ trunk/SKBookmarkController.m        2008-08-15 12:52:03 UTC (rev 4412)
@@ -235,6 +235,27 @@
     }
 }
 
+- (void)addBookmarkForPaths:(NSArray *)paths pageIndexes:(NSArray 
*)pageIndexes label:(NSString *)label toFolder:(SKBookmark *)folder {
+    NSEnumerator *pathEnum = [paths objectEnumerator];
+    NSEnumerator *pageEnum = [pageIndexes objectEnumerator];
+    NSString *path;
+    NSNumber *page;
+    NSMutableArray *children = [NSMutableArray array];
+    SKBookmark *bookmark;
+    while ((path = [pathEnum nextObject]) && (page = [pageEnum nextObject])) {
+        bookmark = [[SKBookmark alloc] initWithPath:path pageIndex:[page 
unsignedIntValue] label:[path lastPathComponent]];
+        if (bookmark) {
+            [children addObject:bookmark];
+            [bookmark release];
+        }
+    }
+    if (folder == nil) folder = bookmarkRoot;
+    if (bookmark = [[SKBookmark alloc] initSessionWithChildren:children 
label:label]) {
+        [folder insertObject:bookmark inChildrenAtIndex:[folder 
countOfChildren]];
+        [bookmark release];
+    }
+}
+
 - (NSArray *)draggedBookmarks {
     return draggedBookmarks;
 }
@@ -331,22 +352,32 @@
     return bookmarksPath;
 }
 
+- (void)openBookmark:(SKBookmark *)bookmark {
+    id document = nil;
+    NSString *path = [bookmark path];
+    NSURL *fileURL = path ? [NSURL fileURLWithPath:path] : nil;
+    NSError *error;
+    
+    if (fileURL && NO == SKFileIsInTrash(fileURL)) {
+        if (document = [[NSDocumentController sharedDocumentController] 
openDocumentWithContentsOfURL:fileURL display:YES error:&error]) {
+            [[document mainWindowController] setPageNumber:[bookmark 
pageIndex] + 1];
+        } else {
+            [NSApp presentError:error];
+        }
+    }
+}
+
 - (void)openBookmarks:(NSArray *)items {
     NSEnumerator *bmEnum = [items objectEnumerator];
     SKBookmark *bm;
     
     while (bm = [bmEnum nextObject]) {
-        id document = nil;
-        NSString *path = [bm path];
-        NSURL *fileURL = path ? [NSURL fileURLWithPath:path] : nil;
-        NSError *error;
-        
-        if (fileURL && NO == SKFileIsInTrash(fileURL)) {
-            if (document = [[NSDocumentController sharedDocumentController] 
openDocumentWithContentsOfURL:fileURL display:YES error:&error]) {
-                [[document mainWindowController] setPageNumber:[bm pageIndex] 
+ 1];
-            } else {
-                [NSApp presentError:error];
-            }
+        if ([bm bookmarkType] == SKBookmarkTypeSession) {
+            int i = [bm countOfChildren];
+            while (i--)
+                [self openBookmark:[bm objectInChildrenAtIndex:i]];
+        } else if ([bm bookmarkType] == SKBookmarkTypeBookmark) {
+            [self openBookmark:bm];
         }
     }
 }
@@ -539,7 +570,8 @@
 #pragma mark NSOutlineView datasource methods
 
 - (int)outlineView:(NSOutlineView *)ov numberOfChildrenOfItem:(id)item {
-    return [(item ?: bookmarkRoot) countOfChildren];
+    if (item == nil) item = bookmarkRoot;
+    return [item bookmarkType] == SKBookmarkTypeFolder ? [item 
countOfChildren] : 0;
 }
 
 - (BOOL)outlineView:(NSOutlineView *)ov isItemExpandable:(id)item {
@@ -555,7 +587,7 @@
     if ([tcID isEqualToString:@"label"]) {
         return [NSDictionary dictionaryWithObjectsAndKeys:[item label], 
SKTextWithIconCellStringKey, [item icon], SKTextWithIconCellImageKey, nil];
     } else if ([tcID isEqualToString:@"file"]) {
-        if ([item bookmarkType] == SKBookmarkTypeFolder) {
+        if ([item bookmarkType] == SKBookmarkTypeFolder || [item bookmarkType] 
== SKBookmarkTypeSession) {
             int count = [item countOfChildren];
             return count == 1 ? NSLocalizedString(@"1 item", @"Bookmark folder 
description") : [NSString stringWithFormat:NSLocalizedString(@"%i items", 
@"Bookmark folder description"), count];
         } else {
@@ -639,7 +671,7 @@
 
 - (void)outlineView:(NSOutlineView *)ov willDisplayCell:(id)cell 
forTableColumn:(NSTableColumn *)tableColumn item:(id)item {
     if ([[tableColumn identifier] isEqualToString:@"file"]) {
-        if ([item bookmarkType] == SKBookmarkTypeFolder)
+        if ([item bookmarkType] == SKBookmarkTypeFolder || [item bookmarkType] 
== SKBookmarkTypeSession)
             [cell setTextColor:[NSColor disabledControlTextColor]];
         else
             [cell setTextColor:[NSColor controlTextColor]];

Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h      2008-08-15 09:49:12 UTC (rev 4411)
+++ trunk/SKMainWindowController.h      2008-08-15 12:52:03 UTC (rev 4412)
@@ -447,6 +447,7 @@
 - (void)updateSnapshotsIfNeeded;
 - (void)updateSnapshot:(NSTimer *)timer;
 
+- (IBAction)addSessionBookmark:(id)sender;
 - (IBAction)addBookmark:(id)sender;
 
 - (void)addAnnotationsFromDictionaries:(NSArray *)noteDicts 
undoable:(BOOL)undoable;

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2008-08-15 09:49:12 UTC (rev 4411)
+++ trunk/SKMainWindowController.m      2008-08-15 12:52:03 UTC (rev 4412)
@@ -2120,6 +2120,34 @@
           contextInfo:NULL];
 }
 
+- (void)sessionBookmarkSheetDidEnd:(SKBookmarkSheetController *)controller 
returnCode:(int)returnCode contextInfo:(void *)contextInfo {
+    if (returnCode == NSAlertDefaultReturn) {
+        SKBookmarkController *bmController = [SKBookmarkController 
sharedBookmarkController];
+        NSString *label = [controller stringValue];
+        NSEnumerator *docEnum = [[NSApp orderedDocuments] objectEnumerator];
+        SKPDFDocument *doc;
+        NSMutableArray *paths = [NSMutableArray array];
+        NSMutableArray *pageIndexes = [NSMutableArray array];
+        while (doc = [docEnum nextObject]) {
+            [paths addObject:[doc fileName]];
+            [pageIndexes addObject:[NSNumber numberWithUnsignedInt:[[[doc 
pdfView] currentPage] pageIndex]]];
+        }
+        [bmController addBookmarkForPaths:paths pageIndexes:pageIndexes 
label:label toFolder:[controller selectedFolder]];
+    }
+}
+
+- (IBAction)addSessionBookmark:(id)sender {
+    if (bookmarkSheetController == nil)
+        bookmarkSheetController = [[SKBookmarkSheetController alloc] init];
+    
+       [bookmarkSheetController setStringValue:[[self document] displayName]];
+    
+    [bookmarkSheetController beginSheetModalForWindow: [self window]
+        modalDelegate:self 
+       
didEndSelector:@selector(sessionBookmarkSheetDidEnd:returnCode:contextInfo:)
+          contextInfo:NULL];
+}
+
 - (IBAction)toggleReadingBar:(id)sender {
     [pdfView toggleReadingBar];
 }


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

Reply via email to