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