# HG changeset patch # User wycc # Date 1236731411 -28800 # Node ID b4bd4819091c34145fd56f2df93e24bf85b2c307 # Parent 50d33c3987ba81c4aeaed89579773b3e82db7b8d Load mbsvg file when it is double clicked diff -r 50d33c3987ba -r b4bd4819091c inkscape/firefox/content/inkscape.js --- a/inkscape/firefox/content/inkscape.js Wed Mar 11 07:52:30 2009 +0800 +++ b/inkscape/firefox/content/inkscape.js Wed Mar 11 08:30:11 2009 +0800 @@ -437,6 +437,12 @@ } +function project_loadScene(node) +{ + var file = node.textContent; + inkscape = new Inkscape("file://"+file); +} + function project_parse(xml) { @@ -495,6 +501,9 @@ } ], }, + callback : { + ondblclk : function(NODE,TREE_OBJ) { project_loadScene(NODE); TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE); TREE_OBJ.select_branch.call(TREE_OBJ, NODE);} + }, ui : { context : [ {