In 10.6 Apple removed the private QL API that existed in 10.5 and added a new public API. However they did not port the new API back to 10.5 so we have to do some work to get it working in both.
This patch has GitX choose the correct version at run time.
- The delegate code is based on Apple's QuickLookDownloader example project
- added three of the public API methods to CWQuickLook.h to avoid warnings about unknown method calls
- In ApplicationController try to load the public API first then load the private one if it fails
- Created PBQLTextView, a subclass of NSTextView to allow the space key event to toggle the preview panel
- PBGitHistoryView.xib:
- set the text view's class to PBQLTextView
- connected the history controller to the controller outlet
- bound the quick look button's enabled binding to File's Owner.selectedCommitDetailsIndex
- added "Quick Look" to the quick look button's tooltip
- The commit list table view toggles the panel if the tree view is active
- changed name of the toggle IBAction method which caused MainMenu.xib and PBGitHistoryView.xib to update
When the Subject column is not the first column in the git history table the contextual menu for refs and dragging and dropping refs don't work.
Offset the mouse click's x value by the x origin of the Subject column.
In PBRefController look up the column index of the subject column and check that it's the clicked column (don't assume it's the first one).
This adds a method to programmatically collapse/uncollapse the two
subviews of our custom SplitView-class. It also implements a
keyDown-method so that the collapsing can be used with
Command-Shift-{Up,Down}.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
That's why it's there, after all. This also makes the system
more robust and catches some more errors.
The next thing this enables is to also allow right-clicking
on refs in the commit list.