Skip to content

Instantly share code, notes, and snippets.

@davidboy
Created August 17, 2012 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidboy/3380386 to your computer and use it in GitHub Desktop.
Save davidboy/3380386 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="other_window">
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkToolbar" id="toolbar2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="test button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">It's a star!</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-about</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button3">
<property name="label" translatable="yes">Normal gtk button in the window</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
http://ubuntuone.com/4prgktamZNY5aK3o1Cm6od
local lgi = require 'lgi'
local Gtk = lgi.Gtk
local builder = Gtk.Builder()
assert(builder:add_from_file('glade.xml'))
local ui = builder.objects
ui.other_window:show_all()
Gtk.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment