File: example.js

package info (click to toggle)
seed 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,900 kB
  • sloc: ansic: 24,336; sh: 11,196; makefile: 773; xml: 187; python: 173
file content (24 lines) | stat: -rwxr-xr-x 373 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0"?>
<programlisting>
#!/usr/local/bin/seed
Gtk = imports.gi.Gtk;
GtkBuilder = imports.gtkbuilder;

handlers = {
    ok_button_clicked: function(button){
	Seed.quit();
    }
};

Gtk.init(Seed.argv);

b = new Gtk.Builder();
b.add_from_file("test.ui");
b.connect_signals(handlers);

d = b.get_object("dialog1");

d.show_all();

Gtk.main();
</programlisting>