mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Post merge fix: Remove some of my left over code for the 10.6 QuickLook panel support.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#import "PBGitTree.h"
|
||||
#import "PBViewController.h"
|
||||
#import "PBCollapsibleSplitView.h"
|
||||
#import <Quartz/Quartz.h> /* for the QLPreviewPanelDataSource et al. stuff */
|
||||
|
||||
@class PBQLOutlineView;
|
||||
@class PBGitSidebarController;
|
||||
@@ -19,7 +18,7 @@
|
||||
@class PBRefController;
|
||||
@class QLPreviewPanel;
|
||||
|
||||
@interface PBGitHistoryController : PBViewController <QLPreviewPanelDataSource, QLPreviewPanelDelegate> {
|
||||
@interface PBGitHistoryController : PBViewController {
|
||||
IBOutlet PBRefController *refController;
|
||||
IBOutlet NSSearchField *searchField;
|
||||
IBOutlet NSArrayController* commitController;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "PBGitHistoryController.h"
|
||||
#import "CWQuickLook.h"
|
||||
#import "PBGitGrapher.h"
|
||||
#import "PBGitRevisionCell.h"
|
||||
#import "PBCommitList.h"
|
||||
@@ -340,12 +341,9 @@
|
||||
|
||||
- (void) updateQuicklookForce:(BOOL)force
|
||||
{
|
||||
if ((!force && ![[QLPreviewPanel sharedPreviewPanel] isVisible] && ![[QLPreviewPanel sharedPreviewPanel] isOpen])
|
||||
|| ![QLPreviewPanel sharedPreviewPanelExists])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!force && ![[QLPreviewPanel sharedPreviewPanel] isOpen])
|
||||
return;
|
||||
|
||||
if ([[QLPreviewPanel sharedPreviewPanel] respondsToSelector:@selector(setDataSource:)]) {
|
||||
// Public QL API
|
||||
[previewPanel reloadData];
|
||||
@@ -353,14 +351,14 @@
|
||||
else {
|
||||
// Private QL API (10.5 only)
|
||||
NSArray *selectedFiles = [treeController selectedObjects];
|
||||
|
||||
|
||||
NSMutableArray *fileNames = [NSMutableArray array];
|
||||
for (PBGitTree *tree in selectedFiles) {
|
||||
NSString *filePath = [tree tmpFileNameForContents];
|
||||
if (filePath)
|
||||
[fileNames addObject:[NSURL fileURLWithPath:filePath]];
|
||||
}
|
||||
|
||||
|
||||
if ([fileNames count])
|
||||
[[QLPreviewPanel sharedPreviewPanel] setURLs:fileNames currentIndex:0 preservingDisplayState:YES];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user