Commit Graph

849 Commits

Author SHA1 Message Date
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
Nathan Kinsinger 388818b045 Make the accept drop window a document modal sheet
- don't do anything if the ref is dropped on the old commit
    - clean up the message
    - allow it to be suppressed
2010-03-13 22:15:58 -07:00
Nathan Kinsinger 865ff8995a Hide menu items in the File menu that are not used
They are still there in case they are ever needed
2010-03-13 22:15:55 -07:00
Nathan Kinsinger 4903145243 Change the commit list font to be 12 pt
More closely matches Mail.app's list view
2010-03-13 22:15:52 -07:00
Nathan Kinsinger 9dc54b3316 Resize the Amend checkbox
It was being clipped by one pixel
2010-03-13 22:15:49 -07:00
Andy Fowler 9c7aaf0760 Fix typo in successful commit message 2010-03-13 22:15:46 -07:00
Nathan Kinsinger 0cd02c13db Stop the top of diffs in the stage view from being cut off 2010-03-13 22:15:43 -07:00
Nathan Kinsinger 9689c430ef Clean up the commit file list
- remove the underline from file names (makes them easier to read)
    - add icons to replace the file modification buttons (icons by Nathan Kinsinger)
2010-03-13 22:15:40 -07:00
Nathan Kinsinger 9a536fc92a Clean up the commit message
- allow the commit message text to wrap
    - use Menlo on systems that have it
2010-03-13 22:15:37 -07:00
Nathan Kinsinger b557d6b5c6 Clean up the commit header
- make the "Gist it" button a Mac OS X style button
    - remove the default name from each field
    - move the author's gravatar and include the committer's
        - move the gravatar to the left of the author's name
        - add a gravatar for the committer
        - move the author and commiter info to it's own table to allow for putting the gravatar image in a center column
        - setGravatar() now uses the email address passed in
2010-03-13 22:15:34 -07:00
Nathan Kinsinger c61f65b3e8 Set the minimum size of the window to 600x450 2010-03-13 22:15:31 -07:00
Nathan Kinsinger 446dd540da Add Terminal, Reveal and Clone To to the toolbar
The clone icon is by André Berg (in 4396081c07)
2010-03-13 22:15:28 -07:00
Nathan Kinsinger ad3ea443ca Add items to the History view's upper toolbar
- 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
2010-03-13 22:15:24 -07:00
Nathan Kinsinger 1b41171d92 Add a bottom content border/toolbar to the repository window
- 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
2010-03-13 22:15:13 -07:00
Nathan Kinsinger 2321ec8c47 Add and delete refs from the source list view
Observe the branches array and update the sidebar when refs are added or deleted.

Sort new items based on the title.
2010-03-13 22:15:06 -07:00
Nathan Kinsinger 90f80f01b4 Add a new cell class for the source view items
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.
2010-03-13 22:14:49 -07:00
Nathan Kinsinger 64f4276e21 Delete old toolbars and create new ones
- 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
2010-03-13 22:14:36 -07:00
Nathan Kinsinger b1e632cf6f Move the sidebar to the window controller
Remove the sidebar from the history controller and put it under the control of the window controller.
    - the window controller is the delegate of the split view and controls resizing so the source list stays the same width as the window resizes
    - the sidebar controller tells the window controller which content view to show
    - removed the view selector from the toolbars of the history and commit xibs (the menu and keyboard shortcuts command-1 and command-2 still switch between the views)
    - added horizontal lines to the history and commit xibs to delineate the bottom toolbar area
2010-03-13 22:13:12 -07:00
Nathan Kinsinger c36726b985 Update the GUI to be more iApp like
- 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
2010-03-13 22:13:06 -07:00
Nathan Kinsinger 4ea04358ba replace depreciated selectRow:byExtendingSelection: method 2010-03-13 22:12:33 -07:00
Nathan Kinsinger eff7dab6b2 Merge branch 'refs/heads/pb/sidebar'
Conflicts:
	GitX.xcodeproj/project.pbxproj
	PBGitHistoryController.m
	PBGitWindowController.m
