1 static DialogConfirm _DialogConfirm;
3 public class DialogConfirm : Object
5 public Gtk.MessageDialog el;
6 private DialogConfirm _this;
8 public static DialogConfirm singleton()
10 if (_DialogConfirm == null) {
11 _DialogConfirm= new DialogConfirm();
13 return _DialogConfirm;
19 public DialogConfirm()
22 this.el = new Gtk.MessageDialog( null, Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, "Tests", null );
27 this.el.title = "Please Confirm d";
28 this.el.name = "DialogConfirm";
30 this.el.use_markup = true;
33 this.el.delete_event.connect( (event) => {
34 this.el.response(Gtk.ResponseType.CANCEL);
41 // user defined functions
42 public int show (string title, string msg) {
43 //if (!this.el) { this.init(); }
44 //this.success = success;
45 this.el.title = title;
48 var ret = this.el.run();
49 //print("ret got %d", ret);