Changeset 652
- Timestamp:
- Jul 22, 2006, 2:08:35 PM (16 years ago)
- Location:
- trunk/macosx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.h
r649 r652 64 64 NSString * fSortType; 65 65 IBOutlet NSMenuItem * fNameSortItem, * fStateSortItem, * fProgressSortItem, 66 * fDateSortItem, * fOrderSortItem; 66 * fDateSortItem, * fOrderSortItem, 67 * fNameSortActionItem, * fStateSortActionItem, * fProgressSortActionItem, 68 * fDateSortActionItem, * fOrderSortActionItem; 67 69 68 70 IBOutlet ImageBackgroundView * fFilterBar; -
trunk/macosx/Controller.m
r651 r652 218 218 fSortType = [[fDefaults stringForKey: @"Sort"] retain]; 219 219 220 NSMenuItem * currentSortItem ;220 NSMenuItem * currentSortItem, * currentSortActionItem; 221 221 if ([fSortType isEqualToString: @"Name"]) 222 { 222 223 currentSortItem = fNameSortItem; 224 currentSortActionItem = fNameSortActionItem; 225 } 223 226 else if ([fSortType isEqualToString: @"State"]) 227 { 224 228 currentSortItem = fStateSortItem; 229 currentSortActionItem = fStateSortActionItem; 230 } 225 231 else if ([fSortType isEqualToString: @"Progress"]) 232 { 226 233 currentSortItem = fProgressSortItem; 234 currentSortActionItem = fProgressSortActionItem; 235 } 227 236 else if ([fSortType isEqualToString: @"Date"]) 237 { 228 238 currentSortItem = fDateSortItem; 239 currentSortActionItem = fDateSortActionItem; 240 } 229 241 else 242 { 230 243 currentSortItem = fOrderSortItem; 244 currentSortActionItem = fOrderSortActionItem; 245 } 231 246 [currentSortItem setState: NSOnState]; 247 [currentSortActionItem setState: NSOnState]; 232 248 233 249 //set filter … … 974 990 - (void) setSort: (id) sender 975 991 { 976 NSMenuItem * prevSortItem; 992 //get checked items 993 NSMenuItem * prevSortItem, * prevSortActionItem; 977 994 if ([fSortType isEqualToString: @"Name"]) 995 { 978 996 prevSortItem = fNameSortItem; 997 prevSortActionItem = fNameSortActionItem; 998 } 979 999 else if ([fSortType isEqualToString: @"State"]) 1000 { 980 1001 prevSortItem = fStateSortItem; 1002 prevSortActionItem = fStateSortActionItem; 1003 } 981 1004 else if ([fSortType isEqualToString: @"Progress"]) 1005 { 982 1006 prevSortItem = fProgressSortItem; 1007 prevSortActionItem = fProgressSortActionItem; 1008 } 983 1009 else if ([fSortType isEqualToString: @"Date"]) 1010 { 984 1011 prevSortItem = fDateSortItem; 1012 prevSortActionItem = fDateSortActionItem; 1013 } 985 1014 else 1015 { 986 1016 prevSortItem = fOrderSortItem; 987 988 if (sender != prevSortItem) 989 { 1017 prevSortActionItem = fOrderSortActionItem; 1018 } 1019 1020 if (sender != prevSortItem && sender != prevSortActionItem) 1021 { 1022 [fSortType release]; 1023 1024 //get new items to check 1025 NSMenuItem * currentSortItem, * currentSortActionItem; 1026 if (sender == fNameSortItem || sender == fNameSortActionItem) 1027 { 1028 currentSortItem = fNameSortItem; 1029 currentSortActionItem = fNameSortActionItem; 1030 fSortType = [[NSString alloc] initWithString: @"Name"]; 1031 } 1032 else if (sender == fStateSortItem || sender == fStateSortActionItem) 1033 { 1034 currentSortItem = fStateSortItem; 1035 currentSortActionItem = fStateSortActionItem; 1036 fSortType = [[NSString alloc] initWithString: @"State"]; 1037 } 1038 else if (sender == fProgressSortItem || sender == fProgressSortActionItem) 1039 { 1040 currentSortItem = fProgressSortItem; 1041 currentSortActionItem = fProgressSortActionItem; 1042 fSortType = [[NSString alloc] initWithString: @"Progress"]; 1043 } 1044 else if (sender == fDateSortItem || sender == fDateSortActionItem) 1045 { 1046 currentSortItem = fDateSortItem; 1047 currentSortActionItem = fDateSortActionItem; 1048 fSortType = [[NSString alloc] initWithString: @"Date"]; 1049 } 1050 else 1051 { 1052 currentSortItem = fOrderSortItem; 1053 currentSortActionItem = fOrderSortActionItem; 1054 fSortType = [[NSString alloc] initWithString: @"Order"]; 1055 } 1056 990 1057 [prevSortItem setState: NSOffState]; 991 [sender setState: NSOnState]; 992 993 [fSortType release]; 994 if (sender == fNameSortItem) 995 fSortType = [[NSString alloc] initWithString: @"Name"]; 996 else if (sender == fStateSortItem) 997 fSortType = [[NSString alloc] initWithString: @"State"]; 998 else if (sender == fProgressSortItem) 999 fSortType = [[NSString alloc] initWithString: @"Progress"]; 1000 else if (sender == fDateSortItem) 1001 fSortType = [[NSString alloc] initWithString: @"Date"]; 1002 else 1003 fSortType = [[NSString alloc] initWithString: @"Order"]; 1004 1058 [prevSortActionItem setState: NSOffState]; 1059 [currentSortItem setState: NSOnState]; 1060 [currentSortActionItem setState: NSOnState]; 1061 1005 1062 [fDefaults setObject: fSortType forKey: @"Sort"]; 1006 1063 } … … 1668 1725 [fAdvancedBarItem setState: state]; 1669 1726 [fDefaults setBool: state forKey: @"UseAdvancedBar"]; 1670 1727 1671 1728 [fTableView display]; 1672 1729 } -
trunk/macosx/English.lproj/MainMenu.nib/classes.nib
r649 r652 40 40 fActionButton = NSButton; 41 41 fAdvancedBarItem = NSMenuItem; 42 fDateSortActionItem = NSMenuItem; 42 43 fDateSortItem = NSMenuItem; 43 44 fDownloadFilterButton = BarButton; … … 46 47 fDownloadNoLimitItem = NSMenuItem; 47 48 fFilterBar = ImageBackgroundView; 49 fNameSortActionItem = NSMenuItem; 48 50 fNameSortItem = NSMenuItem; 49 51 fNextInfoTabItem = NSMenuItem; 50 52 fNoFilterButton = BarButton; 53 fOrderSortActionItem = NSMenuItem; 51 54 fOrderSortItem = NSMenuItem; 52 55 fPauseFilterButton = BarButton; 53 56 fPrevInfoTabItem = NSMenuItem; 57 fProgressSortActionItem = NSMenuItem; 54 58 fProgressSortItem = NSMenuItem; 55 59 fRatioNotSetItem = NSMenuItem; … … 62 66 fSpeedLimitDockItem = NSMenuItem; 63 67 fSpeedLimitItem = NSMenuItem; 68 fStateSortActionItem = NSMenuItem; 64 69 fStateSortItem = NSMenuItem; 65 70 fStatusBar = ImageBackgroundView; -
trunk/macosx/English.lproj/MainMenu.nib/info.nib
r649 r652 8 8 <dict> 9 9 <key>1041</key> 10 <string>344 478 208 990 0 1152 842 </string>10 <string>344 478 208 130 0 0 1152 842 </string> 11 11 <key>1480</key> 12 12 <string>366 546 420 63 0 0 1152 842 </string> … … 32 32 <key>IBOpenObjects</key> 33 33 <array> 34 <integer>21</integer>35 <integer>1480</integer>36 34 <integer>29</integer> 35 <integer>1041</integer> 37 36 <integer>1603</integer> 38 37 </array>
Note: See TracChangeset
for help on using the changeset viewer.