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