Commit Graph

61 Commits

Author SHA1 Message Date
André Berg a100ff38ee Set a copy of the "Push" message strings for the alert panel message with a small case "p" letter because it will be appended in the middle of a sentence. 2010-03-24 11:09:09 +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 38177ed968 Merge remote branch 'brotherbard/experimental' into local branch 'bb/experimental' 2010-03-24 01:41:00 +01: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 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 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 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 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 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 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
Nathan Kinsinger e43a87e3f8 Add Copy SHA and Copy Patch items to commit contextual menu 2010-03-06 16:32:48 -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
Nathan Kinsinger ff5f3f7979 Add methods dealing with menus needed for future features.
Switch from storing both the ref and the commit to storing just one or the other as a refish.

Change action methods that receive PBRefMenuItem to support the change in functionality. In particular the removeRefSheetDidEnd:returnCode:contextInfo: method in PBRefController now looks up the commit for the ref (this was the only place that needed both the ref and the commit).
2010-03-06 15:58:20 -07:00
Nathan Kinsinger 87f76fd5a1 Bugfix: fix the contextual menu and drag-n-drop of refs
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).
2010-02-19 22:54:25 -07:00
Nathan Kinsinger fbc1902764 Switch Delete Remote panel to a window modal sheet 2010-02-19 22:26:14 -07:00
André Berg ff550e85f1 More cleanup and feature adding for the Push, Pull and Rebase popup button toolbar items.
- Complete the action methods for fetch and rebase. 
- Add a more generic and re-usable method for updating the popup toolbar items.
- Comment out updatePushMenuWithRemotes: and updatePullMenuWithRemotes: as those have been 
  superseded by updatePopUpToolbarItemMenu:remotes:action:title:
2009-11-10 12:41:02 +01:00
brotherbard a26bca8845 Add drop down menus to the push and pull toolbar items.
TODO: need small disclosure triangles in the bottom right corner of the icons.
2009-11-08 20:34:34 -07:00
brotherbard 0be790dad4 merge andreberg/master 2009-11-08 18:19:41 -07:00
brotherbard d365bd44f5 Add a "Create Tag" button to the toolbar.
TODO: a custom icon
2009-11-08 15:51:56 -07:00
brotherbard c52aedfcf2 Add an "Add Remote" button to the toolbar that adds and fetches a remote.
TODO: a custom icon
2009-11-08 10:06:37 -07:00
André Berg 2c6fd97b5c Cosmetic: Move showMessageSheet convenience method to the proper pragma mark section. 2009-11-08 16:30:18 +01:00
André Berg 1ade0f0620 Remove completely wrong TODO comment.
A deletion execution dialog should block the UI until it's complete if there could
potentionally be state change occurring which has different outcome for pre-deletion
or post-deletion finite state.

A middle ground solution would be to use a modal sheet attached to a specific document
which then only blocks this particular document.
2009-11-08 16:28:50 +01:00
André Berg 1a7b4cb4c7 Update branch menu after deletion of a branch. 2009-11-08 16:26:07 +01:00
André Berg 22ba33f575 Disable/re-enable Push, Pull and Rebase buttons depending on selected branch validity.
If "All branches" or "Local branches" is selected, the buttons will be disabled. 
Actions from the context menu continue to work as they implicitly set the target branch
through the identity of the clicked label patch.
Any other branch will re-enable the buttons.
2009-11-08 16:22:53 +01:00
brotherbard 5e126433f6 Bug fix: Move updating the current branch to the checkoutRef method.
Stops the branch from being updated back to the current branch when the Refresh Automatically preference is on.
2009-11-07 23:22:20 -07:00
brotherbard 9e72dba3e3 PBRefController: Switch the app modal Delete Remote panel to a window modal sheet. 2009-11-07 19:47:38 -07:00
André Berg f1fcb18a92 Improve error and tooltip descriptions. 2009-11-07 04:20:24 +01:00
André Berg 4c4203a7ce Update PBGitErrors to include some error messages dealing with missing remote tracking branches.
This is especially useful for the new button functionality.
2009-11-07 01:02:22 +01:00
André Berg 93a027cccd Bug fix: Make new buttons actually work.
Mind you, these buttons cannot operate on the clicked branch like the context menu. 
Instead they always operate on the currently active branch (or its default remote).
2009-11-03 04:38:30 +01:00
André Berg 7c1b9d9961 Add pullButton: IBAction. 2009-11-01 00:29:07 +01:00
Morgan Schweers 7eb3616f3f Disable toolbar entries when they are processing, as at least some minimal feedback for the user. I still think it needs a progress bar dialog, or something. 2009-10-26 16:31:35 +01:00
André Berg 2b0000ca23 Add menu and toolbar changes from cyberfox 2009-10-26 16:26:52 +01:00
Morgan Schweers b580c03795 DRY up the menu adding code
Add rebase and pull menu items
Get upstream name more git-accurately for upstream operations
2009-10-26 16:16:04 +01:00
Morgan Schweers cdc4f5208b Add a menu item and an action for pushing a repo up. 2009-10-26 16:15:35 +01:00
Johannes Gilger 13746a5a6b PBGitWindowController: Use beginSheetModalForWindow instead of runModal
Introduce a new showMessageSheet/showErrorSheet-method for
PBGitWindowController which uses the beginSheetModalForWindow method of
NSAlert whereever possible. This has the advantage over runModal as it
doesn't block the other instances of GitX and is generally more
unobstrusive for simple status-messages.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-09 18:33:02 +02:00
Johannes Gilger 64b977e9c8 PBGitRepository: Add method to remove branch
This adds a removeBranch method similar to the addBranch method. It
calls these methods when a branch is created/deleted in the UI, avoiding
the cost of simply calling refresh afterwards.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-06 17:23:51 +01:00
Pieter de Bie 38198a9e27 Merge branch 'stable'
* stable:
  GitRevList -- Try to read the encoding of the commit message
  GitRevList: fix crash when loading 0 commits
  Tickets #151 and #155: check for illegal branch names before creating.
2009-05-28 15:12:16 +01:00
Charles O'Rourke 353d1053b0 Tickets #151 and #155: check for illegal branch names before creating. 2009-05-28 13:46:12 +01:00
Pieter de Bie 7caf7d799a Merge branch 'stable'
* 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
2009-05-18 23:11:11 +01:00
Benjamin Kramer 6dcefe5bec Fix many gcc 4.2 compiler warnings 2009-05-18 23:08:51 +01:00
Mike Czepiel 7e74efba0d Added very basic tag info menu item and alert.
Simply renders the tag message when activated.
This would also make sense being available in
the web view somewhere.
2009-05-18 22:55:27 +01:00
Johannes Gilger 49a21e655f PBRefController: Ask for confirmation when deleting tags/branches
Show a very simple user-dialog when trying to delete a branch or a
tag.
This satisfies ticket #115.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-03-28 22:32:59 +00:00
Pieter de Bie 971e8e5bcc PBRefController: Only set title if we have a rev
We used to unconditionally set the title of the branch
to the current branch. This worked fine in most cases
where the current branch was already known, but failed
when you use 'gitx -c' and then switch to the HistoryView,
because then the currentBranch isn't known yet.

The simple fix is to check if we know it. If we don't,
it'll be set later on.
2009-01-19 22:20:16 +00:00
Mark Bestley 35f20cddd5 GitRefController: Fix moving and updating branches
This was also broken with the libgit2 move
2008-12-01 13:59:29 +01:00