Make only Back (not Home) return from Search Results.

It is best to restrict Home to only exit from the application (or
perhaps also for closing the document, though even this is doubtful) and
not use it in any other context, because otherwise pressing Home too
many times may inadvertently exit the application and annoy the user.
It is a bad practice to let user try various keys in different contexts
and hope that one of them may work.
This commit is contained in:
Tigran Aivazian
2012-10-03 20:29:34 +01:00
parent f3306d5512
commit d1d955f3a4

View File

@@ -76,11 +76,7 @@ function FileSearcher:setSearchResult(keywords)
end
function FileSearcher:init(search_path)
if search_path then
self:setPath(search_path)
else
self:setPath("/mnt/us/documents")
end
self:setPath(search_path or "/mnt/us/documents")
self:addAllCommands()
end
@@ -245,7 +241,7 @@ function FileSearcher:addAllCommands()
self.pagedirty = true
end
)
self.commands:add({KEY_BACK, KEY_HOME}, nil, "Back",
self.commands:add(KEY_BACK, nil, "Back",
"back",
function(self)
return "break"