Sample/DialogSaveTemplate.js
[app.Builder.js] / Sample / DialogSaveTemplate.js
1 Gtk = imports.gi.Gtk;
2 Gdk = imports.gi.Gdk;
3 Pango = imports.gi.Pango;
4 GLib = imports.gi.GLib;
5 Gio = imports.gi.Gio;
6 GObject = imports.gi.GObject;
7 GtkSource = imports.gi.GtkSource;
8 WebKit = imports.gi.WebKit;
9 Vte = imports.gi.Vte;
10 console = imports.console;
11 XObject = imports.XObject.XObject;
12 DialogSaveTemplate=new XObject({
13     xtype: Gtk.Dialog,
14     listeners : {
15         delete_event : function (self, event) {
16             return true;
17         }
18     },
19     default_height : 200,
20     default_width : 400,
21     items : [
22         {
23             xtype: Gtk.HBox,
24             pack : "add",
25             items : [
26                 {
27                     xtype: Gtk.Label,
28                     label : "Name",
29                     pack : "add"
30                 },
31                 {
32                     xtype: Gtk.Entry,
33                     pack : "add"
34                 }
35             ]
36         },
37         {
38             xtype: Gtk.Button,
39             label : "Cancel",
40             pack : "add_action_widget,0"
41         },
42         {
43             xtype: Gtk.Button,
44             label : "Cancel",
45             pack : "add_action_widget,0"
46         }
47     ]
48 });
49 DialogSaveTemplate.init();
50 XObject.cache['/DialogSaveTemplate'] = DialogSaveTemplate;