Update directory list selection on click event

We register for click events in order to show a context menu. If that
click event is over a row then that row may not be selected until after
the click event has been handled. We may want to modify the menu
depending on what is selected in the list, and since the selection has
not yet happened we may only see the previous selection.

Work around that issue by asking the directory list to update its
selection based on the event.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Add menu option for downloading selected file

Add an option to the directory list context menu for downloading the
currently selected file. In the future this should be done in a more
sophisticated way; the current implementation is a bit suboptimal since
it blocks the main thread until the download is complete.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Enable Download menu option only when selection

The option to download a selected file is only applicable if a file is
actually selected in the directory list. Activate the menu option only
when something is selected.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>