widgets.recent: Show more recent files by default

It's the sensible thing to do, really.

Signed-off-by: David Aguilar <davvid@gmail.com>
README.md: Wrap long lines

Add the missing newline while we're in here.

Signed-off-by: David Aguilar <davvid@gmail.com>
widgets.status: Refactor context menus

List the non-destructive options first so that spurious clicks do not
accidentally clobber the index.

I tried using small separator at the top of the menu to minimize
spurious clicks but Qt seems to ignore separators at the beginnnig of
menus.

This also refactors the context menu setup by breaking it apart into
separate functions.

Closes #137

Reported-by: @grandinj via github.com
Signed-off-by: David Aguilar <davvid@gmail.com>
models.selection: Add selected_group()

This helper method returns the first staged, unmerged, modified, or
untracked file list with content, in that order.

Signed-off-by: David Aguilar <davvid@gmail.com>
difftool: Add run() method

Add a run() method that automatically operates on the selection.  This
makes it easy for GUI widgets to launch difftool without needing to
duplicate the logic for dealing with the selection.

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: Use difftool.run()

Make the Difftool editor command into a thin wrapper around
difftool.run().

Signed-off-by: David Aguilar <davvid@gmail.com>
widgets.status: Use difftool.run()

We don't need to keep around our own logic anymore now that we have
difftool.run().

Signed-off-by: David Aguilar <davvid@gmail.com>
main.view: Make Ctrl+G launch "grep"

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: Add run() method

This can replace SLOT() and will make things more tidy by eliminating
the sprawling signals module.

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: Add missing newlines to the suggested .gitignore rules

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: Unify the way we edit and difftool files

Signed-off-by: David Aguilar <davvid@gmail.com>
widgets.diff: Add editor and difftool shortcuts

Add Ctrl+E (launch editor) and Ctrl+D (launch difftool)
shortcuts to the diff panel.

Suggested-by: @grandinj via github.com in #136
Signed-off-by: David Aguilar <davvid@gmail.com>
Makefile: Make the 'ctags' path configurable

Signed-off-by: David Aguilar <davvid@gmail.com>
refactor: Death to cola.signals

Rework the way we launch commands so that we do not need either the
cola.signals module or the dispatch table in cola.cmds.

Call commands directly instead of routing things through the command
factory.  It's simpler, takes less code, and is easier to understand.

Signed-off-by: David Aguilar <davvid@gmail.com>
refactor: Use the Interaction class to eliminate log-related signals

Use dependency injection to do away with all the complicated signal
routing stuff.  The Interaction class provides the interface, and the
GUI components inject themselves into the namespace.  It's simple and
uses less code.

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: Catch tracebacks when commands fail

Add trackback logging to the cmds.do() interface.

Signed-off-by: David Aguilar <davvid@gmail.com>
git: Rename threading lock for consistency

Signed-off-by: David Aguilar <davvid@gmail.com>
refactor: Death to controllers

Let the views run commands directly instead of making them go through a
command wrapper.  This eliminates a bunch of classes and code that we no
longer need to maintain.  It's much simpler now.

	24 files changed, 71 insertions(+), 419 deletions(-)

Signed-off-by: David Aguilar <davvid@gmail.com>
main.view: Add tooltips to the detach and close buttons

Make the interface more discoverable by adding tooltips.

Suggested-by: @grandinj via github.com in #136
Signed-off-by: David Aguilar <davvid@gmail.com>