2010-03-13 22:11:47 -07:00
Nathan Kinsinger 0ad92349e6 Add Clone Repository
Added Clone… to the File menu which opens a window to select the repository URL and the path for the destination.
2010-03-13 22:11:00 -07:00
Nathan Kinsinger d3d700a138 Add Clone To… to the File menu
Will clone an open repository to a folder. Opens a sheet with a custom accessory view that has a checkbox to allow creating a bare repo.
2010-03-13 12:52:44 -07:00
Nathan Kinsinger 4bcbf43dc4 Add convenience method for the repository's projectName
Update the displayName method to use it
2010-03-13 12:52:41 -07:00
Nathan Kinsinger fe5dddc681 Add Add Remote
- Add Remote in the Repository menu
    - an Add Remote Sheet
2010-03-13 12:52:33 -07:00
Nathan Kinsinger 6e405972e8 Add Push to the contextual menus for refs 2010-03-13 12:52:29 -07:00
Nathan Kinsinger 46e996f5c6 Add Pull to the contextual menus for refs 2010-03-13 12:52:26 -07:00
Nathan Kinsinger 4654dc105f Add Fetch to the contextual menus for refs 2010-03-13 12:52:22 -07:00
Nathan Kinsinger 55973b4aff Add convenience methods for remotes 2010-03-13 12:42:19 -07:00
Nathan Kinsinger 0c0b764005 Remote progress sheet
Add a progress sheet for remote operations that takes the arguments for a command and runs it in a task then shows a success or failure sheet.
2010-03-13 12:42:15 -07:00
Nathan Kinsinger 7eec230959 Add Rebase to the contextual menu for commits and refs 2010-03-13 12:42:10 -07:00
Nathan Kinsinger e50ddbc503 Add Cherry Pick to contextual menu for commits. 2010-03-13 12:42:06 -07:00
Nathan Kinsinger e2ccfe6fce Add Merge in the contextual menus for commits and refs 2010-03-13 12:42:02 -07:00
Nathan Kinsinger 8359883c92 Rename removeRef: to showDeleteRefSheet:
- move the core of the delete implementation to the repository as deleteRef:
    - move it to it's own pragma mark section
2010-03-13 12:41:56 -07:00
Nathan Kinsinger dceabb6702 Add Checkout Files to file browser contextual menu
Allows checking out the state of a file from any commit to the working directory.
2010-03-13 12:41:50 -07:00
Nathan Kinsinger 859f77e718 Fix file names with spaces not working in the contextual menu
Files with spaces end up with 4 extra spaces after the name. This stops them from working with the various commands in the contextual menus.
2010-03-13 12:41:37 -07:00
Nathan Kinsinger 69d67820f6 Add Checkout
Checkout:
    - PBGitRepository: add checkoutRefish:
    - PBRefController: renamed checkoutRef: to checkout: and use new method in PBGitRepository
    - add to the contextual menus for commits (it was already in the menu for refs)
    - add "Checkout branch" checkbox to the Create Branch sheet
        - store the state in the defaults
    - tell the commitController to rearrangeObjects so that the refs highlight correctly (seems to only be a problem when going from a branch to a detached HEAD at the same commit)
2010-03-13 12:41:30 -07:00
Nathan Kinsinger aa4a24a579 Add Create Tag
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
2010-03-13 12:41:24 -07:00
Morgan Schweers ffa2e1aed4 Add stderror to the pipe results, so we can find out what happened when things go wrong. Not an optimal answer, but a quick one. 2010-03-13 12:41:11 -07:00
Nathan Kinsinger e43a87e3f8 Add Copy SHA and Copy Patch items to commit contextual menu 2010-03-06 16:32:48 -07:00
Nathan Kinsinger 509de29091 Add Reveal in Finder item to the Repository menu. 2010-03-06 16:31:51 -07:00
Nathan Kinsinger db0bb87340 Add Open in Terminal to the Repository menu.
Code came from B. Ohr at: http://groups.google.com/group/gitx/browse_thread/thread/a103df7ef7c1f037

Added quotes to workingDirectory path to support paths with spaces.
2010-03-06 16:31:16 -07:00
Nathan Kinsinger 9f048f6363 Update Create Branch
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)
2010-03-06 16:30:50 -07:00