/[freeride]/freeride/plugins/rubyide_tools_fox_script_runner/script_runner.rb
ViewVC logotype

Diff of /freeride/plugins/rubyide_tools_fox_script_runner/script_runner.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by ljulliar, Tue Apr 15 21:14:34 2003 UTC revision 1.4 by ljulliar, Thu May 1 12:34:39 2003 UTC
# Line 23  module FreeRIDE Line 23  module FreeRIDE
23        plugin['/system/ui/icons/ScriptRunner'].subscribe do |event, slot|        plugin['/system/ui/icons/ScriptRunner'].subscribe do |event, slot|
24          if event == :notify_slot_add          if event == :notify_slot_add
25            app = plugin['/system/ui/fox/FXApp'].data            app = plugin['/system/ui/fox/FXApp'].data
26            path = "#{plugin.plugin_configuration.base_path}/icons/#{slot.name}.png"            path = "#{plugin.plugin_configuration.full_base_path}/icons/#{slot.name}.png"
27            if FileTest.exist?(path)            if FileTest.exist?(path)
28              slot.data = Fox::FXPNGIcon.new(app, File.open(path, "rb").read)              slot.data = Fox::FXPNGIcon.new(app, File.open(path, "rb").read)
29              slot.data.create              slot.data.create
# Line 38  module FreeRIDE Line 38  module FreeRIDE
38          #editpane.save if editpane.modified?          #editpane.save if editpane.modified?
39          unless editpane.modified?          unless editpane.modified?
40            file = plugin["/system/ui/current/EditPane"].data            file = plugin["/system/ui/current/EditPane"].data
41            result = `ruby "#{file}" 2>&1`            exec_dir = File.dirname(file)
42              result = `ruby -C "#{exec_dir}" "#{file}" 2>&1`
43            plugin["/system/ui/current/OutputPane"].manager.append("Run", "<CMD>>ruby #{file}\n")            plugin["/system/ui/current/OutputPane"].manager.append("Run", "<CMD>>ruby #{file}\n")
44            plugin["/system/ui/current/OutputPane"].manager.append("Run", result)            plugin["/system/ui/current/OutputPane"].manager.append("Run", result)
45            plugin["/system/ui/current/OutputPane"].manager.append("Run", "<CMD>>exit\n")            plugin["/system/ui/current/OutputPane"].manager.append("Run", "<CMD>>exit\n")

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26