From 2c6dfae8074166d59ccb13ab86d1c0d1c9133a7f Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Sun, 9 Sep 2012 15:08:46 +0100 Subject: [PATCH] Shorten various messages --- otherwise they are NOT SHOWN at all. Also, mark pagedirty in all cases when deleting the file, to cause the screen refresh -- otherwise the message "Press 'Y' to confirm" stays there indefinitely. --- filechooser.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/filechooser.lua b/filechooser.lua index d0455b3c6..aaf41a6b2 100644 --- a/filechooser.lua +++ b/filechooser.lua @@ -364,21 +364,20 @@ function FileChooser:addAllCommands() local pos = self.perpage*(self.page-1)+self.current local folder = self.dirs[pos] if folder == ".." then - showInfoMsgWithDelay(" can not be deleted! ",2000,1) + showInfoMsgWithDelay(".. cannot be deleted! ",2000,1) elseif folder then - InfoMessage:show("Press \'Y\' to confirm deleting... ",0) + InfoMessage:show("Press \'Y\' to confirm",0) if self:ReturnKey() == KEY_Y then if lfs.rmdir(self.path.."/"..folder) then - self.pagedirty = true table.remove(self.dirs, offset) self.items = self.items - 1 self.current = self.current - 1 else - showInfoMsgWithDelay("This folder can not be deleted! ",2000,1) + showInfoMsgWithDelay("Cannot be deleted!",2000,1) end end else - InfoMessage:show("Press \'Y\' to confirm deleting... ",0) + InfoMessage:show("Press \'Y\' to confirm",0) if self:ReturnKey() == KEY_Y then pos = pos - #self.dirs local fullpath = self.path.."/"..self.files[pos] @@ -390,9 +389,9 @@ function FileChooser:addAllCommands() table.remove(self.files, pos) self.items = self.items - 1 self.current = self.current - 1 - self.pagedirty = true end end -- if folder == ".." + self.pagedirty = true end -- function ) -- make renaming flexible: it either keeps old extention (BEGINNERS_MODE) or