ADG Lua 

ADG Lua Commit Details

Date:2013-03-21 11:01:09 (6 years 8 months ago)
Author:Nicola Fontana
Branch:master
Commit:5a3a564b254bef006f1e2f93a82c1ae45735c452
Parents: dfa697d36a942f66f42a5c22ec11ca194d51e0d0
Message:adg-demo: cosmetic improvements

Changes:
Madg-demo.lua.in (6 diffs)

File differences

adg-demo.lua.in
7171
7272
7373
74
7475
7576
7677
7778
7879
7980
81
8082
8183
8284
......
8486
8587
8688
89
8790
8891
8992
......
9295
9396
9497
98
9599
96100
97101
......
199203
200204
201205
206
202207
203208
204209
......
239244
240245
241246
247
242248
243249
244250
......
284290
285291
286292
293
287294
288295
289296
290297
298
291299
292300
293301
-- GtkBuilder initialization
local builder = Gtk.Builder()
builder:add_from_file(adg_data_dir .. '/adg-demo.ui')
local ui = builder.objects
-- Canvas settings
local canvas = piston.view.detailed
canvas:set_paper('iso_a4', Gtk.PageOrientation.LANDSCAPE)
ui.mainCanvas:set_canvas(canvas)
-- Help dialog
ui.mainHelp.on_clicked = function ()
local dialog = ui.wndHelp
dialog.on_response = Gtk.Widget.hide
-- About dialog
ui.mainAbout.on_clicked = function ()
local dialog = ui.wndAbout
local icon_list = Gtk.Window.get_default_icon_list()
-- Save as dialog
ui.mainSaveAs.on_clicked = function ()
local dialog = ui.wndSaveAs
-- Print dialog
do
local settings
-- Quit command
ui.mainQuit.on_clicked = Gtk.main_quit
-- Main window
local window = ui.wndMain
window.on_delete_event = Gtk.main_quit
window:show_all()

Archive Download the corresponding diff file

Branches

Tags