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