buttleofx/ButtleOFX — pull request #112 by JamesWrigley (2014-07-15 08:48:49+00:00)
Title: Added hotkey for the file browser to enter the selected folder

Hi there,
This patch lets the user enter the selected folder when they press the enter key.
It works like this:
* FileModelBrowser.py has a new variable ,`_lastSelected`, that holds the FileItem of the last selected item. It also has a new getter method ,`getLastSelected()`, that returns `_lastSelected`. I added a line to `selectItem()` to update `_lastSelected` on each selection change. `FileItem.getFilepath()` and `FileItem.getFileType()` are exposed to QML as well.
* There's a new function in WindowFiles.qml (imaginatively named `enterFolder` :P) that will get `_lastSelected` and enter it if it is a folder.
* There's a new case in Browser.qml to catch when the enter key is pressed, this just calls `enterFolder()`.

If there are multiple items selected, the browser will enter the last selected item (as long as it is a folder of course). There's also a bit of whitespace cleanup.

C&C is welcome, I'm happy to implement it differently if this is a bit messy or something :)