]> granicus.if.org Git - transmission/commitdiff
trivial changes to sorting by state and other miscellaneous changes
authorMitchell Livingston <livings124@transmissionbt.com>
Mon, 30 Jun 2008 02:22:29 +0000 (02:22 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Mon, 30 Jun 2008 02:22:29 +0000 (02:22 +0000)
macosx/MessageWindow.xib
macosx/Torrent.h
macosx/Torrent.m
macosx/TorrentTableView.m

index ccc73d772f089691a19c12d882d90a26f2c19ef4..d4f702730b33e8a02db3b28d9a61d6a0f5edd412 100644 (file)
@@ -1787,7 +1787,7 @@ zijOSc5pzorOqs66ztvO+88czzzPXc99z57Pvs/fz+/QANAg0EHQYdCC0KLQw9Dj0PPRFNE00VXRddGW
                                                                                                        <object class="NSSortDescriptor" key="NSSortDescriptorPrototype">
                                                                                                                <string key="NSKey">Message</string>
                                                                                                                <bool key="NSAscending">YES</bool>
-                                                                                                               <string key="NSSelector">localizedCaseInsensitiveCompare:</string>
+                                                                                                               <string key="NSSelector">compareFinder:</string>
                                                                                                        </object>
                                                                                                </object>
                                                                                        </object>
index 6d8ee916f47b3f89743b28133801da331af2fe16..57a748a7e9242f0b1fcb4197460b03cb380c4f0d 100644 (file)
@@ -255,7 +255,7 @@ typedef enum
 - (int) stalledMinutes;
 - (BOOL) isStalled;
 
-- (NSNumber *) stateSortKey;
+- (NSInteger) stateSortKey;
 
 - (tr_torrent *) torrentStruct;
 
index 6bbd6bf340634f03df871d1dd2d80f27ec837ca7..9eb3a966c8df1652f1370561f364c304633a5478 100644 (file)
@@ -1587,14 +1587,14 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
     return fStalled;
 }
 
-- (NSNumber *) stateSortKey
+- (NSInteger) stateSortKey
 {
-    if (![self isActive])
-        return [NSNumber numberWithInt: 0];
-    else if ([self isSeeding])
-        return [NSNumber numberWithInt: 1];
-    else
-        return [NSNumber numberWithInt: 2];
+    if (![self isActive]) //paused
+        return 0;
+    else if ([self isSeeding]) //seeding
+        return 1;
+    else //downloading
+        return 2;
 }
 
 - (tr_torrent *) torrentStruct
index 984c620fcf1db7d88843310aea652340df39ad1d..5e5c39682734c5e603b625c03277251f3c2fd212 100644 (file)
         
         NSDictionary * userInfo = [NSDictionary dictionaryWithObject: [NSNumber numberWithInt: row] forKey: @"Row"];
         TorrentCell * cell = (TorrentCell *)[self preparedCellAtColumn: -1 row: row];
-        [cell addTrackingAreasForView: self inRect: [self rectOfRow: row] withUserInfo: userInfo
-                mouseLocation: mouseLocation];
+        [cell addTrackingAreasForView: self inRect: [self rectOfRow: row] withUserInfo: userInfo mouseLocation: mouseLocation];
     }
 }