- 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
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
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 :)
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>
This keeps the subviews in memory, which means that switching views will
be faster if a view has already been opened. This also allows you to type
a commit message, switch to the history view, and then switch back to
continue typing.
Previously, we would try to copy the view selector from within
the RepositoryWindow, so we could reuse it and change it if we
need to.
However, that causes problems if you have another window open:
if we try to add an item using the insertItemWithIdentifier:atIndex:
method, the item will be added to _all_ toolbars with the same
identifier, even if those toolbars already have the item!
As I see no easy way to fix that, we completely avoid the issue
by not inserting any objects and just copying the view selector
from view to view.
This changes a lot of code, so quick review:
* RepositoryDocumentController now returns the document without selecting a ref
* PBGitWindowController now optionally shows the default view, or selects no view at all
* PBGitRepository keeps a pointer to its WindowController so that it can change views
This used to be bound to the UserDefaults, but that introduced the
bug that switching the view in one window also switched it in other
open windows.
See 2e7cd5268d