src/Builder4/WindowRooView.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 15 Apr 2015 08:03:18 +0000 (16:03 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 15 Apr 2015 08:03:18 +0000 (16:03 +0800)
src/Builder4/WindowRooView.vala

src/Builder4/WindowRooView.bjs
src/Builder4/WindowRooView.vala

index 5b41ef7..b8f2413 100644 (file)
@@ -73,6 +73,7 @@
         {
          "listeners" : {
           "script_dialog" : " (dialog) => {\n    if (this.el == null) {\n        return true;\n    }\n    \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}",
+          "decide_policy" : "",
           "show" : "  ( ) => {\n    this.initInspector();;\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}",
           "load_changed" : "(le) => {\n    if (le != WebKit.LoadEvent.FINISHED) {\n        return;\n    }\n    if (this.runjs.length < 1) {\n        return;\n    }\n  //  this.el.run_javascript(this.runjs, null);\n     FakeServerCache.remove(    this.runjs);\n    this.runjs = \"\";\n}"
index bfdb343..e28dcf1 100644 (file)
@@ -409,6 +409,7 @@ public class Xcls_WindowRooView : Object
                 }
                 
             });
+            this.el.decide_policy.connect( );
             this.el.show.connect( ( ) => {
                 this.initInspector();;
             });