78 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; |
78 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; |
79 |
79 |
80 cell.accessoryView = nil; |
80 cell.accessoryView = nil; |
81 if ([indexPath section] == 0) { |
81 if ([indexPath section] == 0) { |
82 cell.textLabel.text = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension]; |
82 cell.textLabel.text = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension]; |
83 cell.detailTextLabel.text = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension]; |
83 NSString *str = [NSString stringWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),[self.listOfSchemes objectAtIndex:row]]; |
|
84 NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:str]; |
|
85 cell.detailTextLabel.text = [dict objectForKey:@"description"]; |
|
86 [dict release]; |
84 if ([[self.listOfSchemes objectAtIndex:row] isEqualToString:self.selectedScheme]) { |
87 if ([[self.listOfSchemes objectAtIndex:row] isEqualToString:self.selectedScheme]) { |
85 UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; |
88 UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; |
86 cell.accessoryView = checkbox; |
89 cell.accessoryView = checkbox; |
87 [checkbox release]; |
90 [checkbox release]; |
88 self.lastIndexPath_sc = indexPath; |
91 self.lastIndexPath_sc = indexPath; |
89 } |
92 } |
90 } else { |
93 } else { |
91 cell.textLabel.text = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension]; |
94 cell.textLabel.text = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension]; |
92 cell.detailTextLabel.text = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension]; |
95 NSString *str = [NSString stringWithFormat:@"%@/%@",WEAPONS_DIRECTORY(),[self.listOfWeapons objectAtIndex:row]]; |
|
96 NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:str]; |
|
97 cell.detailTextLabel.text = [dict objectForKey:@"description"]; |
|
98 [dict release]; |
93 if ([[self.listOfWeapons objectAtIndex:row] isEqualToString:self.selectedWeapon]) { |
99 if ([[self.listOfWeapons objectAtIndex:row] isEqualToString:self.selectedWeapon]) { |
94 UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; |
100 UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; |
95 cell.accessoryView = checkbox; |
101 cell.accessoryView = checkbox; |
96 [checkbox release]; |
102 [checkbox release]; |
97 self.lastIndexPath_we = indexPath; |
103 self.lastIndexPath_we = indexPath; |