widgets.main: set position label to a fixed size

Changing the position label text will cause the layout to invalidate and
the widget ends up getting resized, which is annoying.

Use a fixed size to prevent this from happening.

Signed-off-by: David Aguilar <davvid@gmail.com>
commitmsg: remove event filter to avoid spurious resizing

The commit message editor changes its minimum size when its focus
changes.  This allowed a nice behavior where it can be resized down so
that the description is not visible.

This is problematic because changing focus to/from the commit message
editor causes the dock widgets to resize themselves, which is not
wanted.

Set a sane minimum size on the description field and remove the event
filters so that we no longer futz with the minimum size.  This prevents
the spurious resizing.

Signed-off-by: David Aguilar <davvid@gmail.com>
qtutils: add hide_button_menu_indicator()

Signed-off-by: David Aguilar <davvid@gmail.com>
commitmsg: hide the menu indicator

Generalize qtutils.hide_button_menu_indicator() and use it for the
"Actions" menu button in the commit message editor.

Signed-off-by: David Aguilar <davvid@gmail.com>
diff: move the diff options menu into the DiffWidget

Refactor the code so that the diff options menu lives with the widget.

Signed-off-by: David Aguilar <davvid@gmail.com>
qtutils: make the error message box resizable

Add ResizeableMessageBox and use it in the critical() dialog.
This makes all error dialogs resizeable.

Closes #216

Suggested-by: @grandinj via github.com in #216
Signed-off-by: David Aguilar <davvid@gmail.com>
bookmarks: add "Open in New Window" action and hotkeys

Signed-off-by: David Aguilar <davvid@gmail.com>
dag: Add modified files list to dag

Currently the diff viewer in dag lists all
changes within a commit. There is no way to
refine the diff to a single file. This is
problematic for a commit which have many files
modified.

Add a file widget to dag. It will display the
list of modified files when a commit selected.
Selecting a file in the list will make the diff
viewer display the diff for that file only.

Suggested-By: @systemovich via github.com in #217

Signed-off-by: Minarto Margoliono
               <lie.r.min.g@gmail.com>
Merge pull request #223 from mmargoliono/file-panel

dag: Add modified files list to dag

Closes #217

Signed-off-by: David Aguilar <davvid@gmail.com>
doc: add Minarto to the credits

Signed-off-by: David Aguilar <davvid@gmail.com>
widgets: rename 'file' to 'filelist'

`file` is a Python built-in so rename our module.

Signed-off-by: David Aguilar <davvid@gmail.com>
dag: remove unused `args` variable

Signed-off-by: David Aguilar <davvid@gmail.com>
gitcmds: minor style fixups

Rename `file_name` to `filename` and change the order of arguments. Use
the `if <list>` form to check for empty lists instead of calling len().
Adjust the text labels to say `Filename`, `Additions`, and `Deletions`.

Signed-off-by: David Aguilar <davvid@gmail.com>
dag: suppress renames when showing the file list

Diffs are not correctly shown when files are renamed because the numstat
output will display `oldpath => newpath` as the path, which will not be
understood as a valid path by Git.

Suppress rename detection so that we always deal with real paths.

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: write .gitignore entries at the end of the file

We were writing new .gitignore entries at the beginning of the file. It
makes more sense to append to this file so that previous .gitignore
entries can be overridden.

Closes #224

Suggested-by: Owen Healy <ellbur@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
ssh-askpass: Set window type to dialog

On i3 window manager, ssh-askpass window is created as
full/top level window instead of floating window by default.
i3 sets dialog, utility, toolbar and splash windows to floating.

Changes ssh-askpass window type to dialog

Reported-By: aszkid via github.com in #207

Signed-off-by: Minarto Margoliono <lie.r.min.g@gmail.com>
Merge pull request #225 from mmargoliono/master

ssh-askpass: Set window type to dialog

Closes #207

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: check for errors when visualizing history

Catch exceptions when launching a history browser so that the user can
know when a browser has not been configured.

Closes #226

Reported-by: Benoît Nouyrigat @bnouyrigat via github.com
Signed-off-by: David Aguilar <davvid@gmail.com>
Merge branch 'master' of https://github.com/git-cola/git-cola into bug_fixes_from_pylint
cmds: fix bug in OpenParentDir()

When OpenParentDir() runs, it will try to concatenate a set with a list
and subsequently fail with a dialog box.