Sample/RooProjectProperties.js
[app.Builder.js] / Sample / RooProjectProperties.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 RooProjectProperties=new XObject({
13     xtype: Gtk.Dialog,
14     modal : true,
15     show : function() {
16         this.el.show_all();
17     },
18     default_width : 500,
19     listeners : {
20         "delete_event":function (self, event) {
21             this.el.hide()
22             return true;
23         }
24     },
25     items : [
26         {
27             xtype: Gtk.VBox,
28             pack : function(p,e) {
29                         p.el.get_content_area().add(e.el);
30                         e.border_width  =5;
31                     },
32             items : [
33                 {
34                     xtype: Gtk.Table,
35                     pack : "pack_start,true,true,3",
36                     init : function() {
37                         this.el = new Gtk.Table.c_new(1,2, true);
38                         XObject.prototype.init.call(this);
39                     
40                     },
41                     items : [
42                         {
43                             xtype: Gtk.Label,
44                             pack : "attach,0,1,0,1,0,0,0,0",
45                             label : "baseURL "
46                         },
47                         {
48                             xtype: Gtk.Entry,
49                             pack : "attach,1,2,0,1,5"
50                         },
51                         {
52                             xtype: Gtk.Label,
53                             pack : "attach,0,1,1,2,0,0,1,0",
54                             label : "login:"
55                         },
56                         {
57                             xtype: Gtk.Entry,
58                             pack : "attach,1,2,1,2,5"
59                         },
60                         {
61                             xtype: Gtk.Label,
62                             pack : "attach,0,1,2,3,0,0,1,0",
63                             label : "password"
64                         },
65                         {
66                             xtype: Gtk.Entry,
67                             pack : "attach,1,2,2,3,5",
68                             visibility : false
69                         }
70                     ]
71                 }
72             ]
73         }
74     ]
75 });
76 RooProjectProperties.init();
77 XObject.cache['/RooProjectProperties'] = RooProjectProperties;