fix #7440 - GTK4 version is now master
[roobuilder] / src / Builder4 / StandardErrorDialog.vala
1 static Xcls_StandardErrorDialog  _StandardErrorDialog;
2
3 public class Xcls_StandardErrorDialog : Object
4 {
5     public Gtk.MessageDialog el;
6     private Xcls_StandardErrorDialog  _this;
7
8     public static Xcls_StandardErrorDialog singleton()
9     {
10         if (_StandardErrorDialog == null) {
11             _StandardErrorDialog= new Xcls_StandardErrorDialog();
12         }
13         return _StandardErrorDialog;
14     }
15
16         // my vars (def)
17
18     // ctor
19     public Xcls_StandardErrorDialog()
20     {
21         _this = this;
22         this.el = new Gtk.MessageDialog( null, Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, "fixme" );
23
24         // my vars (dec)
25
26         // set gobject values
27         this.el.modal = true;
28         this.el.use_markup = true;
29
30         //listeners
31         this.el.response.connect( (self, response_id) => {
32            this.el.hide();
33         });
34     }
35
36     // user defined functions
37     public void show (Gtk.Window win, string msg) {
38     
39         this.el.set_transient_for(win);
40         this.el.modal = true;
41         this.el.text =  msg;
42         this.el.show();
43     }
44 }