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).
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 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>
* 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.
* 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
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>
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.
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
That's why it's there, after all. This also makes the system
more robust and catches some more errors.
The next thing this enables is to also allow right-clicking
on refs in the commit list.
The ref functionality is somewhat weird right now, in that
some parts of the code require a nil array when there are no
refs. So, we add a good removeRef accessor to keep track of this