5dccb468a4c962de486b9c06e1540d1ada1d4c67
[app.Builder.js] / oldbuilder / StandardErrorDialog.js
1 //<Script type="text/javascript">
2
3 Gtk = imports.gi.Gtk;
4 GObject = imports.gi.GObject;
5 Gio = imports.gi.Gio;
6 GLib = imports.gi.GLib;
7
8 XObject = imports.XObject.XObject;
9 console = imports.console;
10
11
12
13 /**
14  * add a component
15  * 
16  * basically uses a standard template ? pulled from the web?
17  * 
18  * you have to pick which template, and give it a name..
19  * 
20  * and pick which directory to put it in?
21  * 
22  */
23
24
25 StandardErrorDialog = new XObject({
26     
27     
28     
29     xtype : function () {
30         return new Gtk.MessageDialog({ buttons : Gtk.ButtonsType.OK });
31             
32     },
33     modal : true,
34     
35     'message-type' : Gtk.MessageType.ERROR,
36     //"secondary-text"           gchar*                : Read / Write
37     //"secondary-use-markup"     gboolean              : Read / Write
38     text   : "FIXME",
39     "use-markup"     : true,
40     
41     show : function(msg)
42     {
43         if (!this.el) {
44             this.init();
45         }
46         this.el.text =  msg;
47         this.el.show_all();
48     },
49     
50     listeners :  {
51         'delete-event' : function (widget, event) {
52             this.el.hide();
53             return true;
54         },
55         
56         response : function () {
57             this.el.hide();
58         }
59     }
60 });