Revision: 7425
http://skim-app.svn.sourceforge.net/skim-app/?rev=7425&view=rev
Author: hofman
Date: 2011-08-08 09:23:53 +0000 (Mon, 08 Aug 2011)
Log Message:
-----------
separate method to get fileID for keychain
Modified Paths:
--------------
trunk/SKMainDocument.m
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2011-08-07 11:19:16 UTC (rev 7424)
+++ trunk/SKMainDocument.m 2011-08-08 09:23:53 UTC (rev 7425)
@@ -1600,8 +1600,12 @@
}
}
+- (NSString *)fileIDStringForDocument:(PDFDocument *)document {
+ return [[document fileIDStrings:originalData] lastObject] ?: [originalData
md5String];
+}
+
- (void)doSavePasswordInKeychain:(NSString *)password {
- NSString *fileID = [[[self pdfDocument] fileIDStrings:originalData]
lastObject] ?: [originalData md5String];
+ NSString *fileID = [self fileIDStringForDocument:[self pdfDocument]];
if (fileID) {
// first see if the password exists in the keychain
SecKeychainItemRef itemRef = NULL;
@@ -1644,7 +1648,7 @@
if ([document isLocked] == NO) {
didUnlock = YES;
} else if (NSAlertAlternateReturn != [[NSUserDefaults
standardUserDefaults] integerForKey:SKSavePasswordOptionKey]) {
- NSString *fileID = [[document fileIDStrings:originalData] lastObject]
?: [originalData md5String];
+ NSString *fileID = [self fileIDStringForDocument:document];
if (fileID) {
NSString *password = nil;
SecKeychainItemRef itemRef = NULL;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit