git-gui: Work around freeze problem with dialogs in Mac OS X

Tk 8.5 on Mac OS X has a bug whereby a dialog opened from a key
binding will hang; see issue 3044863 in the Tk issue tracker.
<http://sourceforge.net/tracker/?func=detail&aid=3044863&group_id=12997&atid=112997>

To work around this, we perform commands that open a dialog after
a brief delay; 150 ms seems to be a good compromise between short
enough as to be not annoying, and long enough to reliably work
around the issue.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Launch git gui and gitk in the foreground
Always call our Wish executable "Wish"

even when it's really called "Wish Shell" in the Tk framework.
Makes it easier for gitk to find it no matter what system we were
built on.
Make usettk off by default on Mac OS X

It looks ugly on Mac (colored pane headers are grey), not sure if that's
a bug in Tk on Mac.
Git gui blame: hard-code preferred window size.
Added configure-stk
gitk: Avoid horizontal scrolling of the commit list on Mac

With two-finger scrolling on a track pad, horizontal scrolling
of the commit list is usually unintentional, so avoid it
completely. This means it's also no longer possible to scroll
horizontally with shift-mousewheel, but this seems like a
small price to pay.
git-gui blame: prevent tool tips from sticking around after alt-tab

On Mac, mouse-move events are only dispatched to the active window,
which means that if we alt-tab to another application while a
tool tip is showing, the tool tip will stay there forever (in front
of other applications). So we must hide it manually when we lose
focus.
gitk: Make svn revision numbers clickable links
Give gitk its own app bundle (NEEDS WORK)

Much of this is just quickly hacked:
  - git must be configured with
    --with-tcltk="'/usr/local/git/share/gitk/lib/Gitk.app/Contents/MacOS/Wish'"
    for this to work
  - The Makefile probably doesn't have enough dependency checking; it works
    for a clean build
  - Unlike git gui, which tries to detect various possible Tcl/Tk installations,
    we only support /System/Library/Frameworks/Tk.framework
  - The version number in the bundle's Info.plist is not set correctly
  - AppMain.tcl has a hard-coded path to gitk
  - No uninstall
Disable vi key bindings on Mac

If the diff pane is selected, pressing Command-J would scroll the diff
instead of doing "Revert Changes". I'm not entirely sure why, but the
easiest way to fix it is to simply not bind the keys.
gitk: Add "First parent" checkbox

Sometimes it's desirable to see what changes were introduced by a
merge commit, rather than how conflicts were resolved. This adds
a checkbox which, when turned on, makes gitk show the equivalent
of "git show --first-parent <commit>" for merge commits.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Redirect gitk's stderr to /dev/null to avoid console spam on Mountain Lion
gitk: Synchronize highlighting in file view when scrolling diff

Whenever the diff pane scrolls, highlight the corresponding file in the
file list on the right. For a large commit with many files and long
per-file diffs, this makes it easier to keep track of what you're looking
at.

This allows simplifying the prevfile and nextfile functions, because
all they have to do is scroll the diff pane.

In some situations we want to suppress this mechanism, for example when
clicking on a file in the file list to select it, or when searching in the
diff, in which case we want to highlight based on the current search hit
and not the top line visible. In these cases it's not sufficiant to set
a "suppress" flag before scrolling and reset it afterwards, because the
scrolltext notification is sent deferred from a timer or some such; so we
need to remember the scroll position for which we want to suppress the
auto-highlighting until the next call to scrolltext; a bit ugly, but does
the job.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
gitk: Highlight current search hit in orange

When searching for text in the diff, and there are multiple occurrences
of the search string, the current one is highlighted in orange, and the
other ones in yellow. This makes it much easier to understand what happens
when you then click the Search button or hit Ctrl-S repeatedly.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
gitk: Highlight first search result immediately on incremental search

When typing in the "Search" field, select the current search result (so
that it gets highlighted in orange). This makes it easier to understand
what will happen if you then type Ctrl-S.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>