Revision: 18555
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18555&view=rev
Author: ununnilium
Date: 2012-03-15 10:53:14 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
Sort PubTableView by date and remove useless Dropbox error checking code
Modified Paths:
--------------
trunk/bibdesk_ios/BDSKAppDelegate.m
trunk/bibdesk_ios/BDSKPubTableViewController.m
trunk/bibdesk_ios/bibdesk/BibItem.m
Modified: trunk/bibdesk_ios/BDSKAppDelegate.m
===================================================================
--- trunk/bibdesk_ios/BDSKAppDelegate.m 2012-03-15 06:34:19 UTC (rev 18554)
+++ trunk/bibdesk_ios/BDSKAppDelegate.m 2012-03-15 10:53:14 UTC (rev 18555)
@@ -67,44 +67,13 @@
NSString* appKey = @"eq4q5w8c3389t6u";
NSString* appSecret = @"ezbmorda4ycilxx";
NSString *root = kDBRootAppFolder; // Should be set to either
kDBRootAppFolder or kDBRootDropbox
- // You can determine if you have App folder access or Full Dropbox along
with your consumer key/secret
- // from https://dropbox.com/developers/apps
- // Look below where the DBSession is created to understand how to use
DBSession in your app
-
- NSString* errorMsg = nil;
- if ([appKey rangeOfCharacterFromSet:[[NSCharacterSet
alphanumericCharacterSet] invertedSet]].location != NSNotFound) {
- errorMsg = @"Make sure you set the app key correctly in
DBRouletteAppDelegate.m";
- } else if ([appSecret rangeOfCharacterFromSet:[[NSCharacterSet
alphanumericCharacterSet] invertedSet]].location != NSNotFound) {
- errorMsg = @"Make sure you set the app secret correctly in
DBRouletteAppDelegate.m";
- } else if ([root length] == 0) {
- errorMsg = @"Set your root to use either App Folder of full Dropbox";
- } else {
- NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Info"
ofType:@"plist"];
- NSData *plistData = [NSData dataWithContentsOfFile:plistPath];
- NSDictionary *loadedPlist =
- [NSPropertyListSerialization
- propertyListFromData:plistData mutabilityOption:0 format:NULL
errorDescription:NULL];
- NSString *scheme = [[[[loadedPlist objectForKey:@"CFBundleURLTypes"]
objectAtIndex:0] objectForKey:@"CFBundleURLSchemes"] objectAtIndex:0];
- if ([scheme isEqual:@"db-APP_KEY"]) {
- errorMsg = @"Set your URL scheme correctly in
DBRoulette-Info.plist";
- }
- }
-
DBSession* session =
[[DBSession alloc] initWithAppKey:appKey appSecret:appSecret
root:root];
session.delegate = self; // DBSessionDelegate methods allow you to handle
re-authenticating
[DBSession setSharedSession:session];
[session release];
- if (errorMsg != nil) {
- [[[[UIAlertView alloc]
- initWithTitle:@"Error Configuring Session" message:errorMsg
- delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]
- autorelease]
- show];
- }
-
[[BDSKDropboxStore sharedStore] addLocalFiles];
_dropboxLinked = [[DBSession sharedSession] isLinked];
Modified: trunk/bibdesk_ios/BDSKPubTableViewController.m
===================================================================
--- trunk/bibdesk_ios/BDSKPubTableViewController.m 2012-03-15 06:34:19 UTC
(rev 18554)
+++ trunk/bibdesk_ios/BDSKPubTableViewController.m 2012-03-15 10:53:14 UTC
(rev 18555)
@@ -43,7 +43,10 @@
#import "BDSKLocalFile.h"
#import "BibItem.h"
#import "BDSKLinkedFile.h"
+#import "BDSKTableSortDescriptor.h"
+#import "BDSKStringConstants.h"
#import "NSString_BDSKExtensions.h"
+#import "NSArray_BDSKExtensions.h"
@interface BDSKPubTableViewController () {
@@ -231,7 +234,8 @@
if (bibItems != newBibItems) {
[bibItems release];
- bibItems = [newBibItems retain];
+ BDSKTableSortDescriptor *sortDescriptor = [BDSKTableSortDescriptor
tableSortDescriptorForIdentifier:BDSKPubDateString ascending:NO];
+ bibItems = [[newBibItems
sortedArrayUsingMergesortWithDescriptors:[NSArray
arrayWithObject:sortDescriptor]] retain];
[_pdfFiles release];
_pdfFiles = [[NSMutableArray alloc] init];
Modified: trunk/bibdesk_ios/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk_ios/bibdesk/BibItem.m 2012-03-15 06:34:19 UTC (rev 18554)
+++ trunk/bibdesk_ios/bibdesk/BibItem.m 2012-03-15 10:53:14 UTC (rev 18555)
@@ -3408,7 +3408,6 @@
}
- (void)updateMetadataForKey:(NSString *)key{
-#if BDSK_OS_X
[self setHasBeenEdited:YES];
spotlightMetadataChanged = YES;
@@ -3445,6 +3444,7 @@
[theDate release];
}
+#if BDSK_OS_X
// setDateAdded: is only called here; it is derived based on pubFields
value of BDSKDateAddedString
if (key == nil || allFieldsChanged || [BDSKDateAddedString
isEqualToString:key]) {
NSString *dateAddedValue = [pubFields
objectForKey:BDSKDateAddedString];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit