src/Builder4/About.bjs
[app.Builder.js] / src / Builder4 / About.vala
1 /*0*/ static About  _About;
2 /*1*/ 
3 /*2*/ public class About : Object 
4 {
5 /*3*/     public Gtk.AboutDialog el;
6 /*4*/     private About  _this;
7 /*5*/ 
8 /*6*/     public static About singleton()
9 /*7*/     {
10 /*8*/         if (_About == null) {
11 /*9*/             _About= new About();
12 /*10*/         }
13 /*11*/         return _About;
14 /*12*/     }
15 /*13*/ 
16 /*14*/         // my vars (def)
17 /*15*/ 
18 /*16*/     // ctor
19 /*17*/     public About()
20 /*18*/     {
21 /*19*/         _this = this;
22 /*20*/         this.el = new Gtk.AboutDialog();
23 /*21*/ 
24 /*22*/         // my vars (dec)
25 /*23*/ 
26 /*24*/         // set gobject values
27 /*25*/         this.el.program_name = "app.Builder.js";
28 /*26*/         this.el.license = "LGPL";
29 /*27*/         this.el.authors = { "Alan Knowles" };
30 /*28*/         this.el.website = "http://www.akbkhome.com/blog.php";
31 /*29*/         this.el.modal = true;
32 /*30*/         this.el.copyright = "LGPL";
33 /*31*/         this.el.license_type = Gtk.License.LGPL_3_0;
34 /*32*/ 
35 /*33*/         //listeners
36         this.el.delete_event.connect( (self, event) => {
37             this.el.hide();
38             return true; 
39         });
40         this.el.response.connect( (rid) => {
41             this.el.hide();
42         });
43 /*43*/     }
44 /*44*/ 
45 /*45*/     // user defined functions
46     public    void show (Gtk.Window parent) {
47         this.el.set_transient_for(parent);
48         this.el.modal = true;
49         this.el.show();
50     }
51 /*52*/ }