X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2FBuilder4%2FDialogConfirm.vala;h=7a9bdb956353e06e42e88c6a1b40e52a8bcb2ff3;hb=6acc1bf9b9a671ed7ac6e5f70fb1762a3a4cdc4c;hp=dfb48adfde5f27d4f0afa395dd964b4ca178cce4;hpb=356b06c19b0fb2994b222ce36428a45ac2921b90;p=roobuilder diff --git a/src/Builder4/DialogConfirm.vala b/src/Builder4/DialogConfirm.vala index dfb48adfd..7a9bdb956 100644 --- a/src/Builder4/DialogConfirm.vala +++ b/src/Builder4/DialogConfirm.vala @@ -1,53 +1,52 @@ - static DialogConfirm _DialogConfirm; - - public class DialogConfirm : Object - { - public Gtk.MessageDialog el; - private DialogConfirm _this; - - public static DialogConfirm singleton() - { - if (_DialogConfirm == null) { - _DialogConfirm= new DialogConfirm(); - } - return _DialogConfirm; - } - - // my vars (def) - - // ctor - public DialogConfirm() - { - _this = this; - this.el = new Gtk.MessageDialog( null, Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, "Test" ); - - // my vars (dec) - - // set gobject values - this.el.title = "Please Confirm "; - this.el.name = "DialogConfirm"; - this.el.modal = true; - this.el.use_markup = true; - - //listeners - this.el.close_request.connect( (event) => { - this.el.response(Gtk.ResponseType.CANCEL); - this.el.hide(); - return true; - - }); - } - - // user defined functions - public void showIt // caller needs to connect to the response - to get the result. - - (string title, string msg) { - //if (!this.el) { this.init(); } - //this.success = success; - this.el.title = title; - this.el.text = msg; - this.el.show(); - - - } - } +static DialogConfirm _DialogConfirm; + +public class DialogConfirm : Object +{ + public Gtk.MessageDialog el; + private DialogConfirm _this; + + public static DialogConfirm singleton() + { + if (_DialogConfirm == null) { + _DialogConfirm= new DialogConfirm(); + } + return _DialogConfirm; + } + + // my vars (def) + + // ctor + public DialogConfirm() + { + _this = this; + this.el = new Gtk.MessageDialog( null, Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, "Test" ); + + // my vars (dec) + + // set gobject values + this.el.title = "Please Confirm "; + this.el.name = "DialogConfirm"; + this.el.modal = true; + this.el.use_markup = true; + + //listeners + this.el.close_request.connect( (event) => { + this.el.response(Gtk.ResponseType.CANCEL); + this.el.hide(); + return true; + }); + } + + // user defined functions + public void showIt // caller needs to connect to the response - to get the result. + + (string title, string msg) { + //if (!this.el) { this.init(); } + //this.success = success; + this.el.title = title; + this.el.text = msg; + this.el.show(); + + + } +}