init.rb in rwdschedule-0.9 vs init.rb in rwdschedule-0.91

- old
+ new

@@ -71,11 +71,11 @@ # END of configuration reading Dir.chdir($progdir) # change back to top program directory # build the English Language hash file from the parts - startlangdir = @@langdir +"/" + "en" + startlangdir = File.join(LangDir,"en") #get a list of the files and subdirectories on the starting directory only alanghash = Array.new(Dir[startlangdir].entries.sort) #loop through the list, ignore the files and add all new directories found alanghash.each do |x| #if a directory... @@ -106,11 +106,11 @@ # END of Lang building $tempdoc = " " Dir.chdir($progdir) # change back to top program directory # build the local Language hash file from the parts - startlangdir = @@langdir +"/" + $lang + startlangdir = File.join(LangDir,$lang) #get a list of the files and subdirectories on the starting directory only alanghash = Array.new(Dir[startlangdir].entries.sort) #loop through the list, ignore the files and add all new directories found alanghash.each do |x| #if a directory... @@ -143,15 +143,15 @@ Dir.chdir($progdir) # change back to top program directory # build the language hash constant object from the lang parts #get a list of the files in lang directory only - alangfile = Dir.new(@@langdir).entries.sort.reverse.delete_if { |x| ! (x =~ /rb$/) } + alangfile = Dir.new(LangDir).entries.sort.reverse.delete_if { |x| ! (x =~ /rb$/) } alangfile.length.times{ fileName = alangfile.pop Dir.chdir($progdir) - Dir.chdir(@@langdir) + Dir.chdir(LangDir) fileLangA=File.open("#{fileName}","r") #opens the file thats in fileName as read only $tempdoc += fileLangA.read #reads the file into the doc string fileLangA.close } @@ -163,11 +163,11 @@ $tempdoc = " " # build the actual program from the code parts #get a list of the files and subdirectories on the starting directory only - a = Array.new(Dir[@@codedir].entries.sort) + a = Array.new(Dir[CodeDir].entries.sort) #loop through the list, ignore the files and add all new directories found a.each do |x| #if a directory... if(test(?d,x)) # add to the original list of directories @@ -196,10 +196,10 @@ require CodeName # load the program file # build the actual GUI from the gui parts $tempdoc = " " #get a list of the files and subdirectories on the starting directory only - a = Array.new(Dir[@@guidir].entries.sort) + a = Array.new(Dir[GuiDir].entries.sort) #loop through the list, ignore the files and add all new directories found a.each do |x| #if a directory... if(test(?d,x)) #use this new dir find to add to the original list of directories