Commit Graph

974 Commits

Author SHA1 Message Date
André Berg 6a542d441a Cannot use non-informal protocols with Base SDK 10.5. 2010-03-24 10:28:54 +01:00
Uli Kusterer abe09c4178 Label on password window so it's less cryptic. 2010-03-24 10:23:54 +01:00
Uli Kusterer 6c4c40d496 Set the environment variables for our tool. We have a rudimentary but working password panel now. Prettification later. 2010-03-24 10:17:55 +01:00
Uli Kusterer bca58a7d9c First stab at an executable that can be put into the SSH_ASKPASS environment variable to make GitX ask for passwords. 2010-03-24 10:17:19 +01:00
André Berg e6f7350106 Remove the superfluous string comparison shell function. 2010-03-24 09:24:31 +01:00
André Berg ca0fa1ec40 Some personal preferences for the history web view's #message.
Use the smaller 8pt Monaco again, since it allows for more compact text space requirements without losing readability.

Users who don't agree may safely ignore this commit.
2010-03-24 09:24:05 +01:00
André Berg 7d6f966978 Make the view controllers __weak to silence some underflow refcount errors. 2010-03-24 09:21:31 +01:00
André Berg e5b5e4ca42 SCNetworkCheckReachabilityByName will be deprecated anyways, so replace it with the docs example which will work on any OS version from 10.3. 2010-03-24 09:20:37 +01:00
André Berg 22f916f160 Give the showHideAllFiles action at least a chance to call the public version of the code if avilable. 2010-03-24 09:19:34 +01:00
André Berg 97550f28c2 Bugfix: This caused "no var named button" exceptions in the web view. 2010-03-24 09:18:29 +01:00
André Berg 842630482c Move error domains into their own PBGitXErrors file pair. 2010-03-24 09:17:19 +01:00
André Berg 752bb7cfa1 Post merge fix: Delete some left over code from my 10.6 QuickLook preview panel support. 2010-03-24 09:16:36 +01:00
André Berg 3541acf4a2 Post merge fix: Use the git_oid_mkhex function again from Pieter's libgit2 version. 2010-03-24 09:15:51 +01:00
André Berg 5598eef737 Add preference options for refreshing the view + controller automatically on windowDidBecomeMain.
Add preference for showing exact or relative dates. 
Make the showWhitespaceDifferences preference work.
Make the context slider in the diff views work. 

This is done with a minimal version of jQuery 1.3.2 being responsible for the animation and
a small cookie storing the last value between page refreshes so that it can be incremented by the HTML sliders
default value.
TODO: Maybe we can also make the default context value into a preference?
2010-03-24 09:14:52 +01:00
André Berg 45e8aabaf3 Post merge fix: Since we're 10.5 SDK again, we cannot use non-informal protocols. 2010-03-24 09:04:06 +01:00
André Berg 4832f3b59f Code cleanup: Remove unneeded #imports, empty methods, declare id return type when left out, commit irrelevant whitespace flagged as change. 2010-03-24 09:02:45 +01:00
André Berg b6272c082f Post merge fix: Set Base SDK back to 10.5 2010-03-24 09:00:07 +01:00
André Berg d1eff3ce75 Bugfix?: this seems to fix the "malloc refcount underflow" errors that seem to happen frequently when utilizing the QL panel from the source files outline view. Not entirely sure why though. 2010-03-24 08:59:25 +01:00
André Berg e6d25913d8 Post merge fix: Remove some of my left over code for the 10.6 QuickLook panel support. 2010-03-24 08:57:20 +01:00
André Berg 79c928dcdd Remove my 10.6 QuickLook panel code since Nathan's implementation handles this more gracefully (includes 10.5 support). 2010-03-24 08:09:10 +01:00
André Berg eb23f421a2 Remove the bad file descriptor #warning since that was likely caused by calling standardOutput via dot notation on NSTask and this is fixed now. 2010-03-24 07:08:01 +01:00
André Berg d276c5eac4 PBGitHistoryView.xib: Set Key Equiv. of QuickLook button to Space. 2010-03-24 04:56:59 +01:00
André Berg 7d14bff011 Make some of the sheets resizable (you never know how much a user wants to enter ;)).
Ignore the RepositoryWindow.xib change I tried something but set it back to the value it had before.
2010-03-24 04:54:54 +01:00
André Berg c22e888d53 Add a note to .gitmodules telling why we need to keep using Pieter's version of libgit2. 2010-03-24 04:52:20 +01:00
André Berg 85167431d9 Move the jQuery lib from html/js into html/lib where it should have been right when I added it. 2010-03-24 04:50:57 +01:00
André Berg 38162780f5 Post merge fix: Remove unused KBPopUpToolbaritem files. 2010-03-24 04:49:41 +01:00
André Berg 884a2fcd31 Post merge fix: Move remote XIBs into English.lproj and make them localized again. 2010-03-24 04:49:10 +01:00
André Berg 38177ed968 Merge remote branch 'brotherbard/experimental' into local branch 'bb/experimental' 2010-03-24 01:41:00 +01:00
Nathan Kinsinger 096a176fbd Show the full width of text in the file content text view
The text view was wrapping text well before it reached the edge of the view.

