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 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
* insta-decorate:
Add framework to support removing refs
Show refs in HTML view
Allow copy and pasting of web source by pressing 'c'
Refactor cellInfo structure
Only decorate if we need to
Multithread test
Add objective c diff header
Conflicts:
GitX.xcodeproj/project.pbxproj
This makes the PBGitRevisionCell a bit nicer by retrieving all values
from the PBGitCommit object itself, and using another NSTextFieldCell to
draw the text.
This mean that PBGitGrapher now stores its information in the PBGitCommit's,
rather than in a custom grapher array. Also, because we don't need the
grapher to display refs anymore, the ref labels are also displayed when
using path limiting (for example, 'gitx -- Makefile').
This removes the 'Avoid empty selection' attribute on the branch controller.
This should hopefully help with selecting the default branch correctly in
the menu.
PBDetailController is the window controller, and now takes ownership of the repository so we can bind to it through File’s Owner in the nib file. Currently the ApplicationController creates a new PBDetailController at startup with the opened repository.