settings: moar lambda

Signed-off-by: David Aguilar <davvid@gmail.com>
models.main: detect when we are in the middle of a merge

Signed-off-by: David Aguilar <davvid@gmail.com>
widgets.main: add "Merging" to the title when merging

Signed-off-by: David Aguilar <davvid@gmail.com>
refactor: eliminate the `cola.notification` module

Use the observable functionality instead of the redundant notifier.  We
now track the mode changed events in the commit message editor instead
of listening for a global notifier message.

Signed-off-by: David Aguilar <davvid@gmail.com>
models.main: manage 'head' from within set_mode() only

Remove the set_head() method and simplify callers by making set_mode()
manage the 'head' variable.  This is simpler since its value is always
tied to the mode (amend = 'HEAD^', all others = 'HEAD').

Signed-off-by: David Aguilar <davvid@gmail.com>
models.main: exit amend mode when merging

Detect when we've somehow a state where we're amending and in the middle
of a merge.  Reset the mode back to "none" when this happens.

This can happen if the user enters "amend" mode and then merges a
branch, either through the UI or via the command-line.  We now avoid
this undesirable state by automatically disabling the "amend" mode when
an update detects that we are in the middle of a merge.

Signed-off-by: David Aguilar <davvid@gmail.com>
commitmsg: disable the "amend" action when merging

Make the amend action sensiive to in-progress merges.  The action is now
disabled to prevent users from seeing the "do not amend while merging"
message.

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