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, "Test" );
27 this.el.title = "Please Confirm ";
28 this.el.name = "DialogConfirm";
30 this.el.use_markup = true;
33 this.el.close_request.connect( (event) => {
34 this.el.response(Gtk.ResponseType.CANCEL);
40 // user defined functions
41 public void showIt // caller needs to connect to the response - to get the result.
43 (string title, string msg) {
44 //if (!this.el) { this.init(); }
45 //this.success = success;
46 this.el.title = title;