In PBGitHistory.xib in the textview for the file contents check the Resizable Horizontally checkbox in the Size Inspector
2010-03-22 13:06:51 -06:00
Nathan Kinsinger 783e38d623 Remove the lower toolbar from the history and stage views
- in the history view move the detail/tree view and quick look buttons to the top toolbar
2010-03-22 12:26:57 -06:00
Nathan Kinsinger 4ccd9356be Maintain the selection in the file browser when the commit selection changes
- only maintains one item, if multiple items are selected then only the first one will stay selected
    - if the file is removed in the new commit then don't select anything, then if a new commit is selected that does have that file it will be selected again
    - this does not maintain the expanded state of folders other than the one(s) that contain the selected file
    - in PBGitHistory.xib Tree Controller turn off:
        - Avoid Empty Selection
        - Select Inserted Objects
2010-03-22 12:25:12 -06:00
Nathan Kinsinger 6a8f495318 Add support for QuickLook in 10.6+
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
2010-03-22 12:25:02 -06:00
Nathan Kinsinger 9236b801a8 Bugfix: Avoid looping while parsing the children of a tree
Happens very intermittently, readLine keeps returning "\r".
2010-03-22 10:55:56 -06:00
Nathan Kinsinger e0a3422439 Bugfix: Index not refreshing on manual refresh
The window controller should be calling the content controller's refresh and not the repository's.
2010-03-20 18:45:45 -06:00
Nathan Kinsinger ef26909d75 Add a Refresh button to the main window toolbar 2010-03-13 23:05:28 -07:00
Nathan Kinsinger 46b6057ce1 Speed up commit's isOnSameBranch
Use the cached commit list to avoid asking git for the info. This is used to update GUI buttons and when opening the contextual menu so making it fast is important. It wasn't possible before because we weren't storing all the commits.
2010-03-13 22:16:47 -07:00
Nathan Kinsinger 4a8c524692 Add branch view filters to history scope bar
- 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
2010-03-13 22:16:44 -07:00
Nathan Kinsinger c83f77801e Delete branches when the refs are deleted
In reloadRefs:
    - check for any branches that are no longer in the repo and delete them
        - except the detached HEAD and the "other" revs
    - send KVO notice for the refs ivar changing
    - get rid of the BOOL return value as it's not being used
    - get rid of the outdated comments
    - clean things up a bit
2010-03-13 22:16:40 -07:00
Nathan Kinsinger 1b75af3805 Fix the tree view menu item
It was no longer opening the tree view because the index in setTreeView: was wrong.

Removing the raw view was started in 34394d056b. Finish removing the raw view stuff and clean things up.
    - remove the rawCommit property
    - fix the incorrect index of the tree view setter
    - define symbols for the indexes
    - rename the selectedTab property to indicate what is being selected
    - rename realCommit to selectedCommit to better indicate what it's for
    - define a key for the defaults
2010-03-13 22:16:37 -07:00
Nathan Kinsinger 1323638791 Add/modify convenience methods in PBRevSpecifier
- NSCopying
    - change isEqualTo: to isEqual: so that it works well with NSArray's (containsObject: and removeObject: will use isEqual: instead of pointer equality)
    - add hash to go with isEqual:
    - pre-calculate the isSimpleRef value. The rangeOf... methods are very slow and have a major effect on the tight loop in reloadRefs.
2010-03-13 22:16:34 -07:00
Nathan Kinsinger a0b11cfed1 Remove the observers from the ref controller
The ref controller is no longer responsible for updating the commit controller.
2010-03-13 22:16:31 -07:00
Nathan Kinsinger ef8fed6f4e Fix up the stage view's commit message text view
- stop the spelling error markers from being drawn over
    - allow undo/redo in the commit message view
2010-03-13 22:16:27 -07:00
Nathan Kinsinger c19d2c8058 Add Diff to contextual menus
- added to menus for refs, commits, and files
    - show a message when there are no changes
2010-03-13 22:16:24 -07:00
Nathan Kinsinger dc56af4aa6 CLIProxy: use the newly created NSURL for the workingDirectory
NSURL's don't play nice with NSDistantObject, use the newly created NSURL instead of the NSDistantObject proxy.

This fixes problems with rev specifiers created using the gitx tool crashing GitX the second time they are viewed because the NSConnection to the tool has been closed.
2010-03-13 22:16:21 -07:00
Nathan Kinsinger 4a9abd2d8c Fix drawing ref labels on the next tableview column
If there are a large number of refs pointing to a commit, then they may be drawn on top of or behind the other columns.

This will not show any labels that don't fit.
2010-03-13 22:16:18 -07:00
Nathan Kinsinger ca846bc6eb Have the preferences window remember the last view 2010-03-13 22:16:15 -07:00
Nathan Kinsinger 27d4b22122 Add preferences for the column guide in the commit message 2010-03-13 22:16:12 -07:00
Nathan Kinsinger f2a395d423 Add Reopen all repositories from last session
Store all the open documents when the app closes and then open them when the app starts again. Defaults to NO, so that there is no change to the existing behavior.
2010-03-13 22:16:09 -07:00
Nathan Kinsinger 2b0c2b200a Retry loadCommit() script when it fails
Fixes a problem when opening a number of repos at once where the commit information does not show up. Get a webKit error "TypeError: Result of expression 'commit' [undefined] is not an object."

For some reason the callWebScriptMethod:withArguments: method returns nil (even after the webView:didFinishLoadForFrame: delegate is called) when the app is busy. Seems like the web view is not really ready yet and so it never actually calls loadCommit().

If we get nil (normally should get WebUndefined) then try changeContentTo: again after a little delay. This stops the loadCommitDetails() script from running before the commit object is created.
2010-03-13 22:16:06 -07:00
Nathan Kinsinger 6427fd90fc Reopen the stage view if that was the last view open 2010-03-13 22:16:02 -07:00