/[freeride]/freeride/plugins/rubyide_tools_fox_debugger/fox_debugger.rb
ViewVC logotype

Diff of /freeride/plugins/rubyide_tools_fox_debugger/fox_debugger.rb

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

revision 1.13 by ljulliar, Fri May 2 21:17:18 2003 UTC revision 1.14 by ljulliar, Sat May 10 19:16:42 2003 UTC
# Line 13  Line 13 
13  #  #
14  # Copyright (c) 2002 Laurent Julliard. All rights reserved.  # Copyright (c) 2002 Laurent Julliard. All rights reserved.
15  #  #
16    
17  require 'fox'  require 'fox'
18  require 'fox/colors'  require 'fox/colors'
19    
# Line 95  module FreeRIDE Line 96  module FreeRIDE
96        #        #
97        class Renderer < FXHorizontalFrame        class Renderer < FXHorizontalFrame
98          include Fox          include Fox
99          attr_reader :plugin          attr_reader :plugin
100                  
101          def initialize(plugin,slot)          def initialize(plugin,slot)
102            @docked = false            @docked = false
103            @plugin = plugin            @plugin = plugin
# Line 450  module FreeRIDE Line 451  module FreeRIDE
451            i=0            i=0
452            @table_gvar.setTableSize(gv_ary.size,2)            @table_gvar.setTableSize(gv_ary.size,2)
453            gv_ary.keys.sort.each { |v|            gv_ary.keys.sort.each { |v|
454              @table_gvar.setItemText( i, 0, "#{v}")              if (name = gv_alias(v))
455                  @table_gvar.setItemText( i, 0, "#{v} (#{name})")
456                else
457                  @table_gvar.setItemText( i, 0, "#{v}")
458                end
459              @table_gvar.setItemText( i, 1, "#{gv_ary[v]}")              @table_gvar.setItemText( i, 1, "#{gv_ary[v]}")
460                @table_gvar.getItem( i, 0).justify = 0x00004000 #left
461              @table_gvar.getItem( i, 1).justify = 0x00004000 #left              @table_gvar.getItem( i, 1).justify = 0x00004000 #left
462              i += 1              i += 1
463            }            }
# Line 903  module FreeRIDE Line 909  module FreeRIDE
909              sender.handle(self, MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)              sender.handle(self, MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
910            end            end
911          end          end
912    
913            private
914    
915            @@gv_aliases = nil
916    
917            def gv_alias(gvar)
918              if @@gv_aliases.nil?
919                # Create an hash key of aliases for $... English names
920                english_file = nil
921                $:.each do |d|
922                  english_file = File.join(d,"English.rb")
923                  break if File.exist?(english_file)
924                end
925            
926                if english_file
927                  @@gv_aliases = Hash.new
928                  IO.foreach(english_file) do |line|
929                    @@gv_aliases[$2] = $1 if (line =~ /^\s*alias\s+(\$[^\s]*)\s+(\$[^\s]*)/ )
930                  end
931                end
932              end
933              @@gv_aliases[gvar]
934            end
935    
936        
937        end  # class Renderer        end  # class Renderer
938        

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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