- public class Xcls_scrolled_window : Object
- {
- public Gtk.ScrolledWindow el;
- private NewBranch _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_scrolled_window(NewBranch _owner )
- {
- _this = _owner;
- _this.scrolled_window = this;
- this.el = new Gtk.ScrolledWindow( null, null );
-
- // my vars (dec)
-
- // set gobject values
- this.el.height_request = 500;
- this.el.vexpand = true;
- var child_0 = new Xcls_view( _this );
- child_0.ref();
- this.el.add ( child_0.el );
-
- // init method
-
- {
- this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
- }
- }
-
- // user defined functions
- }
- public class Xcls_view : Object
- {
- public WebKit.WebView el;
- private NewBranch _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_view(NewBranch _owner )
- {
- _this = _owner;
- _this.view = this;
- this.el = new WebKit.WebView();
-
- // my vars (dec)
-
- // set gobject values
- }
-
- // user defined functions
- public void loadTicket (string tid) {
- int h,w;
- _this.el.get_size(out w, out h);
-
- if (tid == "") {
- _this.scrolled_window.el.hide();
- _this.el.resize(w, 150);
- } else {
- _this.scrolled_window.el.show();
- _this.el.resize(w, 800);
- }
-
- var rs = RooTicket.singleton();
- var uri = new WebKit.URIRequest("https://roojs.com/admin.php/MTrack/View/" + tid);
- var hd = uri.get_http_headers();
- var authCode = Base64.encode ("%s:%s".printf(rs.username, rs.password).data);
- hd.append("Authorization", "Basic %s".printf(authCode));
-
- this.el.load_request(uri);
- }
- }