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
- filters for All, Local/Remote, and the selected branch
- "Local" includes both branches and tags
- "Remote" includes all branches from the same remote as the selected remote branch (i.e. not other remotes)
Changes to make the above work:
- add a history list class between the repository and rev list
- store a project rev list with all the commits from the project
- use the project rev list to graph the history for individual branches when there have been no changes
- use a different rev list to show non-simple revs (history of a file, revs from the gitx tool)
- update the commits in chunks to a mutable array so the table view's array controller has less work to do
- only update the project rev list from git when actually necessary
- don't add the All Branches and Local Branches revs to the branches array
- some changes related to forcing the project's rev list to update when changes are made
- some changes related to not causing updates too often
- store the selected filter in user defaults
- when the graphing is done select the commit for the branch
- add Create Branch and Create Tag buttons
- icons are modified versions of Kim Does's icons (from ca7816b523) made a bit smaller to fit in the buttons better
- add Merge, Cherry Pick, and Rebase buttons
- icons by Nathan Kinsinger
- add an action menu for the selected ref in the source view
- add Add Remote, Fetch, Pull and Push buttons to the bottom bar
- Add Remote icon by Nathan Kinsinger
- Fetch, Pull and Push icons are modified versions of André Berg's icons (from 4396081c07) made a bit smaller to fit in the UI better.
- move the status message for both the history view and the commit/stage view
- all PBViewControllers now have status and isBusy properties and can use those to put a message in the bottom bar when they are the active content controller of the window
The new cell handles:
- showing contextual menus
- drawing a badge for the checked out branch
Needed to add the reference to the ref controller to the history controller.
- remove the separate window toolbars from the history and commit views and create a new window toolbar in the repository window
- add new toolbars inside the history view
- new class to draw a gradient in the background of a view
- moved the search field from the main toolbar to the scope bar
- In PBGitSidebarView.xib
- change indentation to 12
- change font size to 11
- disable the editable behavior
- disable autoresizing
- disable user resizing (column should resize with view)
- remove the window
- remove the shared user defaults controller (not being used)
- add a project item with the project's name
- a "Stage" item to go to what has been called the commit view
- new icons for branches, remote branches and tags (created by Nathan Kinsinger)
- remove the old tiff icons, PBSourceViewRemote.h/m and PBSourceViewAction.h/m from the xcode project
- uses system icon for folder
- uses Network icon for remotes
- capitalize group names
- rename the Custom group to Other (you can't really customize items in the traditional sense)
- create a class for each item type that takes care of it's image (instead of trying to guess the image from it or it's parent's name)
- remove the branch menu toolbar item from the history view, it's redundant now
A Create Tag item:
- A new class (and xib) PBCreateTagSheet
- In the Repository menu
- In the contextual menu for commits
PBRefController the method tagInfo:
- renamed to showTagInfoSheet:
- moved it under the Tags mark
Update the methods for creating a branch.
- create new class and xib PBCreateBranchSheet
- remove old addRef: methods and iVars from PBRefController
- remove old sheet from PBHistoryView.xib
- put the implementation method in PBGitRepository
- add a contextual menu item for commits
- shows an error sheet
- ask the commitController to rearrangeObjects to make sure the new branch is shown
- switch from using "update-ref" to "branch" so that branches starting at a remote branch will track automatically (or not depending on the repo's settings)
This will simplify methods that execute git commands that can take a ref or an SHA.
Add some string constants so there is only one place for the type strings.
Change default compiler to Clang v1.0 for up to 40% compile and runtime
speed increase.
Improve control over install location through user scripts and config
files.
This shows in a separate window for now, so we don't
mess up the xibs. Once I'm satisfied with the result,
I can put it into the main view with a single change :)
This patch adds a CFBundleGitRevision key to Info.plist which is set to
the output of "git describe" when building.
The menu-entry for "About GitX" was reconnected to a custom method in
the AppController, which reads the CF-string from the .plist and also
indicates if the build is a DEBUG-build.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This adds a subclass to PBNiceSplitView which has collapsible subviews
as well as an uncollapse-method. The initWithTopMin method is used to
set the minimum sizes for the subviews.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
* stable:
Fix many gcc 4.2 compiler warnings
GitX.xcodeproj: Quote paths in custom shell scripts
Fix compilation with GCC 4.2
IndexController: Temporarily stop tracking when (un)staging
IndexController: Add methods to stop tracking the Index
ChangesTableView: Remove warning by casting to correct class
Conflicts:
PBGitCommitController.m
We used the whole output of git describe before, not realizing that
neither MacOS nor Sparkle are ok with alphabetic characters but instead
want monotonically increasing integers. So now we just take the major
version number appended with the number of commits since the last tag.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
We do this by preprocessing the Info.plist file
and adding a prefix header with the current revision
#define'd. This seems to be the most reliable way,
unfortunately