]> granicus.if.org Git - transmission/commitdiff
quicklook window expands from the icon instead of the whole table row 1.21
authorMitchell Livingston <livings124@transmissionbt.com>
Wed, 21 May 2008 22:09:05 +0000 (22:09 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Wed, 21 May 2008 22:09:05 +0000 (22:09 +0000)
Transmission.xcodeproj/project.pbxproj
macosx/Controller.m
macosx/FileOutlineView.h
macosx/FileOutlineView.m
macosx/InfoWindowController.m
macosx/TorrentTableView.h
macosx/TorrentTableView.m

index 0f7c51745cab14a30492d7a4e6e4385d0183caac..fa132eaeedb64b147d02a7458fa4c27a85ebd93f 100644 (file)
                        isa = PBXContainerItemProxy;
                        containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
                        proxyType = 1;
-                       remoteGlobalIDString = A2DF58240DE4B0EF000795D5 /* shttpd */;
+                       remoteGlobalIDString = A2DF58240DE4B0EF000795D5;
                        remoteInfo = shttpd;
                };
                BE1183750CE161040002D0F3 /* PBXContainerItemProxy */ = {
index 489012e647bd3fa9edbaab40c4dede696a341c31..df51f5007f74093a376cf4ed2ad9c53caa68afd8 100644 (file)
@@ -4089,7 +4089,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
             id item = [fTableView itemAtRow: row];
             if ([item isKindOfClass: [Torrent class]] && [[(Torrent *)item dataLocation] isEqualToString: fullPath])
             {
-                NSRect frame = [fTableView rectOfRow: row];
+                NSRect frame = [fTableView iconRectForRow: row];
                 frame.origin = [fTableView convertPoint: frame.origin toView: nil];
                 frame.origin = [fWindow convertBaseToScreen: frame.origin];
                 frame.origin.y -= frame.size.height;
index f70e7ee39998c0293beb69243e0ef3a459643a26..4fc70416309667bcfac971f115a3c0275ceda8d3 100644 (file)
@@ -39,6 +39,8 @@
 - (void) setTorrent: (Torrent *) torrent;
 - (Torrent *) torrent;
 
+- (NSRect) iconRectForRow: (int) row;
+
 - (int) hoveredRow;
 
 @end
index 5313ff657a3f69ba45e3cf46b16f9dc5b9dcb196..d767032a4425ab9507f4f486802cd842552239f1 100644 (file)
     return [self menu];
 }
 
+- (NSRect) iconRectForRow: (int) row
+{
+    FileNameCell * cell = (FileNameCell *)[[self tableColumnWithIdentifier: @"Name"] dataCell];
+    return [cell imageRectForBounds: [self rectOfRow: row]];
+}
+
 - (void) updateTrackingAreas
 {
     [super updateTrackingAreas];
index 1480958226a9e52f43a1de2aedf2762eddcf9fb0..7c77fc873df47e9c5a68177e53a20ba2e968774b 100644 (file)
@@ -24,6 +24,7 @@
 
 #import "InfoWindowController.h"
 #import "InfoTabButtonCell.h"
+#import "FileOutlineView.h"
 #import "QuickLookController.h"
 #import "NSApplicationAdditions.h"
 #import "NSStringAdditions.h"
@@ -945,7 +946,7 @@ typedef enum
         id rowItem = [fileOutlineView itemAtRow: row];
         if ([[folder stringByAppendingPathComponent: [rowItem objectForKey: @"Path"]] isEqualToString: fullPath])
         {
-            NSRect frame = [fileOutlineView rectOfRow: row];
+            NSRect frame = [fileOutlineView iconRectForRow: row];
             frame.origin = [fileOutlineView convertPoint: frame.origin toView: nil];
             frame.origin = [[self window] convertBaseToScreen: frame.origin];
             frame.origin.y -= frame.size.height;
index 8733c9a9a049829335c53e01e7123c1132309b3e..42a75c287d83e9d33d87c4a2f291c6add4b25efe 100644 (file)
@@ -66,6 +66,8 @@
 - (NSArray *) selectedValues;
 - (NSArray *) selectedTorrents;
 
+- (NSRect) iconRectForRow: (int) row;
+
 - (void) paste: (id) sender;
 
 - (void) toggleControlForTorrent: (Torrent *) torrent;
index 52891dec229ce217bfd2ba0c8cbe218e1a4bf3fb..77d382052b3fdd4a2bda6b98113cdc6c5623702e 100644 (file)
     }
 }
 
+- (NSRect) iconRectForRow: (int) row
+{
+    return [fTorrentCell iconRectForBounds: [self rectOfRow: row]];
+}
+
 - (void) paste: (id) sender
 {
     NSURL * url;