From 1110e2fa3c32cefa7c82719aa9d36f9268efa04f Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 3 Jun 2015 11:47:27 +0800 Subject: [PATCH] src/Builder4/WindowRooView.bjs src/Builder4/WindowRooView.vala --- src/Builder4/WindowRooView.bjs | 2 +- src/Builder4/WindowRooView.vala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Builder4/WindowRooView.bjs b/src/Builder4/WindowRooView.bjs index 462679c1a..808aa1f6c 100644 --- a/src/Builder4/WindowRooView.bjs +++ b/src/Builder4/WindowRooView.bjs @@ -121,7 +121,7 @@ "id" : "view", "# bool refreshRequired" : false, "* init" : " {\n // this may not work!?\n var settings = this.el.get_settings();\n settings.enable_developer_extras = true;\n \n \n var fs= new FakeServer(this.el);\n fs.ref();\n // this was an attempt to change the url perms.. did not work..\n // settings.enable_file_access_from_file_uris = true;\n // settings.enable_offline_web_application_cache - true;\n // settings.enable_universal_access_from_file_uris = true;\n \n \n \n \n \n\n // FIXME - base url of script..\n // we need it so some of the database features work.\n this.el.load_html( \"Render not ready\" , \n //fixme - should be a config option!\n // or should we catch stuff and fix it up..\n \"http://localhost/app.Builder/\"\n );\n \n \n //this.el.open('file:///' + __script_path__ + '/../builder.html');\n /*\n Gtk.drag_dest_set\n (\n this.el, //\n Gtk.DestDefaults.MOTION | Gtk.DestDefaults.HIGHLIGHT,\n null, // list of targets\n Gdk.DragAction.COPY // what to do with data after dropped \n );\n \n // print(\"RB: TARGETS : \" + LeftTree.atoms[\"STRING\"]);\n Gtk.drag_dest_set_target_list(this.el, this.get('/Window').targetList);\n */\n GLib.Timeout.add_seconds(1, () =>{\n //print(\"run refresh?\");\n if (this.el == null) {\n return false;\n }\n this.runRefresh(); \n return true;\n });\n \n \n}\n", - "| void reInit" : "() {\n print(\"reInit?\");\n // if this happens destroy the webkit..\n // recreate it..\n this.el.stop_loading();\n \n if (_this.viewbox.el.get_parent() == null) {\n return;\n }\n \n \n _this.viewbox.el.remove(_this.viewcontainer.el);\n _this.el.remove(_this.inspectorcontainer.el); \n \n // destory seems to cause problems.\n //this.el.destroy();\n //_this.viewcontainer.el.destroy();\n //_this.inspectorcontainer.el.destroy();\n var inv =new Xcls_inspectorcontainer(_this);\n inv.ref();\n _this.el.pack2(inv.el,true,true);\n \n \n this.el = null; \n var nv =new Xcls_viewcontainer(_this);\n nv.ref();\n _this.viewbox.el.pack_end(nv.el,true,true,0);\n \n \n inv.el.show_all();\n nv.el.show_all();\n //while(Gtk.events_pending ()) Gtk.main_iteration ();\n //_this.view.renderJS(true); \n _this.view.refreshRequired = true;\n}\n", + "| void reInit" : "() {\n print(\"reInit?\");\n // if this happens destroy the webkit..\n // recreate it..\n this.el.stop_loading();\n \n if (_this.viewbox.el.get_parent() == null) {\n return;\n }\n \n \n _this.viewbox.el.remove(_this.viewcontainer.el);\n _this.paned.el.remove(_this.inspectorcontainer.el); \n \n // destory seems to cause problems.\n //this.el.destroy();\n //_this.viewcontainer.el.destroy();\n //_this.inspectorcontainer.el.destroy();\n var inv =new Xcls_inspectorcontainer(_this);\n inv.ref();\n _this.paned.el.pack2(inv.el,true,true);\n \n \n this.el = null; \n var nv =new Xcls_viewcontainer(_this);\n nv.ref();\n _this.viewbox.el.pack_end(nv.el,true,true,0);\n \n \n inv.el.show_all();\n nv.el.show_all();\n //while(Gtk.events_pending ()) Gtk.main_iteration ();\n //_this.view.renderJS(true); \n _this.view.refreshRequired = true;\n}\n", "* pack" : "add", "redraws" : 0, "xtype" : "WebView", diff --git a/src/Builder4/WindowRooView.vala b/src/Builder4/WindowRooView.vala index 585af3739..ee1546880 100644 --- a/src/Builder4/WindowRooView.vala +++ b/src/Builder4/WindowRooView.vala @@ -605,7 +605,7 @@ public class Xcls_WindowRooView : Object _this.viewbox.el.remove(_this.viewcontainer.el); - _this.el.remove(_this.inspectorcontainer.el); + _this.paned.el.remove(_this.inspectorcontainer.el); // destory seems to cause problems. //this.el.destroy(); @@ -613,7 +613,7 @@ public class Xcls_WindowRooView : Object //_this.inspectorcontainer.el.destroy(); var inv =new Xcls_inspectorcontainer(_this); inv.ref(); - _this.el.pack2(inv.el,true,true); + _this.paned.el.pack2(inv.el,true,true); this.el = null; -- 2.39.2