Changeset 3414
- Timestamp:
- Oct 15, 2007, 1:57:56 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/InfoWindowController.m
r3345 r3414 807 807 else if ([ident isEqualToString: @"Check"]) 808 808 { 809 int check = [cell state]; 810 if (check == NSOffState) 811 return NSLocalizedString(@"Don't Download", "Inspector -> files tab -> tooltip"); 812 else if (check == NSMixedState) 813 return NSLocalizedString(@"Download Some", "Inspector -> files tab -> tooltip"); 814 else 815 return NSLocalizedString(@"Download", "Inspector -> files tab -> tooltip"); 809 switch ([cell state]) 810 { 811 case NSOffState: 812 return NSLocalizedString(@"Don't Download", "Inspector -> files tab -> tooltip"); 813 case NSOnState: 814 return NSLocalizedString(@"Download", "Inspector -> files tab -> tooltip"); 815 case NSMixedState: 816 return NSLocalizedString(@"Download Some", "Inspector -> files tab -> tooltip"); 817 } 816 818 } 817 819 else if ([ident isEqualToString: @"Priority"]) 818 820 { 819 821 NSSet * priorities = [[fTorrents objectAtIndex: 0] filePrioritiesForIndexes: [item objectForKey: @"Indexes"]]; 820 821 int count = [priorities count]; 822 if (count == 0) 823 return NSLocalizedString(@"Priority Not Available", "Inspector -> files tab -> tooltip"); 824 else if (count > 1) 825 return NSLocalizedString(@"Multiple Priorities", "Inspector -> files tab -> tooltip"); 826 else 827 { 828 int priority = [[priorities anyObject] intValue]; 829 if (priority == TR_PRI_LOW) 830 return NSLocalizedString(@"Low Priority", "Inspector -> files tab -> tooltip"); 831 else if (priority == TR_PRI_HIGH) 832 return NSLocalizedString(@"High Priority", "Inspector -> files tab -> tooltip"); 833 else 834 return NSLocalizedString(@"Normal Priority", "Inspector -> files tab -> tooltip"); 835 } 836 } 837 else 838 return nil; 822 switch([priorities count]) 823 { 824 case 0: 825 return NSLocalizedString(@"Priority Not Available", "Inspector -> files tab -> tooltip"); 826 case 1: 827 switch ([[priorities anyObject] intValue]) 828 { 829 case TR_PRI_LOW: 830 return NSLocalizedString(@"Low Priority", "Inspector -> files tab -> tooltip"); 831 case TR_PRI_HIGH: 832 return NSLocalizedString(@"High Priority", "Inspector -> files tab -> tooltip"); 833 case TR_PRI_NORMAL: 834 return NSLocalizedString(@"Normal Priority", "Inspector -> files tab -> tooltip"); 835 } 836 break; 837 default: 838 return NSLocalizedString(@"Multiple Priorities", "Inspector -> files tab -> tooltip"); 839 } 840 } 841 else; 842 843 return nil; 839 844 } 840 845 … … 948 953 { 949 954 BOOL upload = sender == fUploadLimitPopUp; 950 int index = [sender indexOfSelectedItem], mode; 951 if (index == OPTION_POPUP_LIMIT) 952 mode = TR_SPEEDLIMIT_SINGLE; 953 else if (index == OPTION_POPUP_NO_LIMIT) 954 mode = TR_SPEEDLIMIT_UNLIMITED; 955 else 956 mode = TR_SPEEDLIMIT_GLOBAL; 955 int mode; 956 switch ([sender indexOfSelectedItem]) 957 { 958 case OPTION_POPUP_LIMIT: 959 mode = TR_SPEEDLIMIT_SINGLE; 960 break; 961 case OPTION_POPUP_NO_LIMIT: 962 mode = TR_SPEEDLIMIT_UNLIMITED; 963 break; 964 case OPTION_POPUP_GLOBAL: 965 mode = TR_SPEEDLIMIT_GLOBAL; 966 break; 967 default: 968 return; 969 } 957 970 958 971 Torrent * torrent; … … 1007 1020 - (void) setRatioSetting: (id) sender 1008 1021 { 1009 int index = [sender indexOfSelectedItem], setting; 1010 if (index == OPTION_POPUP_LIMIT) 1011 setting = NSOnState; 1012 else if (index == OPTION_POPUP_NO_LIMIT) 1013 setting = NSOffState; 1014 else 1015 setting = NSMixedState; 1022 int setting; 1023 switch ([sender indexOfSelectedItem]) 1024 { 1025 case OPTION_POPUP_LIMIT: 1026 setting = NSOnState; 1027 break; 1028 case OPTION_POPUP_NO_LIMIT: 1029 setting = NSOffState; 1030 break; 1031 case OPTION_POPUP_GLOBAL: 1032 setting = NSMixedState; 1033 break; 1034 default: 1035 return; 1036 } 1016 1037 1017 1038 Torrent * torrent;
Note: See TracChangeset
for help on using the changeset viewer.