Revision: 4700
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4700&view=rev
Author:   hofman
Date:     2008-09-27 22:32:07 +0000 (Sat, 27 Sep 2008)

Log Message:
-----------
Set double-click action on note outline view rather than use bindings. Using 
bindings has the weird (and buggy?) side effect that the thumbnails are all 
reloaded.

Modified Paths:
--------------
    trunk/MainWindow.nib/classes.nib
    trunk/MainWindow.nib/info.nib
    trunk/MainWindow.nib/keyedobjects.nib
    trunk/SKMainWindowController.m
    trunk/SKMainWindowController_UI.m

Modified: trunk/MainWindow.nib/classes.nib
===================================================================
--- trunk/MainWindow.nib/classes.nib    2008-09-26 16:51:39 UTC (rev 4699)
+++ trunk/MainWindow.nib/classes.nib    2008-09-27 22:32:07 UTC (rev 4700)
@@ -48,6 +48,14 @@
                </dict>
                <dict>
                        <key>CLASS</key>
+                       <string>NSUserDefaultsController</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSController</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
                        <string>SKThumbnailTableView</string>
                        <key>LANGUAGE</key>
                        <string>ObjC</string>
@@ -71,6 +79,22 @@
                        <string>SKOutlineView</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>addBookmark</key>
@@ -411,22 +435,6 @@
                        <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>
@@ -449,19 +457,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>CLASS</key>
@@ -517,14 +525,6 @@
                        <string>NSControl</string>
                </dict>
                <dict>
-                       <key>CLASS</key>
-                       <string>SKAnnotationTypeImageCell</string>
-                       <key>LANGUAGE</key>
-                       <string>ObjC</string>
-                       <key>SUPERCLASS</key>
-                       <string>NSImageCell</string>
-               </dict>
-               <dict>
                        <key>ACTIONS</key>
                        <dict>
                                <key>editBookmarks</key>
@@ -565,6 +565,14 @@
                </dict>
                <dict>
                        <key>CLASS</key>
+                       <string>SKAnnotationTypeImageCell</string>
+                       <key>LANGUAGE</key>
+                       <string>ObjC</string>
+                       <key>SUPERCLASS</key>
+                       <string>NSImageCell</string>
+               </dict>
+               <dict>
+                       <key>CLASS</key>
                        <string>SKSnapshotPageCell</string>
                        <key>LANGUAGE</key>
                        <string>ObjC</string>
@@ -595,6 +603,19 @@
                        <string>NSObject</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>addAnnotation</key>
@@ -645,19 +666,6 @@
                </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>CLASS</key>
                        <string>NSCell</string>
                        <key>LANGUAGE</key>
                        <string>ObjC</string>

Modified: trunk/MainWindow.nib/info.nib
===================================================================
--- trunk/MainWindow.nib/info.nib       2008-09-26 16:51:39 UTC (rev 4699)
+++ trunk/MainWindow.nib/info.nib       2008-09-27 22:32:07 UTC (rev 4700)
@@ -11,10 +11,9 @@
        <key>IBOpenObjects</key>
        <array>
                <integer>513</integer>
-               <integer>503</integer>
        </array>
        <key>IBSystem Version</key>
-       <string>9E17</string>
+       <string>9F33</string>
        <key>targetFramework</key>
        <string>IBCocoaFramework</string>
 </dict>

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2008-09-26 16:51:39 UTC (rev 4699)
+++ trunk/SKMainWindowController.m      2008-09-27 22:32:07 UTC (rev 4700)
@@ -185,6 +185,8 @@
 - (void)goToFindResults:(NSArray *)findResults;
 - (void)updateFindResultHighlights:(BOOL)scroll;
 
+- (void)selectSelectedNote:(id)sender;
+
 - (void)updateNoteFilterPredicate;
 
 - (void)replaceSideView:(NSView *)oldView withView:(NSView *)newView 
animate:(BOOL)animate;
@@ -353,6 +355,9 @@
     [[[findTableView 
tableColumnWithIdentifier:SKMainWindowPageColumnIdentifer] headerCell] 
setTitle:NSLocalizedString(@"Page", @"Table header title")];
     [[[groupedFindTableView 
tableColumnWithIdentifier:SKMainWindowPageColumnIdentifer] headerCell] 
setTitle:NSLocalizedString(@"Page", @"Table header title")];
     
+    [noteOutlineView setDoubleAction:@selector(selectSelectedNote:)];
+    [noteOutlineView setTarget:self];
+    
     [pdfView setFrame:[[pdfEdgeView contentView] bounds]];
     
     if (usesDrawers) {
@@ -1335,6 +1340,17 @@
     } else NSBeep();
 }
 
+- (void)selectSelectedNote:(id)sender{
+    if ([pdfView hideNotes] == NO) {
+        NSArray *selectedNotes = [self selectedNotes];
+        if ([selectedNotes count] == 1) {
+            PDFAnnotation *annotation = [selectedNotes lastObject];
+            [pdfView scrollAnnotationToVisible:annotation];
+            [pdfView setActiveAnnotation:annotation];
+        }
+    } else NSBeep();
+}
+
 - (IBAction)editNote:(id)sender{
     if ([pdfView hideNotes] == NO) {
         [pdfView editActiveAnnotation:sender];

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2008-09-26 16:51:39 UTC (rev 4699)
+++ trunk/SKMainWindowController_UI.m   2008-09-27 22:32:07 UTC (rev 4700)
@@ -76,6 +76,8 @@
 
 @interface SKMainWindowController (SKPrivateMain)
 
+- (IBAction)selectSelectedNote:(id)sender;
+
 - (void)updateLeftStatus;
 - (void)updateRightStatus;
 
@@ -133,17 +135,6 @@
     }
 }
 
-- (void)selectSelectedNote{
-    if ([pdfView hideNotes] == NO) {
-        NSArray *selectedNotes = [self selectedNotes];
-        if ([selectedNotes count] == 1) {
-            PDFAnnotation *annotation = [selectedNotes lastObject];
-            [pdfView scrollAnnotationToVisible:annotation];
-            [pdfView setActiveAnnotation:annotation];
-        }
-    } else NSBeep();
-}
-
 #pragma mark UI updating
 
 - (void)updateFontPanel {
@@ -788,7 +779,7 @@
 
 - (void)outlineViewInsertNewline:(NSOutlineView *)ov {
     if ([ov isEqual:noteOutlineView]) {
-        [self selectSelectedNote];
+        [self selectSelectedNote:ov];
     }
 }
 


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