src/Builder4/DialogPluginWebkit.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 22 Apr 2015 07:26:31 +0000 (15:26 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 22 Apr 2015 07:26:31 +0000 (15:26 +0800)
src/Builder4/DialogPluginWebkit.vala

src/Builder4/DialogPluginWebkit.bjs
src/Builder4/DialogPluginWebkit.vala

index 51fdeb8..3845a46 100644 (file)
@@ -13,7 +13,7 @@
    "string tmpjs" : "",
    "utf8 title" : "Add / Edit Component",
    "id" : "DialogPluginWebkit",
-   "| boolean has_plugin" : "() {\n\n}\n",
+   "| boolean has_plugin" : "(string cls) {\n\n     return GLib.FileUtils.test(\n            BuilderApplication.configDirectory() + \"/resources/Editors/Editor.\" + cls + \".js\",\n            GLib.FileTest.IS_REGULAR\n      );\n    \n\n\n}\n",
    "gint default_height" : 500,
    "gboolean deletable" : true,
    "xtype" : "Dialog",
index 5870f30..54e963a 100644 (file)
@@ -53,7 +53,14 @@ public class Xcls_DialogPluginWebkit : Object
     }
 
     // user defined functions 
-    public boolean has_plugin () {
+    public boolean has_plugin (string cls) {
+    
+         return GLib.FileUtils.test(
+                BuilderApplication.configDirectory() + "/resources/Editors/Editor." + cls + ".js",
+                GLib.FileTest.IS_REGULAR
+          );
+        
+    
     
     }
     public string show (Gtk.Window ?parent, string text) {// JsRender.Node node) {