Builder4/WindowRooView.bjs.H6SZLX
authorAlan Knowles <alan@roojs.com>
Tue, 16 Sep 2014 10:46:22 +0000 (18:46 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 16 Sep 2014 10:46:22 +0000 (18:46 +0800)
Builder4/WindowRooView.bjs
Builder4/WindowRooView.js.AWUZLX
Builder4/WindowRooView.js
Builder4/WindowRooView.vala.GN0ZLX
Builder4/WindowRooView.vala

Builder4/WindowRooView.bjs
Builder4/WindowRooView.js
Builder4/WindowRooView.vala

index 4dd44df..c9db45e 100644 (file)
@@ -81,7 +81,7 @@
                         {
                             "listeners" : {
                                 "script_dialog" : " (dialog) => {\n     var msg = dialog.get_message();\n     if (msg.length < 4) {\n        return false;\n     }\n     if (msg.substring(0,4) != \"IPC:\") {\n         return false;\n     }\n     var ar = msg.split(\":\", 3);\n    if (ar.length < 3) {\n        return false;\n    }\n    switch(ar[1]) {\n        case \"SAVEHTML\":\n            _this.file.saveHTML(ar[2]);\n            return true;\n        default:\n            return false;\n    }\n    \n}",
-                                "show" : "  ( ) => {\n    this.inspector = this.el.get_inspector();\n    this.inspector.ref();\n    this.inspector.open_window.connect(() => {\n         this.inspector = this.el.get_inspector();\n        print(\"inspector attach\\n\");\n        var wv = this.inspector.get_web_view();\n        if (wv != null) {\n            print(\"got inspector web view\\n\");\n            _this.inspectorcontainer.el.add(wv);\n            wv.show();\n        } else {\n            print(\"no web view yet\\n\");\n        }\n        return true;\n       \n    });\n   this.inspector.closed.connect(() => {\n        \n        this.inspector.show();\n       \n    }); \n    this.inspector.show();\n}",
+                                "show" : "  ( ) => {\n    this.inspector = this.el.get_inspector();\n    this.inspector.ref();\n    this.inspector.open_window.connect(() => {\n         this.inspector = this.el.get_inspector();\n        print(\"inspector attach\\n\");\n        var wv = this.inspector.get_web_view();\n        if (wv != null) {\n            print(\"got inspector web view\\n\");\n            _this.inspectorcontainer.el.add(wv);\n            wv.show();\n        } else {\n            print(\"no web view yet\\n\");\n        }\n        return true;\n       \n    });\n   this.inspector.closed.connect(() => {\n        \n        this.inspector.show();\n       \n    }); \n    \n    this.inspector.attach.connect(() => {\n         this.inspector = this.el.get_inspector();\n        print(\"inspector attach\\n\");\n        var wv = this.inspector.get_web_view();\n        if (wv != null) {\n            print(\"got inspector web view\\n\");\n            _this.inspectorcontainer.el.add(wv);\n            wv.show();\n        } else {\n            print(\"no web view yet\\n\");\n        }\n        return true;\n       \n    });    \n    \n    this.inspector.show();\n}",
                                 "drag_drop" : "  ( ctx, x, y,time, ud) => {\n    return false;\n    /*\n\tprint(\"TARGET: drag-drop\");\n        var is_valid_drop_site = true;\n        \n         \n        Gtk.drag_get_data\n        (\n                w,         // will receive 'drag-data-received' signal \n                ctx,        /* represents the current state of the DnD \n                this.get('/Window').atoms[\"STRING\"],    /* the target type we want \n                time            /* time stamp \n        );\n                        \n                        \n                        /* No target offered by source => error \n                       \n\n\treturn  is_valid_drop_site;\n\t*/\n}"
                             },
                             "# string renderedData" : "\"\"",
index f8db30a..a254603 100644 (file)
@@ -358,6 +358,22 @@ WindowRooView=new XObject({
                                   this.inspector.show();
                                  
                               }); 
+                              
+                              this.inspector.attach.connect(() => {
+                                   this.inspector = this.el.get_inspector();
+                                  print("inspector attach\n");
+                                  var wv = this.inspector.get_web_view();
+                                  if (wv != null) {
+                                      print("got inspector web view\n");
+                                      _this.inspectorcontainer.el.add(wv);
+                                      wv.show();
+                                  } else {
+                                      print("no web view yet\n");
+                                  }
+                                  return true;
+                                 
+                              });    
+                              
                               this.inspector.show();
                           },
                        drag_drop : ( ctx, x, y,time, ud) => {
index d4ad368..502579d 100644 (file)
@@ -438,6 +438,22 @@ public class Xcls_WindowRooView : Object
                     this.inspector.show();
                    
                 }); 
+                
+                this.inspector.attach.connect(() => {
+                     this.inspector = this.el.get_inspector();
+                    print("inspector attach\n");
+                    var wv = this.inspector.get_web_view();
+                    if (wv != null) {
+                        print("got inspector web view\n");
+                        _this.inspectorcontainer.el.add(wv);
+                        wv.show();
+                    } else {
+                        print("no web view yet\n");
+                    }
+                    return true;
+                   
+                });    
+                
                 this.inspector.show();
             });
             this.el.drag_drop.connect( ( ctx, x, y,time, ud) => {