Revision: 4610
http://skim-app.svn.sourceforge.net/skim-app/?rev=4610&view=rev
Author: hofman
Date: 2008-09-11 10:19:01 +0000 (Thu, 11 Sep 2008)
Log Message:
-----------
Display page label for remote GoTo actions in outline
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
trunk/SKPDFOutline.h
trunk/SKPDFOutline.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2008-09-11 10:03:42 UTC (rev 4609)
+++ trunk/SKMainWindowController_UI.m 2008-09-11 10:19:01 UTC (rev 4610)
@@ -559,7 +559,7 @@
if([tcID isEqualToString:SKMainWindowLabelColumnIdentifer]) {
return [(SKPDFOutline *)item label];
} else if([tcID isEqualToString:SKMainWindowPageColumnIdentifer]) {
- return [[(SKPDFOutline *)item page] displayLabel];
+ return [(SKPDFOutline *)item pageLabel];
}
} else if ([ov isEqual:noteOutlineView]) {
NSString *tcID = [tableColumn identifier];
Modified: trunk/SKPDFOutline.h
===================================================================
--- trunk/SKPDFOutline.h 2008-09-11 10:03:42 UTC (rev 4609)
+++ trunk/SKPDFOutline.h 2008-09-11 10:19:01 UTC (rev 4610)
@@ -63,6 +63,8 @@
- (PDFPage *)page;
+- (NSString *)pageLabel;
+
- (BOOL)isOpen;
@end
Modified: trunk/SKPDFOutline.m
===================================================================
--- trunk/SKPDFOutline.m 2008-09-11 10:03:42 UTC (rev 4609)
+++ trunk/SKPDFOutline.m 2008-09-11 10:19:01 UTC (rev 4610)
@@ -38,6 +38,7 @@
*/
#import "SKPDFOutline.h"
+#import "PDFPage_SKExtensions.h"
@implementation SKPDFOutline
@@ -112,6 +113,16 @@
return nil;
}
+- (NSString *)pageLabel {
+ PDFPage *page = [self page];
+ if (page)
+ return [page displayLabel];
+ else if ([outline respondsToSelector:@selector(action)] && [[outline
action] respondsToSelector:@selector(pageIndex)])
+ return [NSString stringWithFormat:@"%u", [(PDFActionRemoteGoTo
*)[outline action] pageIndex] + 1];
+ else
+ return nil;
+}
+
- (BOOL)isOpen {
if ([outline respondsToSelector:_cmd])
return [outline isOpen];
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