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             this.el.hide();
17             return true;
18         },
19         response : function (self, response_id) {
20             if (!response_id) {
21                  return;
22             }
23             // now we save it..
24             
25             
26         }
27     },
28     default_height : 200,
29     default_width : 400,
30     items : [
31         {
32             xtype: Gtk.HBox,
33             pack : "add",
34             items : [
35                 {
36                     xtype: Gtk.Label,
37                     label : "Name",
38                     pack : "add"
39                 },
40                 {
41                     xtype: Gtk.Entry,
42                     pack : "add"
43                 }
44             ]
45         },
46         {
47             xtype: Gtk.Button,
48             label : "Cancel",
49             pack : "add_action_widget,0"
50         },
51         {
52             xtype: Gtk.Button,
53             label : "OK",
54             pack : "add_action_widget,0"
55         }
56     ]
57 });
58 DialogSaveTemplate.init();
59 XObject.cache['/DialogSaveTemplate'] = DialogSaveTemplate;