### Tidy Up Tool - now inoperable...
#
=begin
module Tools2D
class Tool2Dtidyup

def db(string)
  dir=File.dirname(__FILE__) ### adjust folder to suit tool
  toolname="2Dtools"  ### adjust xxx to suit tool...
  locale=Sketchup.get_locale.upcase
  path=File.join(dir, toolname+locale+".lingvo")
  unless File.exist?(path)
     return string
  else
    deBabelizer(string,path)
  end 
end#def

def activate
return nil ### DISABLED
	myfolder=File.dirname(__FILE__)

	deleted=[]

#=begin	
	files=["2DarcTool.rb","2DcircleTool.rb","2DfacemakerTool.rb","2DhatchingTool.rb","2DlineTool.rb","2DpolylinecurveTool.rb","2DpolylineTool.rb","2DrectangleTool.rb"]

	files.each{|file|
	  if FileTest.exist?(File.join(myfolder, file))
		#File.delete(File.join(myfolder, file))
		deleted << "\n"+file
	  end#if
	}
#=end
	if FileTest.exist?(File.join(myfolder, "2DtoolsIcons"))
	  Dir.foreach(File.join(myfolder, "2DtoolsIcons")){|f|
		if f=='.' or f=='..'
		  ### skip
		elsif File.directory?(myfolder, "2DtoolsIcons", f)
		  Dir.foreach(File.join(myfolder, "2DtoolsIcons", f)){|ff|
			if ff=='.' or ff=='..'
			  ### skip
			else ###==file 
			  File.delete(myfolder, "2DtoolsIcons", f, ff)
			end#if
		  }
		  Dir.delete(myfolder, "2DtoolsIcons", f)
		else ###==file
		  File.delete(myfolder, "2DtoolsIcons", f)
		end#if
	  }
	  Dir.delete(myfolder, "2DtoolsIcons")
	  deleted << "\n\n"+(db"Folder:")+"\n"+myfolder+"/2DtoolsIcons/...\n\n"
	end#if

	if deleted[0]
	  UI.messagebox((db"2D Tools:")+"\n\n"+(db"The following superseded files will be removed:")+"\n"+deleted.join("\n")+"\n\n"+(db"Note: You might get a 'load error' message after you close this dialog, but it won't recur.")+"\n")
	end#if

end#def activate

end#class

end#mod
### DISABLED
#Sketchup.active_model.select_tool(Tool2Dtidyup.new())
###############
=end
