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 :)
Hi there, This patch lets the user enter the selected folder when they press the enter key. It works like this:
_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 toselectItem()
to update_lastSelected
on each selection change.FileItem.getFilepath()
andFileItem.getFileType()
are exposed to QML as well.enterFolder
:P) that will get_lastSelected
and enter it if it is a folder.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 :)