Commit Graph

42 Commits

Author SHA1 Message Date
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 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 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 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 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 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 fe5dddc681 Add Add Remote
- Add Remote in the Repository menu
    - an Add Remote Sheet
2010-03-13 12:52:33 -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 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 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
Pieter de Bie 34394d056b HistoryView: Remove raw view
I don't think anybody has ever used this, so let's just remove it.
2009-09-17 23:32:35 +02:00
Pieter de Bie ff1d30571b WIP: Move the sidebar to the history view instead
I'm not sure what we should do with the commit stuff, but
this seems more reasonable
2009-09-13 22:44:26 +02:00
Benjamin Kramer 86f9adb6a0 Fix an obvious typo
Found by the clang static analyzer.
2009-08-28 00:15:01 +02:00
Johannes Gilger d669050551 Add PBCollapsibleSplitView as subclass of PBNiceSplitView
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>
2009-07-07 18:46:00 +01:00
Pieter de Bie 04db47d8e6 Merge commit 'origin/master'
* commit 'origin/master':
  CommitController: Don't turn of off automatic rearranging
  PBGitRepository: Clean up the readFromURL: method
  PBGitRepository: Fix opening of large directories due to bug in NSFileWrapper.
  PBGitIndexController: Renamed "Revert" to "Discard"
  CommitController: Reject merges
  HistoryController: Add "Open Files" menu item
  WebHistoryView: Also use the tree context menu
  HistoryController: Use a programatically created context menu
  WebHistoryController: Refactor menu search to be recursive
  HistoryController: Add some marks
  PBGitHistory: Add "Show in Finder" to files
  Display context menu in the history tree to show related commits
  History fileview: select current item on rightclick
  PBGitConfig: Add missing sentinel
  Remove use of deprecated stringWithCString
  HistoryView: only add parents if parents array exists
  keyboardNavigation: Fix keys 'c' and 'v' from webView
  Site: add link to Twitter

Conflicts:
	PBGitHistoryView.xib
	PBGitIndexController.m
2009-07-07 12:02:27 +01:00
Nicholas Riley f2a37df9f5 Set keyboard focus reasonably when switching between views.
When you switch to the commit view, the commit message gets focus;
when you switch to the history view, the commit list gets focus.
2009-07-07 11:56:40 +01:00
Pieter de Bie 7427cbe05d HistoryController: Add "Open Files" menu item 2009-06-16 19:41:57 +01:00
Pieter de Bie 1199c56e93 HistoryController: Use a programatically created context menu
This allows us to differentiate between one or multiple files,
and will also come in use when we want to create a context menu
from the webview later on

We now use representedObjects to store the selected paths.
That should make it possible to reuse the menu's from somewhere else.
2009-06-16 19:41:52 +01:00
Pieter de Bie 47e182a910 HistoryController: Add some marks 2009-06-16 19:30:12 +01:00
Johannes Gilger dc234cfdc9 PBGitHistory: Add "Show in Finder" to files
This adds the "Show in Finder" menu-entry and logic to files in the
tree-view of the history. Also the button "Show commits touching paths"
was renamed to "Show history of files".

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-16 19:30:11 +01:00
Pieter de Bie d973dc5ba7 Display context menu in the history tree to show related commits
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-16 19:30:11 +01:00
Pieter de Bie 8273aecb98 Allow a user to select which columns to display 2009-05-28 12:05:23 +01:00
Pieter de Bie cd4ee1b993 Update views when switching 2008-12-22 20:47:36 +01:00
Pieter de Bie 4591557e9b WebHistoryView: Fix displaying of parents
This was broken once with the shift away from Prototype,
and even further when using libgit2.
2008-12-01 14:26:42 +01:00
Pieter de Bie ea0b28d52c Fix copying of commits
This was broken after using libgit2's sha's objects, as we now need to use
realSha
2008-12-01 13:06:08 +01:00
Pieter de Bie 3dd6385440 Fix memory leaks 2008-11-26 17:44:24 +01:00
Pieter de Bie a62e14ffe7 HistoryView: Remove the BranchController
This wasn't used anyway. A good idea would be to create a new
branchcontroller that takes care of all these revs, rather than
letting PBGitRepository take care of that
2008-11-19 01:54:14 +01:00
Pieter de Bie 23c918660c HistoryView: Allow creation of branches 2008-11-01 22:51:10 +01:00
Pieter de Bie 4cefe8ee92 HistoryView: Allow dragging of refs to move them 2008-11-01 21:14:24 +01:00
Pieter de Bie 49631753a8 HistoryView: Allow sorting on commit subject
This was broken after binding the subject column
to the commit itself, rather than it's subject.
2008-10-03 18:24:15 +02:00
Pieter de Bie e329493154 Move toolbar to view xib 2008-10-03 17:18:26 +02:00
Pieter de Bie 1028157cbc Fix memory leaks
This changes a bunch of ivars to __weak's, to avoid reference loops.
Furthermore, in PBGitHistoryController, we need to call [webView close],
otherwise some memory will never be freed?
2008-09-28 16:14:00 +02:00
Pieter de Bie a2217fe099 Reload commits after doing a commit 2008-09-28 13:03:55 +02:00
Pieter de Bie de9f4ddf91 HistoryView: Add copy behaviour in commit list
This copies text like:

	2e7cd5268d (Remember selected view (history or commit))

to the pasteboard on command-c
2008-09-26 18:43:06 +02:00
Pieter de Bie 0d0a83f381 HistoryView: Reset the sorting after selecting another branch 2008-09-26 00:56:16 +02:00
Pieter de Bie 8c01a2964b HistoryView: Don't show path lines if the list is changed
This avoids drawing path lines if the list is sorted
or if there is a search, which would show the lines incorrectly.
2008-09-26 00:52:33 +02:00
Pieter de Bie 53dfea545e PBViewController: Extract common code to a superclass 2008-09-22 21:40:42 +02:00
Pieter de Bie 708c08a293 First part of splitting views 2008-09-19 21:36:52 +02:00