Revision: 7543
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7543&view=rev
Author:   hofman
Date:     2011-11-19 19:03:32 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
collapse/expand all items in toc table using Opt-Cmd-arrow

Modified Paths:
--------------
    trunk/SKTocOutlineView.m

Modified: trunk/SKTocOutlineView.m
===================================================================
--- trunk/SKTocOutlineView.m    2011-11-19 12:14:01 UTC (rev 7542)
+++ trunk/SKTocOutlineView.m    2011-11-19 19:03:32 UTC (rev 7543)
@@ -40,6 +40,7 @@
 #import "SKTypeSelectHelper.h"
 #import "NSColor_SKExtensions.h"
 #import "SKImageToolTipWindow.h"
+#import "NSEvent_SKExtensions.h"
 
 
 @implementation SKTocOutlineView
@@ -212,6 +213,18 @@
         [[SKImageToolTipWindow sharedToolTipWindow] fadeOut];
 }
 
+- (void)keyDown:(NSEvent *)theEvent {
+    unichar eventChar = [theEvent firstCharacter];
+       NSUInteger modifiers = [theEvent standardModifierFlags];
+    
+    if (eventChar == NSLeftArrowFunctionKey && modifiers == (NSCommandKeyMask 
| NSAlternateKeyMask))
+        [self collapseItem:nil collapseChildren:YES];
+    else if (eventChar == NSRightArrowFunctionKey && modifiers == 
(NSCommandKeyMask | NSAlternateKeyMask))
+        [self expandItem:nil expandChildren:YES];
+    else
+        [super keyDown:theEvent];
+}
+
 #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKTocOutlineViewDelegate>)delegate {
     return (id <SKTocOutlineViewDelegate>)[super delegate];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to