#! /usr/bin/env lua -- -- test06.lua -- Copyright (C) 2010 Adrian Perez -- -- Distributed under terms of the MIT license. -- local Gtk = require ("gi").Gtk Gtk.init (0, nil) window = Gtk.Window { title = "Toolbared window", default_width = 400, default_height = 300, allow_shrink = false } sbar = Gtk.Statusbar { has_resize_grip = true } toolbar = Gtk.Toolbar { tooltips = true } vbox = Gtk.VBox {} sbarctx = sbar:get_context_id ("default") sbar:push (sbarctx, "Look ma, this was set from Lua!") toolbar:insert (Gtk.ToolButton { stock_id = "gtk-quit" }, -1) toolbar:insert (Gtk.ToolButton { stock_id = "gtk-about" }, -1) vbox:pack_start (toolbar, false, false, 0) vbox:pack_start (Gtk.Label { label = "Empty area" }, true, true, 0) vbox:pack_end (sbar, false, false, 0) window:add (vbox) window:show_all () Gtk.main ()