~ubuntu-branches/debian/sid/geany-plugins/sid

« back to all changes in this revision

Viewing changes to geanylua/examples/info/app-information.lua

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-07-10 22:56:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090710225641-xc1126t7pq0jmpos
Tags: upstream-0.17.1
ImportĀ upstreamĀ versionĀ 0.17.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--[[
 
2
  Shows some user prefs and application information 
 
3
--]]
 
4
 
 
5
local info={}
 
6
 
 
7
 
 
8
 
 
9
function read_table(t, m)
 
10
  if not t then return end
 
11
  for k,v in pairs(t) do
 
12
    if type(v)=="table" then
 
13
       read_table(v, k.."."); -- recurse into sub-table
 
14
    else
 
15
       table.insert(info,m..k..": "..tostring(v))
 
16
    end
 
17
  end
 
18
end
 
19
 
 
20
read_table(geany.appinfo(), "")
 
21
 
 
22
table.sort(info)
 
23
 
 
24
geany.message("App info:", table.concat(info, "\n"))
 
25