# HG changeset patch # User wycc # Date 1238922028 -28800 # Node ID 7cbb364fd2731da2dde534a699854316dff0e305 # Parent 5b6230df7630e6e647ff7bd7a68725a6cf2be44e Show the old name in the input line Select the first object automatically. diff -r 5b6230df7630 -r 7cbb364fd273 inkscape/firefox/content/inkscape.js --- a/inkscape/firefox/content/inkscape.js Sun Apr 05 12:29:35 2009 +0800 +++ b/inkscape/firefox/content/inkscape.js Sun Apr 05 17:00:28 2009 +0800 @@ -279,7 +279,11 @@ Inkscape.prototype.refreshSymbolPanel=function(node) { + var reg = new RegExp('(.*)\\((.*)\\)'); + var m = reg.exec(node.textContent); + var val = m[2]; inkscape.current_symbol = node.textContent; + $('#newsymbolname').val(val); } Inkscape.prototype.loadSymbolScreen=function (mbsvg) { @@ -287,11 +291,18 @@ var i,l; symboldialog.dialog('open'); + this.mbsvg = mbsvg; l = mbsvg.selected_objects.length; var jsonobj = [] for(i=0;i"); - symboldialog.append("
"); + symboldialog.append("
"); }); function MBSVG(file) @@ -446,6 +457,13 @@ } +MBSVG.prototype.findSymbolName=function(id) +{ + var obj = this.doc.getElementById(id); + var name = obj.getAttribute('mbname'); + return name; + +} /** * UI for madbuilder.html to build the scene editor