diff --git a/filechooser.lua b/filechooser.lua index 7cde6e144..a6fdcb86c 100644 --- a/filechooser.lua +++ b/filechooser.lua @@ -498,7 +498,8 @@ function FileChooser:addAllCommands() self.commands:add(KEY_H,nil,"H", "show help page", function(self) - HelpPage:show(0, G_height, self.commands) + local title="Hotkeys "..G_program_version + HelpPage:show(0, G_height, self.commands, title) self.pagedirty = true end ) diff --git a/reader.lua b/reader.lua index afddbc65f..57c6d1ba6 100755 --- a/reader.lua +++ b/reader.lua @@ -99,6 +99,15 @@ if optarg["G"] ~= nil then globalgamma = optarg["G"] end +local vfile = io.open("git-rev", "r") +if vfile then + G_program_version = vfile:read("*a") or "?" + G_program_version = G_program_version:gsub("[\n\r]+", "") + vfile.close() +else + G_program_version = "(unknown version)" +end + if util.isEmulated()==1 then input.open("") -- SDL key codes