Revision: 7015
http://skim-app.svn.sourceforge.net/skim-app/?rev=7015&view=rev
Author: hofman
Date: 2010-12-28 10:28:56 +0000 (Tue, 28 Dec 2010)
Log Message:
-----------
add alternate menu items for folder bookmarks to open all its containing
bookmarks
Modified Paths:
--------------
trunk/SKApplicationController.m
trunk/SKBookmark.h
trunk/SKBookmark.m
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2010-12-26 11:21:09 UTC (rev 7014)
+++ trunk/SKApplicationController.m 2010-12-28 10:28:56 UTC (rev 7015)
@@ -349,6 +349,11 @@
[item setRepresentedObject:bm];
[item setImageAndSize:[bm icon]];
[[item submenu] setDelegate:self];
+ item = [menu addItemWithTitle:[bm label]
action:@selector(openBookmarkAction:) target:self];
+ [item setRepresentedObject:bm];
+ [item setKeyEquivalentModifierMask:NSAlternateKeyMask];
+ [item setAlternate:YES];
+ [item setImageAndSize:[bm alternateIcon]];
break;
case SKBookmarkTypeSeparator:
[menu addItem:[NSMenuItem separatorItem]];
Modified: trunk/SKBookmark.h
===================================================================
--- trunk/SKBookmark.h 2010-12-26 11:21:09 UTC (rev 7014)
+++ trunk/SKBookmark.h 2010-12-28 10:28:56 UTC (rev 7015)
@@ -70,7 +70,7 @@
@property (nonatomic, readonly) NSDictionary *properties;
@property (nonatomic, readonly) SKBookmarkType bookmarkType;
@property (nonatomic, retain) NSString *label;
-...@property (nonatomic, readonly) NSImage *icon;
+...@property (nonatomic, readonly) NSImage *icon, *alternateIcon;
@property (nonatomic, readonly) NSString *path;
@property (nonatomic) NSUInteger pageIndex;
@property (nonatomic, retain) NSNumber *pageNumber;
Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m 2010-12-26 11:21:09 UTC (rev 7014)
+++ trunk/SKBookmark.m 2010-12-28 10:28:56 UTC (rev 7015)
@@ -90,7 +90,7 @@
@implementation SKBookmark
@synthesize parent;
-...@dynamic properties, bookmarkType, label, icon, path, pageIndex,
pageNumber, scriptingFile, scriptingParent, entireContents;
+...@dynamic properties, bookmarkType, label, icon, alternateIcon, path,
pageIndex, pageNumber, scriptingFile, scriptingParent, entireContents;
static SKPlaceholderBookmark *defaultPlaceholderBookmark = nil;
static Class SKBookmarkClass = Nil;
@@ -208,6 +208,7 @@
- (SKBookmarkType)bookmarkType { return SKBookmarkTypeSeparator; }
- (NSImage *)icon { return nil; }
+- (NSImage *)alternateIcon { return [self icon]; }
- (NSString *)label { return nil; }
- (void)setLabel:(NSString *)newLabel {}
@@ -541,6 +542,10 @@
return [[NSWorkspace sharedWorkspace]
iconForFileType:NSFileTypeForHFSTypeCode(kGenericFolderIcon)];
}
+- (NSImage *)alternateIcon {
+ return [NSImage imageNamed:NSImageNameMultipleDocuments];
+}
+
- (NSString *)label {
return label ?: @"";
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit