dbgenerate.js
[app.Builder.js] / Sample / StandardErrorDialog.js
1 Gtk = imports.gi.Gtk;
2 Gdk = imports.gi.Gdk;
3 Pango = imports.gi.Pango;
4 GLib = imports.gi.GLib;
5 Gio = imports.gi.Gio;
6 GObject = imports.gi.GObject;
7 GtkSource = imports.gi.GtkSource;
8 WebKit = imports.gi.WebKit;
9 Vte = imports.gi.Vte;
10 GtkClutter = imports.gi.GtkClutter;
11 Gdl = imports.gi.Gdl;
12 console = imports.console;
13 XObject = imports.XObject.XObject;
14 StandardErrorDialog=new XObject({
15     xtype: Gtk.MessageDialog,
16     buttons : Gtk.ButtonsType.OK,
17     modal : true,
18     message_type : Gtk.MessageType.ERROR,
19     text : "fixme",
20     use_markup : true,
21     show : function(msg) {
22          if (!this.el) {
23                 this.init();
24             }
25             this.el.text =  msg;
26             this.el.show_all();
27     },
28     listeners : {
29         delete_event : function (self, event) {
30             this.el.hide();
31             return true;
32         },
33         response : function (self, response_id) {
34            this.el.hide();
35         }
36     }
37 });
38 StandardErrorDialog.init();
39 XObject.cache['/StandardErrorDialog'] = StandardErrorDialog;