Changeset 873 for apps/iphone/superbook
- Timestamp:
- 07/14/11 23:32:03 (22 months ago)
- Location:
- apps/iphone/superbook/trunk
- Files:
-
- 18 added
- 4 removed
- 25 modified
-
ABook@2x.png (added)
-
ABook.png (added)
-
arrow@2x.png (added)
-
arrow.png (modified) (previous)
-
Classes/ContactViewController.h (modified) (1 diff)
-
Classes/ContactViewController.m (modified) (1 diff)
-
Classes/DomainsLastVisited.h (added)
-
Classes/DomainsLastVisited.m (added)
-
Classes/FriendsData.h (modified) (4 diffs)
-
Classes/FriendsData.m (modified) (9 diffs)
-
Classes/FriendsMapViewController.m (modified) (2 diffs)
-
Classes/LocateThem_ViewController.h (modified) (2 diffs)
-
Classes/LocateThem_ViewController.m (modified) (10 diffs)
-
Classes/MyCLController.h (modified) (1 diff)
-
Classes/MyCLController.m (modified) (6 diffs)
-
Classes/NSArray+FriendsSortCategory.h (deleted)
-
Classes/NSArray+FriendsSortCategory.m (deleted)
-
Classes/SBContact.h (added)
-
Classes/SBContact.m (added)
-
DotTel_SDK/Classes/TelDomain.h (modified) (2 diffs)
-
DotTel_SDK/Classes/TelDomain.m (modified) (9 diffs)
-
English.lproj/Localizable.strings (modified) (1 diff)
-
French.lproj/Localizable.strings (modified) (1 diff)
-
FriendsTableViewCell.xib (deleted)
-
German.lproj/Localizable.strings (modified) (1 diff)
-
icon-fax.png (added)
-
icon-ftp.png (added)
-
icon-home.png (added)
-
icon-info.png (added)
-
icon-mailto.png (modified) (previous)
-
icon-mobile.png (modified) (previous)
-
icon-office.png (added)
-
icon-phone.png (modified) (previous)
-
icon-pin.png (modified) (previous)
-
icon-private.png (added)
-
icon-search.png (added)
-
icon-sip.png (added)
-
icon-sms.png (modified) (previous)
-
icon-unknown.png (modified) (previous)
-
icon-web.png (modified) (previous)
-
icon-x-im.png (modified) (previous)
-
icon-x-note.png (added)
-
LocateThem.xcodeproj/project.pbxproj (modified) (20 diffs)
-
MainView.xib (modified) (11 diffs)
-
Russian.lproj/Localizable.strings (deleted)
-
tellogo@2x.png (added)
-
tellogo.png (added)
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/superbook/trunk/Classes/ContactViewController.h
r851 r873 10 10 #import "TelDomain.h" 11 11 #import "NaptrUIButtonCell.h" 12 #import "NTNaptrCell.h"13 #import "FriendsData.h"14 #import "FriendsMapViewController.h"15 #import "WebUrlViewController.h"16 12 17 13 enum cv_table_sections { -
apps/iphone/superbook/trunk/Classes/ContactViewController.m
r859 r873 9 9 #import "ContactViewController.h" 10 10 #import "NaptrViewController.h" 11 #import "NTNaptrCell.h" 12 #import "FriendsData.h" 13 #import "FriendsMapViewController.h" 14 #import "WebUrlViewController.h" 11 15 12 16 @interface ContactViewController (PrivateMethods) -
apps/iphone/superbook/trunk/Classes/FriendsData.h
r851 r873 41 41 @end 42 42 43 @ interface FriendsData : NSObject <UITableViewDataSource> {43 @class SBContact; 44 44 45 NSArray *sectionNames; // Names of the sections in the table view 45 @interface FriendsData : NSObject { 46 46 47 NSInteger prefsUnitKm; // Preferences for units (km/mi) 47 48 NSDate *lastFriendsUpdate; // timestamp for the last update to the friends lists. Used for KVO 48 NSMutableDictionary *peopleCurrentList; // List of people with all their current info, that is active right now49 NSMutableDictionary *peopleCurrentList; // List of AB people with all their current info, currently active 49 50 NSMutableDictionary *peopleNewList; // List of people with all their newer info, waiting to be active 50 51 NSArray *sortedPeopleArray; // Sorted array of the people ids for display … … 53 54 @private 54 55 id <FriendsDataDelegate> delegate; 55 CLLocation *noLoc;56 56 57 57 } … … 59 59 @property (retain) id <FriendsDataDelegate> delegate; 60 60 61 @property (nonatomic, retain) NSArray *sectionNames;62 61 @property NSInteger prefsUnitKm; 63 62 @property (retain) NSDate *lastFriendsUpdate; … … 73 72 74 73 - (void)refreshPreferences; 74 - (NSInteger)numberOfContacts; 75 - (SBContact *)contactForRow:(NSUInteger)row; 75 76 76 77 - (void)loadFriendsDataFromAB:(ABAddressBookRef)aBook; 77 78 78 - (ABAddressBookRef)getAddressBookRef; 79 80 79 - (NSString *)getNameForABRecordId:(NSNumber *)theId; 81 82 80 - (NSNumber *)getABRecordIdForIndexPath:(NSIndexPath *)indexPath; 83 84 81 - (NSNumber *) getABRecordIdForTel:(NSString *)telname; 85 86 82 - (ABRecordRef)getABRecordRefForABRecordId:(NSNumber *)theId withAddressBook:(ABRecordRef)theBook; 87 88 83 - (NSString *)getTelForABRecordId:(NSNumber *)theId withABRecordRef:(ABRecordRef)recordRef; 89 90 84 - (NSInteger)getTelIndexForABRecordId:(NSNumber *)theId withABRecordRef:(ABRecordRef)recordRef; 91 85 -
apps/iphone/superbook/trunk/Classes/FriendsData.m
r851 r873 28 28 29 29 #import "FriendsData.h" 30 #import "TelDomain.h" 31 #import "SBContact.h" 30 32 31 33 static FriendsData *sharedFriendsData = nil; … … 42 44 43 45 @synthesize delegate; 44 @synthesize sectionNames;45 46 @synthesize prefsUnitKm; 46 47 @synthesize lastFriendsUpdate; … … 51 52 - (id) init { 52 53 self = [super init]; 53 noLoc = [[[CLLocation alloc] initWithLatitude:0 longitude:0] retain];54 self.sectionNames = [NSArray arrayWithObjects:@"Friends with .tel", nil];55 54 self.peopleCurrentList = [NSMutableDictionary dictionary]; 56 55 self.peopleNewList = [NSMutableDictionary dictionary]; … … 116 115 NSString *theTel = [self getTelForABRecordId:aPersonId withABRecordRef:aPerson]; 117 116 if (theTel) { 118 // the people list has for each personid: name, type of status, location, location timestamp, distance from user and telname117 // the people list contains SBContact objects 119 118 NSString *compName = [(NSString *)ABRecordCopyCompositeName(aPerson) autorelease]; 120 119 if (!compName) { 121 120 compName = theTel; 122 121 } 123 NSArray *personInfoRow = [NSArray arrayWithObjects:compName, 124 [NSNumber numberWithInt:FriendsDataSectionStatusUnknown], 125 noLoc, 126 [NSDate date], 127 [NSNumber numberWithInt:0], 128 theTel, 129 nil]; 122 SBContact *personInfo = [SBContact new]; 123 personInfo.name = compName; 124 personInfo.telDomain = theTel; 130 125 131 [peopleCurrentList setObject:personInfoRow forKey:aPersonId]; 126 [peopleCurrentList setObject:personInfo forKey:aPersonId]; 127 [personInfo release]; 132 128 }; 133 129 } … … 149 145 } 150 146 151 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 152 153 return [self.sectionNames count]; 154 } 155 156 - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 157 return nil; // No title 158 //return ([NSString stringWithString:[sectionNames objectAtIndex:section]]); 159 } 160 161 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 162 163 return [peopleCurrentList count]; 164 } 165 166 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 167 168 169 static NSString *MyIdentifier = @"FriendsTableViewCellIdentifier"; 170 171 FriendsTableViewCell *cell = (FriendsTableViewCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier]; 172 if (cell == nil) { 173 NSArray *friendsTableViewCellNib = [[NSBundle mainBundle] loadNibNamed:@"FriendsTableViewCell" owner:self options:nil]; 174 cell = (FriendsTableViewCell *)[friendsTableViewCellNib objectAtIndex:0]; 175 } 176 // Configure the cell 177 178 NSNumber *thePersonId = [sortedPeopleArray objectAtIndex:indexPath.row]; 179 // ABRecordRef thePerson = ABAddressBookGetPersonWithRecordID(book, (ABRecordID)[thePersonId intValue]); 180 NSArray *thePersonInfo = [peopleCurrentList objectForKey:thePersonId]; 181 182 cell.labelCellName.text = [thePersonInfo objectAtIndex:0]; 183 // cell.labelCellName.text = [NSString stringWithFormat:@"%@ %@", (NSString *)ABRecordCopyValue(thePerson, kABPersonFirstNameProperty), 184 // (NSString *)ABRecordCopyValue(thePerson, kABPersonLastNameProperty)]; 185 cell.labelCellTel.text = [thePersonInfo objectAtIndex:5]; 186 187 return cell; 188 } 189 147 - (NSInteger)numberOfContacts { 148 return [peopleCurrentList count]; 149 } 150 151 - (SBContact *)contactForRow:(NSUInteger)row { 152 if (row < [sortedPeopleArray count]) { 153 NSNumber *thePersonId = [sortedPeopleArray objectAtIndex:row]; 154 if (thePersonId != nil) { 155 SBContact *thePerson = [peopleCurrentList objectForKey:thePersonId]; 156 return thePerson; 157 } 158 } 159 return nil; 160 } 190 161 191 162 // Method that flips the current data set with the newly gotten dataset … … 215 186 } 216 187 217 218 188 #pragma mark ---- utility methods ---- 219 189 … … 225 195 - (NSString *)getNameForABRecordId:(NSNumber *)theId { 226 196 // WARNING: Only exists if person has been retrieved 227 NSArray *personInfoRow= [peopleCurrentList objectForKey:theId];228 if ( personInfoRow) {229 return [personInfoRow objectAtIndex:0];197 SBContact *theContact = [peopleCurrentList objectForKey:theId]; 198 if (theContact) { 199 return theContact.name; 230 200 } 231 201 return nil; … … 247 217 248 218 NSNumber *theId; 249 NSArray *thePersonInfo;219 SBContact *theContact; 250 220 for (theId in sortedPeopleArray) { 251 the PersonInfo= [peopleCurrentList objectForKey:theId];252 if ([ (NSString *)[thePersonInfo objectAtIndex:5]isEqualToString:telname]) {221 theContact = [peopleCurrentList objectForKey:theId]; 222 if ([theContact.telDomain isEqualToString:telname]) { 253 223 return theId; 254 224 } … … 270 240 271 241 // First see if we've already cached the info 272 NSArray *personInfoRow= [peopleCurrentList objectForKey:theId];273 if ( personInfoRow!= nil)274 return [personInfoRow objectAtIndex:5];242 SBContact *theContact = [peopleCurrentList objectForKey:theId]; 243 if (theContact != nil) 244 return theContact.telDomain; 275 245 276 246 ABMultiValueRef allUrls; -
apps/iphone/superbook/trunk/Classes/FriendsMapViewController.m
r860 r873 28 28 29 29 #import "FriendsMapViewController.h" 30 #import "FriendsData.h" 31 #import "SBContact.h" 30 32 31 33 #define kKMapDefaultZoomWidthInMeters 1000.0 … … 137 139 138 140 - (void) setMarkers:(NSDictionary *)peopleList { 139 // the people list has for each personid : name, type of status, location, location timestamp, distance from user and telname141 // the people list has for each personid ans SBContact object 140 142 id personId; 141 NSArray*personInfo;143 SBContact *personInfo; 142 144 for (personId in [peopleList allKeys]) { 143 personInfo = (NSArray *)[peopleList objectForKey:personId]; 144 if ([(NSNumber *)[personInfo objectAtIndex:1] intValue] != FriendsDataSectionWithLoc) 145 continue; 146 CLLocation *personLoc = (CLLocation *)[personInfo objectAtIndex:2]; 145 personInfo = (SBContact *)[peopleList objectForKey:personId]; 146 if (![personInfo hasLocation]) 147 continue; 147 148 [self setMarkerWithABRecordId:personId 148 title: [personInfo objectAtIndex:0]149 telname: [personInfo objectAtIndex:5]150 location:person Loc];149 title:personInfo.name 150 telname:personInfo.telDomain 151 location:personInfo.loc]; 151 152 } 152 153 } -
apps/iphone/superbook/trunk/Classes/LocateThem_ViewController.h
r851 r873 28 28 29 29 #import <UIKit/UIKit.h> 30 #import "FriendsData.h" 30 31 #import "MyCLController.h" 31 #import <AddressBookUI/AddressBookUI.h>32 #import "NaptrViewController.h"33 #import "ContactViewController.h"34 #import "FriendsMapViewController.h"35 32 #import "SettingsViewController.h" 36 33 #import "CustomAlertView.h" 37 34 35 #define kKLastVisitedRowCountIncrement 3 // steps of latest lookups to show 36 37 @class FriendsMapViewController; 38 @class DomainsLastVisited; 39 38 40 @interface LocateThem_ViewController : UIViewController <MyCLControllerDelegate, FriendsDataDelegate, 39 UINavigationControllerDelegate, UISearchBarDelegate, SettingsViewDelegate > {41 UINavigationControllerDelegate, UISearchBarDelegate, SettingsViewDelegate, UITableViewDataSource, UITableViewDelegate> { 40 42 41 IBOutlet UITableView *friendsTableView;42 IBOutlet UIView *loadingView;43 IBOutlet UISearchBar *telSearch;44 IBOutlet UILabel *labelForLoadingView;45 IBOutlet UIProgressView *progressView;46 IBOutlet UILabel *progressLabel;47 IBOutlet UIImageView *logo;48 43 FriendsMapViewController *mapViewController; 49 44 @private … … 56 51 UIBarButtonItem *locationRefreshButton; 57 52 UIBarButtonItem *locationRefreshingButton; 53 DomainsLastVisited *domainsLastVisited; 54 NSInteger lastVisitedRowCount; 58 55 } 56 57 enum LTSectionIds { 58 LTSectionVisited = 0, 59 LTSectionContacts, 60 LTSectionCount, // Always last, as section count 61 }; 59 62 60 63 @property (nonatomic, retain) IBOutlet UITableView *friendsTableView; -
apps/iphone/superbook/trunk/Classes/LocateThem_ViewController.m
r851 r873 28 28 29 29 #import "LocateThem_ViewController.h" 30 #import <AddressBookUI/AddressBookUI.h> 31 #import "NaptrViewController.h" 32 #import "ContactViewController.h" 33 #import "FriendsMapViewController.h" 34 #import "DomainsLastVisited.h" 35 #import "SBContact.h" 36 37 @interface LocateThem_ViewController (PrivateMethods) 38 39 - (UITableViewCell *)defaultCellForIdentifier:(NSString *)identifier; 40 41 @end 30 42 31 43 @implementation LocateThem_ViewController … … 56 68 FriendsData *sharedFriendsInstance = [FriendsData sharedInstance]; 57 69 sharedFriendsInstance.delegate = self; 58 friendsTableView.dataSource = sharedFriendsInstance;59 70 60 71 // Do the other setup tasks … … 71 82 isUpdatingLocation = FALSE; 72 83 needsFriendsTableRefresh = TRUE; 84 UIImage *bgImage = [[UIImage imageNamed:@"Background"] stretchableImageWithLeftCapWidth:15 topCapHeight:0]; 85 friendsTableView.backgroundView = [[[UIImageView alloc] initWithImage:bgImage] autorelease]; 86 friendsTableView.backgroundView.contentMode = UIViewContentModeCenter; 87 73 88 } 74 89 … … 77 92 // become the delegate of MyCLController, which could have been taken by a .tel tableview 78 93 [MyCLController sharedInstance].delegate = self; 94 if (domainsLastVisited == nil) { 95 domainsLastVisited = [DomainsLastVisited new]; 96 } 97 [domainsLastVisited resetCache]; 98 lastVisitedRowCount = MIN([domainsLastVisited numberOfCachedLookups], kKLastVisitedRowCountIncrement); 99 [friendsTableView reloadData]; 79 100 } 80 101 … … 112 133 [friendsTableView reloadData]; 113 134 [loadingView removeFromSuperview]; 114 if ([friendsTableView numberOfRowsInSection:0] == 0) { 135 NSInteger totalRowCount = [friendsTableView numberOfRowsInSection:LTSectionVisited] + [friendsTableView numberOfRowsInSection:LTSectionContacts]; 136 if (totalRowCount == 0) { 115 137 [friendsTableView setHidden:NO]; 116 138 instructionsView = [[[UILabel alloc] initWithFrame:friendsTableView.frame] autorelease]; … … 168 190 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 169 191 // Return YES for supported orientations 170 171 192 return (interfaceOrientation == UIInterfaceOrientationPortrait); 172 193 } 173 194 174 195 - (void)didReceiveMemoryWarning { 196 [domainsLastVisited release]; 197 domainsLastVisited = nil; 175 198 [super didReceiveMemoryWarning]; 176 199 } … … 178 201 - (void)dealloc { 179 202 [mapViewController release]; 203 mapViewController = nil; 180 204 [locationRefreshButton release]; 205 locationRefreshButton = nil; 181 206 [locationRefreshingButton release]; 207 locationRefreshingButton = nil; 208 [domainsLastVisited release]; 209 domainsLastVisited = nil; 182 210 [super dealloc]; 183 211 } … … 212 240 } 213 241 214 #pragma mark ---- Row and Accessory Click ---- 242 #pragma mark - 243 #pragma mark Private Methods 244 245 // Method to return a new cell formatted with the default values 246 - (UITableViewCell *)defaultCellForIdentifier:(NSString *)identifier { 247 UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle 248 reuseIdentifier:identifier] autorelease]; 249 cell.accessoryType = cell.editingAccessoryType = UITableViewCellAccessoryNone; 250 cell.textLabel.font = [UIFont boldSystemFontOfSize:15]; 251 cell.detailTextLabel.font = [UIFont systemFontOfSize:12]; 252 cell.textLabel.textColor = [UIColor colorWithWhite:0.1 alpha:1]; 253 cell.textLabel.shadowColor = [UIColor colorWithWhite:0.8 alpha:1]; 254 cell.textLabel.shadowOffset = CGSizeMake(1, 1); 255 cell.textLabel.backgroundColor = [UIColor clearColor]; 256 cell.detailTextLabel.backgroundColor = [UIColor clearColor]; 257 258 return cell; 259 } 260 261 #pragma mark - 262 #pragma mark UITableViewDelegate methods 215 263 216 264 - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { … … 223 271 224 272 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 225 226 NSNumber *personId = [[FriendsData sharedInstance] getABRecordIdForIndexPath:indexPath]; 227 [tableView deselectRowAtIndexPath:indexPath animated:YES]; 228 [self launchNavControllerForTel:nil personId:personId]; 273 [tableView deselectRowAtIndexPath:indexPath animated:YES]; 274 switch (indexPath.section) { 275 case LTSectionVisited: 276 { 277 if (indexPath.row == lastVisitedRowCount) { 278 // User clicked on the "See more" row 279 280 [tableView beginUpdates]; 281 // We add the new rows 282 NSInteger maxRows = [domainsLastVisited numberOfCachedLookups]; 283 NSInteger countOfRowsToAdd = MIN(maxRows-lastVisitedRowCount, kKLastVisitedRowCountIncrement); 284 NSMutableArray *newIndexPaths = [NSMutableArray arrayWithCapacity:countOfRowsToAdd]; 285 for (int i=0; i < countOfRowsToAdd; i++) { 286 [newIndexPaths addObject:[NSIndexPath indexPathForRow:lastVisitedRowCount+i inSection:LTSectionVisited]]; 287 } 288 289 // We first must delete or refresh the "See More" row 290 NSArray *seeMoreIndexPathArray = [NSArray arrayWithObject:[NSIndexPath indexPathForRow:lastVisitedRowCount 291 inSection:LTSectionVisited]]; 292 if (lastVisitedRowCount + countOfRowsToAdd < maxRows) { 293 // there are still unseen rows, we keep it 294 [tableView reloadRowsAtIndexPaths:seeMoreIndexPathArray 295 withRowAnimation:UITableViewRowAnimationFade]; 296 } else { 297 // delete it 298 [tableView deleteRowsAtIndexPaths:seeMoreIndexPathArray 299 withRowAnimation:UITableViewRowAnimationFade]; 300 } 301 302 // Now we update the row count and isert the rows 303 lastVisitedRowCount = lastVisitedRowCount + countOfRowsToAdd; 304 [tableView insertRowsAtIndexPaths:newIndexPaths withRowAnimation:UITableViewRowAnimationBottom]; 305 [tableView endUpdates]; 306 } else { 307 // regular row 308 // if it's a subdomain, launch the domain and then launch the subdomain on top 309 NSString *fqdn = [domainsLastVisited domainForRow:indexPath.row]; 310 [self launchNavControllerForTel:fqdn personId:nil]; 311 } 312 break; 313 } 314 case LTSectionContacts: 315 { 316 NSNumber *personId = [[FriendsData sharedInstance] getABRecordIdForIndexPath:indexPath]; 317 [self launchNavControllerForTel:nil personId:personId]; 318 break; 319 } 320 default: 321 break; 322 } 229 323 return; 324 } 325 326 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 327 return 40.0f; 328 } 329 330 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 331 static NSString *HeaderIdentifier = @"HeaderCellIdentifier"; 332 UITableViewCell *headerCell = [tableView dequeueReusableCellWithIdentifier:HeaderIdentifier]; 333 if (headerCell == nil) { 334 headerCell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:HeaderIdentifier] autorelease]; 335 headerCell.textLabel.shadowColor = [UIColor colorWithRed:235 green:0 blue:235 alpha:1]; 336 headerCell.textLabel.shadowOffset = CGSizeMake(1, 1); 337 headerCell.textLabel.textColor = [UIColor whiteColor]; 338 headerCell.textLabel.backgroundColor = [UIColor colorWithWhite:1 alpha:0]; 339 headerCell.userInteractionEnabled = NO; 340 } 341 switch (section) { 342 case LTSectionVisited: 343 headerCell.textLabel.text = NSLocalizedString(@"Recently Visited", @"Recently looked up .tel domains"); 344 headerCell.imageView.image = [UIImage imageNamed:@"tellogo"]; 345 break; 346 case LTSectionContacts: 347 headerCell.textLabel.text = NSLocalizedString(@"Contacts", @"Contacts"); 348 headerCell.imageView.image = [UIImage imageNamed:@"ABook"]; 349 break; 350 default: 351 return nil; 352 break; 353 } 354 return headerCell; 355 } 356 357 - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { 358 cell.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.9]; 359 } 360 361 #pragma mark - 362 #pragma mark UITableViewDatasource methods 363 364 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 365 return LTSectionCount; 366 } 367 368 - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 369 switch (section) { 370 case LTSectionVisited: 371 return NSLocalizedString(@"Recently Visited", @"Recently looked up .tel domains"); 372 break; 373 case LTSectionContacts: 374 return NSLocalizedString(@"Contacts", @"Contacts"); 375 break; 376 default: 377 return nil; 378 break; 379 } 380 } 381 382 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 383 switch (section) { 384 case LTSectionVisited: 385 { 386 NSInteger maxRows = [domainsLastVisited numberOfCachedLookups]; 387 if (maxRows > lastVisitedRowCount) { 388 // we add a "See more" row 389 return lastVisitedRowCount + 1; 390 } else { 391 // we're showing all the rows 392 lastVisitedRowCount = maxRows; 393 return lastVisitedRowCount; 394 } 395 break; 396 } 397 case LTSectionContacts: 398 return [[FriendsData sharedInstance] numberOfContacts]; 399 break; 400 default: 401 return 0; 402 break; 403 } 404 } 405 406 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 407 static NSString *ContactsIdentifier = @"ContactsCellIdentifier"; 408 static NSString *VisitedIdentifier = @"VisitedCellIdentifier"; 409 static NSString *MoreCellIdentifier = @"MoreCellIdentifier"; 410 411 switch (indexPath.section) { 412 case LTSectionVisited: 413 { 414 NSInteger maxRows = [domainsLastVisited numberOfCachedLookups]; 415 if ((indexPath.row == lastVisitedRowCount) && (lastVisitedRowCount < maxRows)) { 416 // we have a "See more" row, and it's it! 417 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MoreCellIdentifier]; 418 if (cell == nil) { 419 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 420 reuseIdentifier:MoreCellIdentifier] autorelease]; 421 cell.accessoryType = cell.editingAccessoryType = UITableViewCellAccessoryNone; 422 cell.textLabel.font = [UIFont systemFontOfSize:14]; 423 cell.textLabel.textColor = [UIColor blueColor]; 424 cell.imageView.image = [UIImage imageNamed:@"arrow"]; 425 } 426 427 NSString *nextDom = [domainsLastVisited domainForRow:lastVisitedRowCount]; 428 NSString *postfix = maxRows > (lastVisitedRowCount + 1) ? @"... " : @""; 429 cell.textLabel.text = [NSString stringWithFormat:@"+ %d .tel ( %@ %@)", maxRows - lastVisitedRowCount, nextDom, postfix]; 430 cell.textLabel.backgroundColor = [UIColor clearColor]; 431 return cell; 432 break; 433 } 434 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:VisitedIdentifier]; 435 if (cell == nil) { 436 cell = [self defaultCellForIdentifier:VisitedIdentifier]; 437 } 438 NSString *fqdn = [domainsLastVisited domainForRow:indexPath.row]; 439 cell.textLabel.text = fqdn; 440 cell.detailTextLabel.text = [domainsLastVisited domainForSubdomain:fqdn]; 441 return cell; 442 break; 443 } 444 case LTSectionContacts: 445 { 446 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ContactsIdentifier]; 447 if (cell == nil) { 448 cell = [self defaultCellForIdentifier:ContactsIdentifier]; 449 } 450 SBContact *theContact = [[FriendsData sharedInstance] contactForRow:indexPath.row]; 451 cell.textLabel.text = theContact.name; 452 cell.detailTextLabel.text = theContact.telDomain; 453 return cell; 454 break; 455 } 456 default: 457 return nil; 458 break; 459 } 230 460 } 231 461 … … 243 473 if (![nVC setupWithTel:aTel]) 244 474 return; 475 // if it's a subdomain, let's launch the domain first behind it, so the user can "go back" to the domain 476 NSString *domain = [domainsLastVisited domainForSubdomain:aTel]; 477 if (![aTel isEqualToString:domain]) { 478 NaptrViewController *nVC2 = [[[NaptrViewController alloc] initWithStyle:UITableViewStylePlain] autorelease]; 479 if ([nVC2 setupWithTel:domain]) { 480 [self.navigationController pushViewController:nVC2 animated:NO]; 481 } 482 } 483 245 484 } else { 246 485 return; -
apps/iphone/superbook/trunk/Classes/MyCLController.h
r357 r873 9 9 10 10 #import <CoreLocation/CoreLocation.h> 11 #import "FriendsData.h"12 11 #import "DnsResolver.h" 13 12 // This is hoping that in the future (beyond SDK 2.0) we can access SystemConfiguration info -
apps/iphone/superbook/trunk/Classes/MyCLController.m
r851 r873 8 8 9 9 #import "MyCLController.h" 10 #import "FriendsData.h" 11 #import "SBContact.h" 10 12 11 13 // This is a singleton class, see below … … 126 128 FriendsData *friends = [FriendsData sharedInstance]; 127 129 NSNumber *personWithTel; 128 NSInteger telStatus = FriendsDataSectionStatusUnknown;130 //NSInteger telStatus = FriendsDataSectionStatusUnknown; 129 131 130 132 NSArray *peopleWithTel = [friends.peopleCurrentList allKeys]; … … 140 142 progress = [NSNumber numberWithFloat:(float)nP/(float)totalPeople]; 141 143 [self.delegate updateProgressView:progress]; 142 NSArray *personArray = (NSArray *)[friends.peopleCurrentList objectForKey:personWithTel];143 NSString *personName = [NSString stringWithString: (NSString *)[personArray objectAtIndex:0]];144 NSString *telUrl = [NSString stringWithString: (NSString *)[personArray objectAtIndex:5]];144 SBContact *origContact = [friends.peopleCurrentList objectForKey:personWithTel]; 145 NSString *personName = [NSString stringWithString:origContact.name]; 146 NSString *telUrl = [NSString stringWithString:origContact.telDomain]; 145 147 NSMutableArray *locArray = [NSMutableArray arrayWithCapacity:1]; 146 148 NSError *error; … … 149 151 CLLocationDistance theDist = 0.0; 150 152 if (locCount == -1) { // Error 151 telStatus = FriendsDataSectionStatusUnknown;152 theLoc = [[[CLLocation alloc] initWithLatitude:0 longitude:0] autorelease];153 //telStatus = FriendsDataSectionStatusUnknown; 154 theLoc = nil; 153 155 #ifdef DEBUG 154 156 NSLog(@"Error finding location from domain: %@, error:%@\n", telUrl, [error localizedDescription]); 155 157 #endif 156 158 } else if (locCount == 0) { 157 telStatus = FriendsDataSectionWithoutLoc;158 theLoc = [[[CLLocation alloc] initWithLatitude:0 longitude:0] autorelease];159 //telStatus = FriendsDataSectionWithoutLoc; 160 theLoc = nil; 159 161 #ifdef DEBUG 160 162 NSLog(@"No LOC record in domain: %@\n", telUrl); … … 166 168 #endif 167 169 } 168 telStatus = FriendsDataSectionWithLoc;170 //telStatus = FriendsDataSectionWithLoc; 169 171 theLoc = (CLLocation *)[locArray objectAtIndex:0]; 170 172 theDist = [theLoc distanceFromLocation:self.myCurrentLoc]; … … 173 175 #endif 174 176 } 175 // the Loc might mean nothing. Make sure you check which group the person is in176 // Only those that are in peopleWithTelAndLoc have a meaningful loc177 177 178 NSArray *personInfoRow = [NSArray arrayWithObjects:personName, 179 [NSNumber numberWithInt:telStatus], 180 theLoc, 181 [NSDate date], 182 [NSNumber numberWithInt:theDist], // convert to int 183 telUrl, 184 nil]; 185 178 SBContact *personInfoRow = [SBContact new]; 179 personInfoRow.name = personName; 180 personInfoRow.loc = theLoc; 181 personInfoRow.locTimestamp = [NSDate date]; 182 personInfoRow.telDomain = telUrl; 183 personInfoRow.distanceFromDevice = theDist; 186 184 [(NSMutableDictionary *)friends.peopleNewList setObject:personInfoRow forKey:personWithTel]; 185 [personInfoRow release]; 187 186 } 188 187 } -
apps/iphone/superbook/trunk/DotTel_SDK/Classes/TelDomain.h
r864 r873 53 53 54 54 @interface TelDomain : NSObject { 55 BOOL exists; 55 56 BOOL isCached; // set if the data comes from cache 56 57 NSString *displayName; … … 90 91 + (NSString *)archivesDirectory; 91 92 93 @property (nonatomic, readonly) BOOL exists; 92 94 @property (nonatomic, readonly) BOOL isCached; 93 95 @property (nonatomic, readonly) NSString *telName; -
apps/iphone/superbook/trunk/DotTel_SDK/Classes/TelDomain.m
r864 r873 29 29 30 30 @interface TelDomain (PrivateMethods) 31 - (BOOL)existsGivenError:(NSError *)error; // Check for existence of the domain given an error object 31 32 - (NSString *)archivePath; 32 33 + (NSString *)archivePathForTelName:(NSString *)telName; … … 35 36 @implementation TelDomain 36 37 38 @synthesize exists; 37 39 @synthesize isCached; 38 40 @synthesize telName = _telName; … … 66 68 return nil; 67 69 self = [super init]; 70 exists = NO; 68 71 self.delegate = aDelegate; 69 72 _telName = [[self telFromQueryString:aTelName] retain]; … … 87 90 } else { 88 91 // There's a cache, let's use it and regenerate the rest of the data 92 exists = YES; 89 93 isCached = YES; 90 94 NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; … … 110 114 111 115 - (BOOL)archiveToCache { 116 if (!exists) 117 return NO; 112 118 NSMutableData *data = [NSMutableData data]; 113 119 NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; … … 150 156 [res getNAPTRForTel:self.telName inArray:tmpArray withError:&error]; 151 157 [res release]; 158 exists = [self existsGivenError:error]; 152 159 if (error == nil) { 153 160 [naptrArray setArray:tmpArray]; … … 193 200 [res getTXTForTel:self.telName inArray:tmpArray withError:&error]; 194 201 [res release]; 202 exists = [self existsGivenError:error]; 195 203 if (error == nil) { 196 204 [allTxtArray setArray:tmpArray]; … … 253 261 [res getLOCForTel:self.telName inArray:tmpArray withError:&error]; 254 262 [res release]; 263 exists = [self existsGivenError:error]; 255 264 if (error == nil) { 256 265 [locArray setArray:tmpArray]; … … 379 388 #pragma mark Utility Methods 380 389 390 - (BOOL)existsGivenError:(NSError *)error { 391 if (error == nil) 392 return YES; 393 394 if ([[error domain] isEqualToString:@"org.telnic.tel.sdk"]) { 395 if ([error code] == RESOLVER_STATUS_NXDOMAIN) { 396 return NO; 397 } 398 } 399 return YES; 400 } 401 381 402 - (NSString *)telFromQueryString:(NSString *)query { 382 403 if (!query) -
apps/iphone/superbook/trunk/English.lproj/Localizable.strings
r855 r873 63 63 /* Paragraph to explain that no contacts could be found with a .tel url */ 64 64 "NoContactsWithTel" = "Welcome!\n\nYour Address Book doesn't have any contacts with a .tel URL.\n\nAdding a .tel to a contact is very easy: Simply enter a .tel in the lookup box below, and you can then save the data to the Address Book."; 65 66 /* Recently looked up .tel domains */ 67 "Recently Visited" = "Recently Visited"; 65 68 66 69 -
apps/iphone/superbook/trunk/French.lproj/Localizable.strings
r855 r873 78 78 "NoContactsWithTel" = "Bienvenue!\n\nVotre carnet d'adresses ne contient aucun contact possédant un .tel\n\nAjouter un .tel à un contact est très simple: Entrez simplement un .tel dans la zone de recherche ci-dessous, vous pourrez alors ajouter les données au carnet d'adresses."; 79 79 80 /* Recently looked up .tel domains */ 81 "Recently Visited" = "Dernières Visites"; 80 82 81 83 -
apps/iphone/superbook/trunk/German.lproj/Localizable.strings
r855 r873 65 65 /* Paragraph to explain that no contacts could be found with a .tel url */ 66 66 "NoContactsWithTel" = "Willkommen!\n\nDein Adressbuch hat keine Kontakte mit .tel URL`s\n\nEine .tel URL zu einem Kontakt hinzu zu fügen ist einfach: Gebe eine eine .tel in das Suchfeld unten ein und du kannst Sie im Adressbuch speichern."; 67 68 /* Recently looked up .tel domains */ 69 "Recently Visited" = "Zuletzt besuchte"; 67 70 68 71 /*** Contact Info View ***/ -
apps/iphone/superbook/trunk/LocateThem.xcodeproj/project.pbxproj
r851 r873 51 51 3843E92912D5FA51004639AB /* ldns.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3843E92812D5FA51004639AB /* ldns.framework */; }; 52 52 38451057109F4630004302FF /* libidn.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 38451056109F4630004302FF /* libidn.a */; }; 53 384BA02C13C622B10051C986 /* DomainsLastVisited.m in Sources */ = {isa = PBXBuildFile; fileRef = 384BA02B13C622B10051C986 /* DomainsLastVisited.m */; }; 54 384BA03613CDB4CF0051C986 /* SBContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 384BA03513CDB4CF0051C986 /* SBContact.m */; }; 53 55 38527485100A82E9005F4329 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 38527483100A82E9005F4329 /* Localizable.strings */; }; 54 56 385BD70D0EBF694600D32EB0 /* DnsResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 385BD6C70EBF694500D32EB0 /* DnsResolver.m */; }; … … 84 86 389BA2E211F43EC70092A15E /* ContactViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 389BA2E011F43EC70092A15E /* ContactViewController.xib */; }; 85 87 389BA35B11F612190092A15E /* NaptrUIButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 389BA35A11F612190092A15E /* NaptrUIButtonCell.m */; }; 88 38B7FE9013CEDD1D003ADCA9 /* icon-fax.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8713CEDD1A003ADCA9 /* icon-fax.png */; }; 89 38B7FE9113CEDD1D003ADCA9 /* icon-ftp.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8813CEDD1A003ADCA9 /* icon-ftp.png */; }; 90 38B7FE9213CEDD1D003ADCA9 /* icon-home.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8913CEDD1B003ADCA9 /* icon-home.png */; }; 91 38B7FE9313CEDD1D003ADCA9 /* icon-info.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8A13CEDD1B003ADCA9 /* icon-info.png */; }; 92 38B7FE9413CEDD1D003ADCA9 /* icon-office.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8B13CEDD1B003ADCA9 /* icon-office.png */; }; 93 38B7FE9513CEDD1D003ADCA9 /* icon-private.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8C13CEDD1B003ADCA9 /* icon-private.png */; }; 94 38B7FE9613CEDD1D003ADCA9 /* icon-search.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8D13CEDD1C003ADCA9 /* icon-search.png */; }; 95 38B7FE9713CEDD1D003ADCA9 /* icon-sip.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8E13CEDD1C003ADCA9 /* icon-sip.png */; }; 96 38B7FE9813CEDD1D003ADCA9 /* icon-x-note.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE8F13CEDD1D003ADCA9 /* icon-x-note.png */; }; 97 38B7FE9A13CEDEC9003ADCA9 /* tellogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE9913CEDEC9003ADCA9 /* tellogo.png */; }; 98 38B7FE9C13CEDFDA003ADCA9 /* tellogo@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE9B13CEDFD9003ADCA9 /* tellogo@2x.png */; }; 99 38B7FE9F13CEECCC003ADCA9 /* ABook.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE9D13CEECCB003ADCA9 /* ABook.png */; }; 100 38B7FEA013CEECCC003ADCA9 /* ABook@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FE9E13CEECCC003ADCA9 /* ABook@2x.png */; }; 101 38B7FEA213CF5CCB003ADCA9 /* arrow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 38B7FEA113CF5CCA003ADCA9 /* arrow@2x.png */; }; 86 102 38B8B9280FF11173001E59B0 /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 38B8B9260FF11173001E59B0 /* SettingsViewController.m */; }; 87 103 38B8B9290FF11173001E59B0 /* SettingsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38B8B9270FF11173001E59B0 /* SettingsView.xib */; }; … … 123 139 BB3261DB0E64597E0091BF08 /* FriendsMapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BB3261DA0E64597E0091BF08 /* FriendsMapViewController.m */; }; 124 140 BB32625C0E64641D0091BF08 /* MapMarker.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB32625B0E64641D0091BF08 /* MapMarker.xib */; }; 125 BB4A0D900E5A907E0075E776 /* NSArray+FriendsSortCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = BB4A0D8F0E5A907D0075E776 /* NSArray+FriendsSortCategory.m */; };126 BBB457790E5579B600143D43 /* FriendsTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BBB457780E5579B600143D43 /* FriendsTableViewCell.xib */; };127 141 BBC3C7170E62986D00FBBAD8 /* NaptrViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BBC3C7160E62986D00FBBAD8 /* NaptrViewController.m */; }; 128 142 BBE2E9A80E57B6C500A7889B /* FriendsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BB2F182C0E5501C8009C75BE /* FriendsTableViewCell.m */; }; … … 169 183 38388D78101DF8690059C0EE /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/DotTel.strings; sourceTree = "<group>"; }; 170 184 38388D9F101ED9060059C0EE /* Russian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Russian; path = Russian.lproj/DotTel.strings; sourceTree = "<group>"; }; 171 38388DB2101EDF630059C0EE /* Russian */ = {isa = PBXFileReference; explicitFileType = text.plist.strings; name = Russian; path = Russian.lproj/Localizable.strings; sourceTree = "<group>"; };172 185 383D3FD51043E33F0018D271 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/Localizable.strings; sourceTree = "<group>"; }; 173 186 383D3FFA1043EBFA0018D271 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/DotTel.strings; sourceTree = "<group>"; }; … … 187 200 3843E92812D5FA51004639AB /* ldns.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ldns.framework; sourceTree = "<group>"; }; 188 201 38451056109F4630004302FF /* libidn.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libidn.a; sourceTree = "<group>"; }; 202 384BA02A13C622B10051C986 /* DomainsLastVisited.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DomainsLastVisited.h; sourceTree = "<group>"; }; 203 384BA02B13C622B10051C986 /* DomainsLastVisited.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DomainsLastVisited.m; sourceTree = "<group>"; }; 204 384BA03413CDB4CF0051C986 /* SBContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBContact.h; sourceTree = "<group>"; }; 205 384BA03513CDB4CF0051C986 /* SBContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBContact.m; sourceTree = "<group>"; }; 189 206 38527484100A82E9005F4329 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; }; 190 207 385BD6C60EBF694500D32EB0 /* DnsResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DnsResolver.h; sourceTree = "<group>"; }; … … 232 249 389BA35911F612190092A15E /* NaptrUIButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NaptrUIButtonCell.h; sourceTree = "<group>"; }; 233 250 389BA35A11F612190092A15E /* NaptrUIButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NaptrUIButtonCell.m; sourceTree = "<group>"; }; 251 38B7FE8713CEDD1A003ADCA9 /* icon-fax.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-fax.png"; sourceTree = "<group>"; }; 252 38B7FE8813CEDD1A003ADCA9 /* icon-ftp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-ftp.png"; sourceTree = "<group>"; }; 253 38B7FE8913CEDD1B003ADCA9 /* icon-home.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-home.png"; sourceTree = "<group>"; }; 254 38B7FE8A13CEDD1B003ADCA9 /* icon-info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-info.png"; sourceTree = "<group>"; }; 255 38B7FE8B13CEDD1B003ADCA9 /* icon-office.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-office.png"; sourceTree = "<group>"; }; 256 38B7FE8C13CEDD1B003ADCA9 /* icon-private.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-private.png"; sourceTree = "<group>"; }; 257 38B7FE8D13CEDD1C003ADCA9 /* icon-search.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-search.png"; sourceTree = "<group>"; }; 258 38B7FE8E13CEDD1C003ADCA9 /* icon-sip.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-sip.png"; sourceTree = "<group>"; }; 259 38B7FE8F13CEDD1D003ADCA9 /* icon-x-note.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-x-note.png"; sourceTree = "<group>"; }; 260 38B7FE9913CEDEC9003ADCA9 /* tellogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tellogo.png; sourceTree = "<group>"; }; 261 38B7FE9B13CEDFD9003ADCA9 /* tellogo@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tellogo@2x.png"; sourceTree = "<group>"; }; 262 38B7FE9D13CEECCB003ADCA9 /* ABook.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ABook.png; sourceTree = "<group>"; }; 263 38B7FE9E13CEECCC003ADCA9 /* ABook@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ABook@2x.png"; sourceTree = "<group>"; }; 264 38B7FEA113CF5CCA003ADCA9 /* arrow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "arrow@2x.png"; sourceTree = "<group>"; }; 234 265 38B8B9250FF11173001E59B0 /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = "<group>"; }; 235 266 38B8B9260FF11173001E59B0 /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = "<group>"; }; … … 288 319 BB3261DA0E64597E0091BF08 /* FriendsMapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FriendsMapViewController.m; sourceTree = "<group>"; }; 289 320 BB32625B0E64641D0091BF08 /* MapMarker.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapMarker.xib; sourceTree = "<group>"; }; 290 BB4A0D8E0E5A907D0075E776 /* NSArray+FriendsSortCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+FriendsSortCategory.h"; sourceTree = "<group>"; };291 BB4A0D8F0E5A907D0075E776 /* NSArray+FriendsSortCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+FriendsSortCategory.m"; sourceTree = "<group>"; };292 BBB457780E5579B600143D43 /* FriendsTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FriendsTableViewCell.xib; sourceTree = "<group>"; };293 321 BBC3C7150E62986D00FBBAD8 /* NaptrViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NaptrViewController.h; sourceTree = "<group>"; }; 294 322 BBC3C7160E62986D00FBBAD8 /* NaptrViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NaptrViewController.m; sourceTree = "<group>"; }; … … 327 355 387680910FC99A8900360BD4 /* AddressBook Mapping */, 328 356 BB27760B0E55EC3D0007ECB3 /* CoreLocation Delegate */, 357 384BA03313CDB4810051C986 /* Superbook Contact */, 329 358 1D3623240D0F684500981E51 /* LocateThem_AppDelegate.h */, 330 359 1D3623250D0F684500981E51 /* LocateThem_AppDelegate.m */, … … 337 366 38B8B9250FF11173001E59B0 /* SettingsViewController.h */, 338 367 38B8B9260FF11173001E59B0 /* SettingsViewController.m */, 368 384BA02A13C622B10051C986 /* DomainsLastVisited.h */, 369 384BA02B13C622B10051C986 /* DomainsLastVisited.m */, 339 370 BB2779F50E5647E50007ECB3 /* FriendsData.h */, 340 371 BB2779F60E5647E50007ECB3 /* FriendsData.m */, … … 394 425 389BA2E011F43EC70092A15E /* ContactViewController.xib */, 395 426 38FD5456122F9BB0001DB9B0 /* ContactViewHeader.xib */, 396 BBB457780E5579B600143D43 /* FriendsTableViewCell.xib */,397 427 381F1C2B138A465B00FAC25E /* MapTableViewCell.xib */, 398 428 385F4DE20F81D9C7009AB1D6 /* TxtTableViewCell.xib */, … … 439 469 38BFACDE138CF7F10073A2AE /* RecordNaptr+HAAdditions.h */, 440 470 38BFACDF138CF7F10073A2AE /* RecordNaptr+HAAdditions.m */, 441 BB4A0D8E0E5A907D0075E776 /* NSArray+FriendsSortCategory.h */,442 BB4A0D8F0E5A907D0075E776 /* NSArray+FriendsSortCategory.m */,443 471 382F8C1A0F8379CB00ED53BF /* NSString+UITableViewHelper.h */, 444 472 382F8C1B0F8379CB00ED53BF /* NSString+UITableViewHelper.m */, … … 470 498 38EEA8AF122E58CD00629825 /* icon-youtube.com.png */, 471 499 384056E211AAC64C00DCEEA1 /* icon-mailto.png */, 500 38B7FE8713CEDD1A003ADCA9 /* icon-fax.png */, 501 38B7FE8813CEDD1A003ADCA9 /* icon-ftp.png */, 502 38B7FE8913CEDD1B003ADCA9 /* icon-home.png */, 503 38B7FE8A13CEDD1B003ADCA9 /* icon-info.png */, 504 38B7FE8B13CEDD1B003ADCA9 /* icon-office.png */, 505 38B7FE8C13CEDD1B003ADCA9 /* icon-private.png */, 506 38B7FE8D13CEDD1C003ADCA9 /* icon-search.png */, 507 38B7FE8E13CEDD1C003ADCA9 /* icon-sip.png */, 508 38B7FE8F13CEDD1D003ADCA9 /* icon-x-note.png */, 472 509 384056E311AAC64C00DCEEA1 /* icon-facebook.com.png */, 473 510 384056E411AAC64C00DCEEA1 /* icon-x-im.png */, … … 480 517 ); 481 518 name = "Naptr icons"; 519 sourceTree = "<group>"; 520 }; 521 384BA03313CDB4810051C986 /* Superbook Contact */ = { 522 isa = PBXGroup; 523 children = ( 524 384BA03413CDB4CF0051C986 /* SBContact.h */, 525 384BA03513CDB4CF0051C986 /* SBContact.m */, 526 ); 527 name = "Superbook Contact"; 482 528 sourceTree = "<group>"; 483 529 }; … … 578 624 children = ( 579 625 384056DF11AAC63100DCEEA1 /* Naptr icons */, 626 38B7FE9D13CEECCB003ADCA9 /* ABook.png */, 627 38B7FE9E13CEECCC003ADCA9 /* ABook@2x.png */, 580 628 38BFAD5513955FD50073A2AE /* arrow.png */, 629 38B7FEA113CF5CCA003ADCA9 /* arrow@2x.png */, 581 630 38B9FBEC139D1C9F00E2C8F3 /* arrow-white.png */, 582 631 38FD5474122FEF83001DB9B0 /* bg-header.png */, … … 602 651 3873AA7413C21B30009CB273 /* tablelastcellbg.png */, 603 652 3873AA7513C21B30009CB273 /* tablelastcellbg@2x.png */, 653 38B7FE9913CEDEC9003ADCA9 /* tellogo.png */, 654 38B7FE9B13CEDFD9003ADCA9 /* tellogo@2x.png */, 604 655 ); 605 656 name = Images; … … 680 731 buildActionMask = 2147483647; 681 732 files = ( 682 BBB457790E5579B600143D43 /* FriendsTableViewCell.xib in Resources */,683 733 BB32625C0E64641D0091BF08 /* MapMarker.xib in Resources */, 684 734 387C07040E719FC400F2599C /* icon-pin.png in Resources */, … … 755 805 386B9BBF13C234B200F6FF96 /* tablecellbg-selected.png in Resources */, 756 806 386B9BC013C234B200F6FF96 /* tablecellbg-selected@2x.png in Resources */, 807 38B7FE9013CEDD1D003ADCA9 /* icon-fax.png in Resources */, 808 38B7FE9113CEDD1D003ADCA9 /* icon-ftp.png in Resources */, 809 38B7FE9213CEDD1D003ADCA9 /* icon-home.png in Resources */, 810 38B7FE9313CEDD1D003ADCA9 /* icon-info.png in Resources */, 811 38B7FE9413CEDD1D003ADCA9 /* icon-office.png in Resources */, 812 38B7FE9513CEDD1D003ADCA9 /* icon-private.png in Resources */, 813 38B7FE9613CEDD1D003ADCA9 /* icon-search.png in Resources */, 814 38B7FE9713CEDD1D003ADCA9 /* icon-sip.png in Resources */, 815 38B7FE9813CEDD1D003ADCA9 /* icon-x-note.png in Resources */, 816 38B7FE9A13CEDEC9003ADCA9 /* tellogo.png in Resources */, 817 38B7FE9C13CEDFDA003ADCA9 /* tellogo@2x.png in Resources */, 818 38B7FE9F13CEECCC003ADCA9 /* ABook.png in Resources */, 819 38B7FEA013CEECCC003ADCA9 /* ABook@2x.png in Resources */, 820 38B7FEA213CF5CCB003ADCA9 /* arrow@2x.png in Resources */, 757 821 ); 758 822 runOnlyForDeploymentPostprocessing = 0; … … 772 836 BB2779F70E5647E50007ECB3 /* FriendsData.m in Sources */, 773 837 BBE2E9A80E57B6C500A7889B /* FriendsTableViewCell.m in Sources */, 774 BB4A0D900E5A907E0075E776 /* NSArray+FriendsSortCategory.m in Sources */,775 838 BBC3C7170E62986D00FBBAD8 /* NaptrViewController.m in Sources */, 776 839 BB3261DB0E64597E0091BF08 /* FriendsMapViewController.m in Sources */, … … 797 860 38BFACE0138CF7F10073A2AE /* RecordNaptr+HAAdditions.m in Sources */, 798 861 38BFAD5A139560150073A2AE /* PullRefreshTableViewController.m in Sources */, 862 384BA02C13C622B10051C986 /* DomainsLastVisited.m in Sources */, 863 384BA03613CDB4CF0051C986 /* SBContact.m in Sources */, 799 864 ); 800 865 runOnlyForDeploymentPostprocessing = 0; … … 808 873 38527484100A82E9005F4329 /* English */, 809 874 3896DB8C10107DB500245EB8 /* French */, 810 38388DB2101EDF630059C0EE /* Russian */,811 875 383D3FD51043E33F0018D271 /* German */, 812 876 ); -
apps/iphone/superbook/trunk/MainView.xib
r851 r873 3 3 <data> 4 4 <int key="IBDocument.SystemTarget">800</int> 5 <string key="IBDocument.SystemVersion">10 J4138</string>5 <string key="IBDocument.SystemVersion">10K540</string> 6 6 <string key="IBDocument.InterfaceBuilderVersion">1306</string> 7 <string key="IBDocument.AppKitVersion">1038.3 5</string>7 <string key="IBDocument.AppKitVersion">1038.36</string> 8 8 <string key="IBDocument.HIToolboxVersion">461.00</string> 9 9 <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> … … 42 42 <string key="NSFrameSize">{320, 436}</string> 43 43 <reference key="NSSuperview" ref="965635714"/> 44 <reference key="NSWindow"/>45 44 <reference key="NSNextKeyView" ref="437590843"/> 46 45 <object class="NSColor" key="IBUIBackgroundColor"> … … 63 62 <string key="NSFrameSize">{320, 44}</string> 64 63 <reference key="NSSuperview" ref="965635714"/> 65 <reference key="NSWindow"/>66 64 <reference key="NSNextKeyView" ref="266061381"/> 67 65 <bool key="IBUIOpaque">NO</bool> … … 89 87 <string key="NSFrame">{{0, 44}, {320, 392}}</string> 90 88 <reference key="NSSuperview" ref="965635714"/> 91 <reference key="NSWindow"/>92 89 <reference key="NSNextKeyView"/> 93 90 <object class="NSColor" key="IBUIBackgroundColor"> 94 <int key="NSColorSpace"> 3</int>95 <bytes key="NS White">MCAwAA</bytes>91 <int key="NSColorSpace">1</int> 92 <bytes key="NSRGB">MC4zOTIxNTY4NjI3IDAuMTA5ODAzOTIxNiAwLjQ5ODAzOTIxNTcgMC44NQA</bytes> 96 93 </object> 97 94 <bool key="IBUIOpaque">NO</bool> … … 99 96 <bool key="IBUIClearsContextBeforeDrawing">NO</bool> 100 97 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> 98 <int key="IBUIIndicatorStyle">2</int> 101 99 <bool key="IBUIBouncesZoom">NO</bool> 100 <int key="IBUIStyle">1</int> 101 <int key="IBUISeparatorStyle">2</int> 102 102 <int key="IBUISectionIndexMinimumDisplayRowCount">0</int> 103 103 <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool> 104 <float key="IBUIRowHeight">42</float> 104 <float key="IBUIRowHeight">44</float> 105 <float key="IBUISectionHeaderHeight">10</float> 106 <float key="IBUISectionFooterHeight">10</float> 105 107 </object> 106 108 </array> 107 109 <string key="NSFrame">{{0, 44}, {320, 436}}</string> 108 110 <reference key="NSSuperview"/> 109 <reference key="NSWindow"/>110 111 <reference key="NSNextKeyView" ref="443005848"/> 111 112 <object class="NSColor" key="IBUIBackgroundColor"> … … 121 122 </object> 122 123 <object class="IBUIView" id="320542690"> 123 < nilkey="NSNextResponder"/>124 <reference key="NSNextResponder"/> 124 125 <int key="NSvFlags">292</int> 125 126 <array class="NSMutableArray" key="NSSubviews"> … … 129 130 <string key="NSFrameSize">{230, 120}</string> 130 131 <reference key="NSSuperview" ref="320542690"/> 132 <reference key="NSNextKeyView" ref="113566170"/> 131 133 <bool key="IBUIOpaque">NO</bool> 132 134 <bool key="IBUIClipsSubviews">YES</bool> … … 146 148 <string key="NSFrame">{{97, 23}, {37, 37}}</string> 147 149 <reference key="NSSuperview" ref="320542690"/> 150 <reference key="NSNextKeyView" ref="795909745"/> 148 151 <bool key="IBUIOpaque">NO</bool> 149 152 <bool key="IBUIClearsContextBeforeDrawing">NO</bool> … … 158 161 <string key="NSFrame">{{9, 72}, {213, 27}}</string> 159 162 <reference key="NSSuperview" ref="320542690"/> 163 <reference key="NSNextKeyView"/> 160 164 <bool key="IBUIOpaque">NO</bool> 161 165 <bool key="IBUIClipsSubviews">YES</bool> … … 179 183 </array> 180 184 <string key="NSFrameSize">{230, 120}</string> 185 <reference key="NSSuperview"/> 186 <reference key="NSNextKeyView" ref="266147462"/> 181 187 <object class="NSColor" key="IBUIBackgroundColor"> 182 188 <int key="NSColorSpace">3</int> … … 354 360 <dictionary class="NSMutableDictionary" key="localizations"/> 355 361 <nil key="sourceID"/> 356 <int key="maxID">46</int> 357 </object> 358 <object class="IBClassDescriber" key="IBDocument.Classes"> 359 <array class="NSMutableArray" key="referencedPartialClassDescriptions"> 360 <object class="IBPartialClassDescription"> 361 <string key="className">LocateThem_ViewController</string> 362 <string key="superclassName">UIViewController</string> 363 <dictionary class="NSMutableDictionary" key="actions"> 364 <string key="didPressMapButton:">id</string> 365 <string key="didPressSettingsButton:">id</string> 366 </dictionary> 367 <dictionary class="NSMutableDictionary" key="actionInfosByName"> 368 <object class="IBActionInfo" key="didPressMapButton:"> 369 <string key="name">didPressMapButton:</string> 370 <string key="candidateClassName">id</string> 371 </object> 372 <object class="IBActionInfo" key="didPressSettingsButton:"> 373 <string key="name">didPressSettingsButton:</string> 374 <string key="candidateClassName">id</string> 375 </object> 376 </dictionary> 377 <dictionary class="NSMutableDictionary" key="outlets"> 378 <string key="friendsTableView">UITableView</string> 379 <string key="labelForLoadingView">UILabel</string> 380 <string key="loadingView">UIView</string> 381 <string key="logo">UIImageView</string> 382 <string key="progressLabel">UILabel</string> 383 <string key="progressView">UIProgressView</string> 384 <string key="telSearch">UISearchBar</string> 385 </dictionary> 386 <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> 387 <object class="IBToOneOutletInfo" key="friendsTableView"> 388 <string key="name">friendsTableView</string> 389 <string key="candidateClassName">UITableView</string> 390 </object> 391 <object class="IBToOneOutletInfo" key="labelForLoadingView"> 392 <string key="name">labelForLoadingView</string> 393 <string key="candidateClassName">UILabel</string> 394 </object> 395 <object class="IBToOneOutletInfo" key="loadingView"> 396 <string key="name">loadingView</string> 397 <string key="candidateClassName">UIView</string> 398 </object> 399 <object class="IBToOneOutletInfo" key="logo"> 400 <string key="name">logo</string> 401 <string key="candidateClassName">UIImageView</string> 402 </object> 403 <object class="IBToOneOutletInfo" key="progressLabel"> 404 <string key="name">progressLabel</string> 405 <string key="candidateClassName">UILabel</string> 406 </object> 407 <object class="IBToOneOutletInfo" key="progressView"> 408 <string key="name">progressView</string> 409 <string key="candidateClassName">UIProgressView</string> 410 </object> 411 <object class="IBToOneOutletInfo" key="telSearch"> 412 <string key="name">telSearch</string> 413 <string key="candidateClassName">UISearchBar</string> 414 </object> 415 </dictionary> 416 <object class="IBClassDescriptionSource" key="sourceIdentifier"> 417 <string key="majorKey">IBProjectSource</string> 418 <string key="minorKey">./Classes/LocateThem_ViewController.h</string> 419 </object> 420 </object> 421 </array> 422 </object> 362 <int key="maxID">50</int> 363 </object> 364 <object class="IBClassDescriber" key="IBDocument.Classes"/> 423 365 <int key="IBDocument.localizationMode">0</int> 424 366 <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>








