Test.GtkWriter.vala.c
[app.Builder.js] / Builder4 / 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 console = imports.console;
11 XObject = imports.XObject.XObject;
12 StandardErrorDialog=new XObject({
13     xtype: Gtk.MessageDialog,
14     listeners : {
15         delete_event : (self, event)  => {
16             this.el.hide();
17             return true;
18         },
19         response : (self, response_id) => {
20            this.el.hide();
21         }
22     },
23     text : "fixme",
24     buttons : Gtk.ButtonsType.OK,
25     message_type : Gtk.MessageType.ERROR,
26     modal : true,
27     use_markup : true,
28     'void:show' : (string msg) {
29     
30         this.el.text =  msg;
31         this.el.show_all();
32     },
33     'void:show_all' : () {
34         this.show("TEST");
35     }
36 });
37 StandardErrorDialog.init();
38 XObject.cache['/StandardErrorDialog'] = StandardErrorDialog;