Merge pull request #186 from pwr/master

Use $XDG_CONFIG_HOME/git/config if available
app: avoid sys.version_info named tuple

87f921c26c9bad7fc5176939a9438125e43b31b0 broken git-cola on Snow
Leopard.  Fix it by using the more portable
sysconfig.get_python_version() instead of relying on sys.version_info
being a named-tuple.

Reported-by: Uri Okrent <uokrent@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
diff: update the cursor position when right-clicking

Emulate a left-click when the user has nothing selected and is invoking
the context menu via right-click.  This has the effect of moving the
cursor to the current position, which is the most intuitive thing to do.

If something is selected then this does nothing so that the selection is
preserved.

Reported-by: Phillip Whelan <madjesta@gmail.com>
Helped-by: Uri Okrent <uokrent@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
diff: use empty keyboard modifiers in the emulated left-click

We don't want right-click to behave strangely so ensure that no keyboard
modifiers are set and that buttons() contains only the left button.

Signed-off-by: David Aguilar <davvid@gmail.com>
diff: update the text cursor directly

Use cursorForPosition() and setTextCursor() to update the text cursor in
the mouse press event.  This is simpler then creating fake mouse events.

Signed-off-by: David Aguilar <davvid@gmail.com>