Test.GtkWriter.vala.c
[app.Builder.js] / Builder4 / DialogConfirm.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 DialogConfirm=new XObject({
13     xtype: Gtk.MessageDialog,
14     'void:show_all' : () {
15         this.show("test");
16     },
17     listeners : {
18         delete_event : (event) => {
19             this.el.hide();
20             return true;
21         }
22     },
23     text : "Tests",
24     title : "Please Confirm d",
25     buttons : Gtk.ButtonsType.YES_NO,
26     message_type : Gtk.MessageType.QUESTION,
27     modal : true,
28     'void:show' : (string msg) {
29          //if (!this.el) { this.init(); } 
30          //this.success = success;
31         this.el.text =  msg;
32         this.el.show_all();
33     
34     },
35     use_markup : true
36 });
37 DialogConfirm.init();
38 XObject.cache['/DialogConfirm'] = DialogConfirm;