tinkerbell 0.01 → 0.03

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. data/code/01rwdcore/02helptexthashbegin.rb +10 -0
  2. data/code/01rwdcore/03helptexthash.rb +18 -20
  3. data/code/01rwdcore/runopentinkerdocument.rb +1 -1
  4. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +62 -132
  5. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +9 -7
  6. data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +6 -6
  7. data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +13 -0
  8. data/code/superant.com.sandbox/tabthree.rb +9 -7
  9. data/code/superant.com.tinkerbell/0uninstallapplet.rb +6 -1
  10. data/code/superant.com.tinkerbell/loadconfigurationrecord.rb +1 -1
  11. data/code/superant.com.tinkerbell/loadconfigurationvariables.rb +1 -1
  12. data/code/superant.com.tinkerbell/saveconfigurationrecord.rb +1 -1
  13. data/configuration/rwdtinker.dist +5 -8
  14. data/configuration/tinkerbellw.dist +10 -0
  15. data/configuration/tinkerwin2variables.dist +13 -7
  16. data/gui/tinkerbackwindows/superant.com.sandbox/33tabthree.rwd +2 -2
  17. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
  18. data/init.rb +59 -163
  19. data/installed/{tinkerbellw-0.01.inf → tinkerbellw.inf} +2 -2
  20. data/lang/en/rwdcore/en.po +166 -0
  21. data/lang/es/rwdcore/es.po +172 -0
  22. data/lang/fr/rwdcore/fr.po +166 -0
  23. data/lang/hi/rwdcore/hi.po +170 -0
  24. data/lang/ja/rwdcore/ja.po +168 -0
  25. data/lang/nl/rwdcore/nl.po +166 -0
  26. data/lib/rconftool.rb +13 -6
  27. data/lib/rwd/net.rb +15 -4
  28. data/lib/rwd/ruby.rb +1 -1
  29. data/lib/rwd/rwd.rb +83 -63
  30. data/lib/rwdthemes/default.rwd +1 -1
  31. data/lib/rwdtinker/rwdcodedir.rb +56 -0
  32. data/lib/rwdtinker/rwdguidir.rb +57 -0
  33. data/lib/rwdtinker/rwdlangdir.rb +60 -0
  34. data/lib/rwdtinker/rwdtinkertools.rb +25 -0
  35. data/rwd_files/HowTo_Tinker.txt +33 -7
  36. data/rwd_files/HowTo_TinkerBell.txt +6 -0
  37. data/rwd_files/Tinkerhelptexthash.txt +81 -0
  38. data/rwd_files/log/rwdtinker.log +2 -0
  39. data/rwdconfig.dist +14 -13
  40. data/tests/{makedist-tinkerbell.rb → makedist-tinkerbellw.rb} +6 -4
  41. data/tests/makedist.rb +2 -2
  42. data/zips/rwdwcalc-0.63.zip +0 -0
  43. data/zips/rwdwfoldeditor-0.05.zip +0 -0
  44. data/zips/rwdwhypernote-0.15.zip +0 -0
  45. data/zips/rwdwmovies-0.98.zip +0 -0
  46. data/zips/rwdwruby-1.08.zip +0 -0
  47. data/zips/tinkerbellw-0.03.zip +0 -0
  48. data/zips/wrubyslippers-1.08.zip +0 -0
  49. metadata +26 -19
  50. data/code/01rwdcore/04helptextend.rb +0 -6
  51. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -61
  52. data/configuration/language.dist +0 -8
  53. data/configuration/rwdapplicationidentity.dist +0 -3
  54. data/configuration/tinkerbellw-0.01.dist +0 -8
  55. data/lang/en/rwdcore/languagefile.rb +0 -58
  56. data/lang/es/rwdcore/languagefile-es.rb +0 -62
  57. data/lang/fr/rwdcore/languagefile.rb +0 -64
  58. data/lang/jp/rwdcore/languagefile.rb +0 -72
  59. data/lang/nl/rwdcore/languagefile.rb +0 -75
  60. data/tinkerbell-0.01.gem +0 -0
  61. data/zips/rwdwaddresses-1.05.zip +0 -0
  62. data/zips/rwdwgutenberg-0.09.zip +0 -0
  63. data/zips/tinkerbellw-0.01.zip +0 -0
  64. data/zips/wrubyslippers-1.06.zip +0 -0
data/lib/rwd/net.rb CHANGED
@@ -562,6 +562,12 @@ class RequestRequest
562
562
  end
563
563
  end
564
564
 
565
+ def url_unescape(string)
566
+ string.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
567
+ [$1.delete('%')].pack('H*')
568
+ end
569
+ end
570
+
565
571
  class Request < Hash
566
572
  attr_reader :peeraddr
567
573
  attr_reader :request
@@ -604,10 +610,14 @@ class Request < Hash
604
610
  @vars = RequestGet.new(@request.data.nil? ? "" : @request.data)
605
611
  when "POST"
606
612
  data = (@io.read(self["content-length"].to_i) or "")
613
+ # data = url_unescape(data)
607
614
  @vars = RequestPost.new((self["content-type"] == "application/x-www-form-urlencoded") ? data : "")
608
615
  else
609
616
  $stderr.puts "Unknown request ('#{firstline}')."
610
- end
617
+ end
618
+
619
+ $rwdtinkerlog.debug data
620
+
611
621
  end
612
622
 
613
623
  @peeraddr = @io.peeraddr
@@ -729,14 +739,15 @@ class HTTPServerException < Exception
729
739
  end
730
740
 
731
741
  class HTTPServer
732
- def self.serve(portio=80, remote=false, auth=nil, realm="ev/net")
742
+ def self.serve(portio=80, remote=false, auth=nil, realm="rwd/net")
733
743
  port, server = portio
734
744
 
735
745
  begin
736
746
  server = TCPServer.new(remote ? "0.0.0.0" : "localhost", port) if server.nil?
737
-
747
+ if $DEBUG
738
748
  $stderr.puts "Just point your browser to http://localhost:#{port}/ ..."
739
- rescue
749
+ end
750
+ rescue
740
751
  server = nil
741
752
 
742
753
  $stderr.puts "Port #{port} is in use."
data/lib/rwd/ruby.rb CHANGED
@@ -275,7 +275,7 @@ class String
275
275
  s.gsub!(/&#34;/ , "\"")
276
276
  s.gsub!(/&#180;/, "\'")
277
277
 
278
- s = CGI.unescapeHTML(self)
278
+ # s = CGI.unescapeHTML(self)
279
279
 
280
280
  if eolconversion
281
281
  s.gsub!(/<br>/, "\n")
data/lib/rwd/rwd.rb CHANGED
@@ -57,7 +57,8 @@ if ENV["RWDTHEME"]
57
57
  load 'lib/rwdthemes/default.rwd'
58
58
  end
59
59
  if ENV["RWDTHEME"] = "DEFAULT"
60
- $stderr.puts "loading theme DEFAULT"
60
+ $rwdtinkerlog.info "rwd: loading theme DEFAULT"
61
+
61
62
  load 'lib/rwdthemes/default.rwd'
62
63
  end
63
64
  if ENV["RWDTHEME"] = "WINDOWSLOOKALIKE"
@@ -267,7 +268,7 @@ class EVTable
267
268
  end
268
269
 
269
270
  class OpenTag
270
- def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
271
+ def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda=false)
271
272
  bef = before[-1]
272
273
  res << Format % ["Before", @subtype] if ($rwd_debug and not bef.nil?)
273
274
  res << bef if not bef.nil?
@@ -299,7 +300,7 @@ class OpenTag
299
300
  args["nohelpbutton"] = (not help)
300
301
 
301
302
  template = $rwd_html_1
302
- template = $rwd_html_PDA_1 if pda
303
+ # template = $rwd_html_PDA_1 if pda
303
304
 
304
305
  res << (template(template, args))
305
306
  when "p" then res << "<p #{align}>"
@@ -493,7 +494,7 @@ class OpenTag
493
494
  after.push(aft)
494
495
  end
495
496
 
496
- def postchildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
497
+ def postchildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda=false)
497
498
  case @subtype
498
499
  when "vertical", "window", "helpwindow", "tab", "panel"
499
500
  res << Format % ["BefPost", @subtype] if $rwd_debug
@@ -635,7 +636,7 @@ class OpenTag
635
636
  end
636
637
 
637
638
  class Text
638
- def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
639
+ def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda=false)
639
640
  if not @text.scan(/[^ \t\r\n]/).empty?
640
641
  res << Format % ["Text", ""] if $rwd_debug
641
642
  res << "#{@text}"
@@ -683,70 +684,70 @@ class RWDWindow
683
684
 
684
685
  vars = vars.deep_dup
685
686
 
686
- begin # error wrap
687
+ begin # error wrap
687
688
 
688
- vars.each do |key, value|
689
- if not key.empty?
690
- if value.respond_to? "to_s"
691
- @rwd.gsub!(/%%#{key}%%/, value.to_s)
692
- @rwd.gsub!(/%#{key}%/, value.to_s.to_html)
689
+ vars.each do |key, value|
690
+ if not key.empty?
691
+ if value.respond_to? "to_s"
692
+ @rwd.gsub!(/%%#{key}%%/, value.to_s)
693
+ @rwd.gsub!(/%#{key}%/, value.to_s.to_html)
693
694
 
694
- @helprwd.gsub!(/%%#{key}%%/, value.to_s)
695
- @helprwd.gsub!(/%#{key}%/, value.to_s.to_html)
695
+ @helprwd.gsub!(/%%#{key}%%/, value.to_s)
696
+ @helprwd.gsub!(/%#{key}%/, value.to_s.to_html)
696
697
 
697
- varshtml[key] = value.to_s.to_html
698
- varsstring[key] = value.to_s
699
- end
700
- end
701
- end
698
+ varshtml[key] = value.to_s.to_html
699
+ varsstring[key] = value.to_s
700
+ end
701
+ end
702
+ end
702
703
 
703
- windowobject = RWDTree.new(@rwd).children.dup.delete_if{|obj| obj.subtype != "window"}[0]
704
- helpobject = RWDTree.new(@helprwd).children.dup.delete_if{|obj| obj.subtype != "helpwindow"}[0]
704
+ windowobject = RWDTree.new(@rwd).children.dup.delete_if{|obj| obj.subtype != "window"}[0]
705
+ helpobject = RWDTree.new(@helprwd).children.dup.delete_if{|obj| obj.subtype != "helpwindow"}[0]
705
706
 
706
- tabsobj = windowobject.children.dup.delete_if{|obj| obj.subtype != "tabs"}[0]
707
+ tabsobj = windowobject.children.dup.delete_if{|obj| obj.subtype != "tabs"}[0]
707
708
 
708
- if not tabsobj.nil?
709
- tabs = tabsobj.children.dup.delete_if{|obj| (not obj.kind_of?(OpenTag)) or (obj.subtype != "tab")}
709
+ if not tabsobj.nil?
710
+ tabs = tabsobj.children.dup.delete_if{|obj| (not obj.kind_of?(OpenTag)) or (obj.subtype != "tab")}
710
711
 
711
- if tab.empty?
712
- tab = tabs[0].args["name"]
713
- end
712
+ if tab.empty?
713
+ tab = tabs[0].args["name"]
714
+ end
714
715
 
715
- tabsobj.children.delete_if{|obj| (obj.kind_of?(OpenTag)) and (obj.subtype == "tab") and obj.args["name"] != tab}
716
- end
716
+ tabsobj.children.delete_if{|obj| (obj.kind_of?(OpenTag)) and (obj.subtype == "tab") and obj.args["name"] != tab}
717
+ end
717
718
 
718
- if help
719
- helpobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, false, oneormorefields, firstaction, tabs, tab, pda)
720
- else
721
- windowobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, (not @helprwd.empty?), oneormorefields, firstaction, tabs, tab, pda)
722
- end
719
+ if help
720
+ helpobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, false, oneormorefields, firstaction, tabs, tab, pda)
721
+ else
722
+ windowobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, (not @helprwd.empty?), oneormorefields, firstaction, tabs, tab, pda)
723
+ end
723
724
 
724
- html = html.join("") # ???
725
+ html = html.join("") # ???
725
726
 
726
- html.gsub!(/%%*[[:alnum:]_\-]+%%*/, "") if not $rwd_debug
727
- html.gsub!(/%%/, "%")
728
- html.gsub!(/\n\n*/, "\n")
727
+ html.gsub!(/%%*[[:alnum:]_\-]+%%*/, "") if not $rwd_debug
728
+ html.gsub!(/%%/, "%")
729
+ html.gsub!(/\n\n*/, "\n")
729
730
 
730
- if oneormorefields.empty?
731
- focus = ""
732
- else
733
- focus = "document.bodyform.elements[0].focus();"
734
- end
731
+ if oneormorefields.empty?
732
+ focus = ""
733
+ else
734
+ focus = "document.bodyform.elements[0].focus();"
735
+ end
735
736
 
736
- firstaction = action if windowobject.args.keys.include?("refresh") unless action.nil?
737
+ firstaction = action if windowobject.args.keys.include?("refresh") unless action.nil?
737
738
 
738
- html.gsub!(/\$RWD_FIRSTACTION\$/ , firstaction)
739
- html.gsub!(/\$RWD_FOCUS\$/ , focus)
739
+ html.gsub!(/\$RWD_FIRSTACTION\$/ , firstaction)
740
+ html.gsub!(/\$RWD_FOCUS\$/ , focus)
740
741
 
741
- html
742
- end
742
+ html
743
+ end
743
744
 
744
745
  rescue
745
- if $DEBUG
746
- $stderr.puts "error in RWDWindow - render method"
746
+ $rwdtinkerlog.error "error in RWDWindow - render method"
747
+
747
748
  end
748
749
  end
749
- end
750
+
750
751
 
751
752
  class RWDMessage < RWDWindow
752
753
  def initialize(msg)
@@ -830,7 +831,9 @@ class RWDialog
830
831
 
831
832
  self
832
833
  end
834
+
833
835
 
836
+
834
837
  def render(res, path, post, download, downloadfile, pda, sessionid)
835
838
  # Avoid a timeout.
836
839
 
@@ -862,8 +865,11 @@ class RWDialog
862
865
 
863
866
  post.sort.each do |key, value|
864
867
  puts "Post: #{key} -> #{value.from_html.inspect}" if $rwd_debug
868
+ $rwdtinkerlog.info "Post: #{key} -> #{value.from_html.inspect}\n"
865
869
 
866
870
  vars[key] = value.from_html
871
+ $rwdtinkerlog.info "rwd: #{value.from_html}\n"
872
+
867
873
  end
868
874
 
869
875
  # Stack handling for rwd_action, rwd_window and rwd_tab.
@@ -931,14 +937,24 @@ class RWDialog
931
937
  # Copy vars from window to instance.
932
938
 
933
939
  vars.each do |k, v|
934
- instance_eval "@#{k} = vars['#{k}']" if ((not k.empty?) and k.scan(/^rwd_/).empty? and not @rwd_ignore_vars.include?("@#{k}"))
940
+ $rwdtinkerlog.info "rwd: Post: #{k} -> #{v}\n"
941
+
942
+ if ((not k.empty?) and k.scan(/^rwd_/).empty? and not @rwd_ignore_vars.include?("@#{k}"))
943
+
944
+ instance_eval "@#{k} = ''"
945
+ instance_variable_set("@#{k}", vars.fetch("#{k}"))
946
+ $rwdtinkerlog.info "rwd: Post: #{k} -> #{v}\n"
947
+
948
+ end
935
949
  end
936
950
 
937
951
  # Callback.
938
952
 
939
953
  if (not back) or @rwd_call_after_back.include?(@rwd_action)
940
954
  unless @rwd_action =~ /^rwd_/
941
- puts "Method: #{@rwd_action}(#{@rwd_args.join(", ")})" if $rwd_debug
955
+
956
+ $rwdtinkerlog.debug "Method: #{@rwd_action}(#{@rwd_args})"
957
+
942
958
  if methods.include?(@rwd_action)
943
959
  method(@rwd_action).call(*@rwd_args)
944
960
  else
@@ -1008,9 +1024,9 @@ begin # error block
1008
1024
  end
1009
1025
  res << RWDWindow.new($rwd_gui_tinker, @rwd_window).render(pda, @rwd_refresh_action, vars, @rwd_switches, help, @rwd_tab)
1010
1026
  rescue
1011
- if $DEBUG
1012
- $stderr.puts "error in render"
1013
- end
1027
+
1028
+ $rwdtinkerlog.error "rwd: error in render"
1029
+
1014
1030
  end
1015
1031
  end
1016
1032
  end
@@ -1088,7 +1104,9 @@ end
1088
1104
  Thread.new do
1089
1105
  loop do
1090
1106
  if Time.now - @rwd_time > @rwd_timeout
1091
- $stderr.puts "Exiting due to timeout (#{@rwd_timeout} seconds)."
1107
+
1108
+ $rwdtinkerlog.info "rwd: Exiting due to timeout (#{@rwd_timeout} seconds)."
1109
+
1092
1110
  exit 1
1093
1111
  end
1094
1112
  sleep interval
@@ -1168,7 +1186,7 @@ class RWDSession < Hash
1168
1186
  @lastaccess = Time.now
1169
1187
  end
1170
1188
 
1171
- def render(res, path, post, download, downloadfile, pda)
1189
+ def render(res, path, post, download, downloadfile, pda=false)
1172
1190
  done = self["object"].render(res, path, post, download, downloadfile, pda, @sessionid)
1173
1191
 
1174
1192
  res.gsub!(/\$RWD_SESSION\$/, done ? "" : "#{@sessionid}")
@@ -1195,7 +1213,8 @@ class RWDServer
1195
1213
 
1196
1214
  @browserthread =
1197
1215
  Thread.new do
1198
- puts "Starting the browser..."
1216
+ $rwdtinkerlog.warn "rwd: Starting the browser..."
1217
+
1199
1218
 
1200
1219
  #if ENV["RWDBROWSER"].downcase =~ /iexplore/ # ???
1201
1220
  #@ie = IE.new("http://localhost:#{port}/")
@@ -1209,7 +1228,7 @@ class RWDServer
1209
1228
 
1210
1229
  command.gsub!(/%port%/, port.to_s)
1211
1230
 
1212
- system(command) or $stderr.puts "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}"
1231
+ system(command) or $rwdtinkerlog.error "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}"
1213
1232
  #end
1214
1233
 
1215
1234
  puts "The browser has terminated."
@@ -1320,8 +1339,8 @@ class RWDServer
1320
1339
  resp << download
1321
1340
  end
1322
1341
  rescue
1323
- puts "Sending response to browser failed."
1324
-
1342
+
1343
+ $rwdtinkerlog.error "rwd: Sending response to browser failed."
1325
1344
  @sessions.delete(session.sessionid)
1326
1345
  end
1327
1346
 
@@ -1335,8 +1354,9 @@ class RWDServer
1335
1354
 
1336
1355
  if @browserstarted and not @browserthread.nil? and @browserthread.alive?
1337
1356
  resp.stop do
1338
- puts "Waiting for the browser to terminate..."
1339
-
1357
+
1358
+ $rwdtinkerlog.warn "rwd: Waiting for the browser to terminate..."
1359
+
1340
1360
  @browserthread.join
1341
1361
  end
1342
1362
  end
@@ -1,4 +1,4 @@
1
- $stderr.puts "in default theme load"
1
+ $rwdtinkerlog.info "in default theme load"
2
2
 
3
3
  $rwd_html["DEFAULT"] = "
4
4
  <!-- Generated by RubyWebDialog. -->
@@ -0,0 +1,56 @@
1
+ # part of rwdtinker smalllinux@gmail.com
2
+ # copyleft gpl 2008 Steven Gibson
3
+
4
+ require 'lib/rwdtinker/rwdtinkertools'
5
+
6
+ tmpmodload = '
7
+ def RwdtinkerTools.findfilesp(d)
8
+
9
+ a = Array.new(Dir[d].entries.sort)
10
+ #loop through and get the files names
11
+ a.each do |x|
12
+ #adjust the filters to the files you want to see...
13
+ if(!test(?d,x))
14
+ # only rwd files
15
+ if x =~ /rb|rwd|txt/
16
+ fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
17
+ @@tempdoc+=fileA.read #reads the file into the doc string
18
+ fileA.close
19
+ end
20
+ end
21
+ end
22
+
23
+ end
24
+
25
+ def RwdtinkerTools.findprogramfiles(codedir, specificdir = "")
26
+ @@tempdoc = ""
27
+ #get a list of the files and subdirectories on the starting directory only
28
+ a = Array.new(Dir[codedir].entries.sort)
29
+ #loop through the list, ignore the files and add all new directories found
30
+ a.each do |x|
31
+ #if a directory...
32
+ if(test(?d,x))
33
+ # add to the original list of directories
34
+ @@root = x + "/**"
35
+ #adds the new ones to the array
36
+ b = Dir[@@root].entries.sort
37
+ b.each do |x|
38
+ if(test(?d,x))
39
+ a.push(x) #appends to the end of the array...
40
+ end
41
+ end
42
+ end
43
+ end
44
+ a.each do |x|
45
+ #if it is a file...
46
+ if(!test(?d,x))
47
+ a.delete(x)
48
+ else #it is a directory...
49
+ findfilesp(x + "/**")
50
+ end
51
+ end
52
+ return @@tempdoc
53
+ end
54
+ '
55
+
56
+ RwdtinkerTools.module_eval(tmpmodload)
@@ -0,0 +1,57 @@
1
+ # part of rwdtinker smalllinux@gmail.com
2
+ # copyleft gpl 2008 Steven Gibson
3
+
4
+ require 'lib/rwdtinker/rwdtinkertools'
5
+
6
+ tmpmodload = '
7
+ def RwdtinkerTools.loadguifile(d)
8
+
9
+ a = Array.new(Dir[d].entries.sort)
10
+ #loop through and get the files names
11
+ a.each do |x|
12
+ #adjust the filters to the files you want to see...
13
+ if(!test(?d,x))
14
+ # only rwd files
15
+ if x =~ /rb|rwd|txt/
16
+
17
+ load x #opens the file thats in fileName and reads it
18
+ @@tempdoc += $rwdguivar # adds the file into the doc string
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ def RwdtinkerTools.findguifiles(guidir)
25
+ @@tempdoc = ""
26
+ #get a list of the files and subdirectories on the starting directory only
27
+ a = Array.new(Dir[guidir].entries.sort)
28
+ #loop through the list, ignore the files and add all new directories found
29
+ a.each do |x|
30
+ #if a directory...
31
+ if(test(?d,x))
32
+ #use this new dir find to add to the original list of directories
33
+ @@root = x + "/**"
34
+ #adds the new ones to the array
35
+ b = Dir[@@root].entries.sort
36
+ b.each do |x|
37
+ if(test(?d,x))
38
+ a.push(x) #appends to the end of the array...
39
+ end
40
+ end
41
+ end
42
+ end
43
+ a.each do |x|
44
+ #if it is a file...
45
+ if(!test(?d,x))
46
+ a.delete(x)
47
+
48
+ else #it is a directory...
49
+ loadguifile(x + "/**")
50
+ end
51
+ end
52
+ return @@tempdoc
53
+
54
+ end
55
+ '
56
+
57
+ RwdtinkerTools.module_eval(tmpmodload)
@@ -0,0 +1,60 @@
1
+ # part of rwdtinker smalllinux@gmail.com
2
+ # copyleft gpl 2008 Steven Gibson
3
+
4
+ require 'lib/rwdtinker/rwdtinkertools'
5
+
6
+ tmpmodload = '
7
+ def RwdtinkerTools.findfilest(d)
8
+ a = Array.new(Dir[d].entries.sort)
9
+ #loop through and get the files names
10
+ a.each do |x|
11
+ #adjust the filters to the files you want to see...
12
+ if(!test(?d,x))
13
+ # only rwd files
14
+ if x =~ /rb|po|txt/
15
+ fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
16
+ @@tempdoc+=fileA.read #reads the file into the doc string
17
+ fileA.close
18
+ end
19
+ end
20
+ end
21
+
22
+ end
23
+
24
+
25
+ def RwdtinkerTools.findlanguagefiles(langdir,lang)
26
+ @@tempdoc = ""
27
+
28
+ startlangdir = File.join(langdir,lang)
29
+ #get a list of the files and subdirectories on the starting directory only
30
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
31
+ #loop through the list, ignore the files and add all new directories found
32
+ alanghash.each do |x|
33
+ #if a directory...
34
+ if(test(?d,x))
35
+ # add to the original list of directories
36
+ @@tmproot = x + "/**"
37
+ #adds the new ones to the array
38
+ blanghash = Dir[@@tmproot].entries.sort
39
+ blanghash.each do |x|
40
+ if(test(?d,x))
41
+ alanghash.push(x) #appends to the end of the array...
42
+ end
43
+ end
44
+ end
45
+ end
46
+ alanghash.each do |x|
47
+ #if it is a file...
48
+ if(!test(?d,x))
49
+ alanghash.delete(x)
50
+ else #it is a directory...
51
+ findfilest(x + "/**")
52
+ end
53
+ end
54
+
55
+ return @@tempdoc
56
+
57
+ end
58
+ '
59
+
60
+ RwdtinkerTools.module_eval(tmpmodload)
@@ -0,0 +1,25 @@
1
+ # part of rwdtinker smalllinux@gmail.com
2
+ # copyleft gpl 2008 Steven Gibson
3
+
4
+ module RwdtinkerTools
5
+
6
+ # tools to use in rwdtinker
7
+
8
+ def RwdtinkerTools.tail(filename, lines=12)
9
+
10
+
11
+ begin
12
+ tmpFile = File.open(filename, 'r')
13
+
14
+ return tmpFile.readlines.reverse!.slice(0,lines)
15
+
16
+ tmpFile.close
17
+ rescue
18
+ return "error in opening log"
19
+ $rwdtinkerlog.error "RwdtinkerTools.tail: file open error"
20
+ end
21
+ end
22
+
23
+ end
24
+
25
+
@@ -97,8 +97,7 @@ There are two ways to add applets to the directories.
97
97
  The gui files go into your gui directory
98
98
  The gui files need to be in order by name and end with .rwd
99
99
 
100
-
101
-
100
+
102
101
  If you need a config file that goes in the configuration directory
103
102
 
104
103
  internationalization and localization are helped by replacing the
@@ -136,9 +135,11 @@ To exit, press the x inside the browser window.
136
135
 
137
136
  == Languages
138
137
 
139
-
140
138
  You can add tranlations in the lang subdirectory
141
- You change the $lang constant in Tinker config file in the configuration directory
139
+ You change the $langarray constant in Tinker config file in the configuration directory
140
+
141
+ to change language => in the tinkerwin2variables.cnf file the [0] setting of $langarray will be the language choosen.
142
+
142
143
  You can see one translation on the install applet tab, after you have installed and applet
143
144
 
144
145
  == Using over a Network
@@ -168,14 +169,15 @@ Ruby I am using version 1.8.2
168
169
 
169
170
  I have tested this under Linux-Debian kernel 2.6.9
170
171
 
171
- = Operation:
172
+ == Operation:
173
+
172
174
  The code files reside in the code directory and are combined before
173
175
  the main Class is loaded
174
176
 
175
177
  The rwd files in gui are combined before the gui is activated
176
178
 
177
179
  Translated text reside in the lang directory
178
-
180
+
179
181
  == Installing:
180
182
 
181
183
  untar the file
@@ -220,13 +222,37 @@ under the terms of the GPL licence:
220
222
  For more information see:
221
223
  http://rwdapplications.rubyforge.org/wiki/wiki.pl
222
224
 
223
-
224
225
  For more information about RubyWebDialogs see:
225
226
  http://www.erikveen.dds.nl/rubywebdialogs/index.html
226
227
 
227
228
  Thanks, Steven Gibson
228
229
 
229
230
  == Changelog
231
+ version 1.82
232
+ switch to po files for translation files
233
+ add beginning of Hindi po file
234
+ added more Japanese strings
235
+ changed handling of lang change = in the tinkerwin2variables.cnf file the [0] setting of $langarray will be the language choosen.
236
+
237
+ version 1.81
238
+ condensed config files from 4 -> 2
239
+ fixed document launch bug
240
+ add $KCODE = 'u'
241
+ move help files to rwd_files directory
242
+
243
+ version 1.80
244
+ changed pda handling in rwd.rb
245
+ added logging
246
+ added log review screen on tinker back window
247
+ changed handling of live applet loading, to not list version in file names
248
+
249
+ version 1.79
250
+ edited net.rb to fix text editing
251
+
252
+ version 1.78
253
+ modify config files
254
+ modify rconftools.rb to handle \r\n dos vs unix
255
+
230
256
  Version 1.77
231
257
  Fixed zips location to be relative or absolute
232
258
  Made themes loadable
@@ -102,6 +102,12 @@ Steven Gibson
102
102
  steven@superant.com
103
103
 
104
104
  == Changelog
105
+ version 0.03
106
+ update for rwdtinker 1.80
107
+
108
+ version 0.02
109
+ fix config file
110
+
105
111
  version 0.01
106
112
  First Release
107
113
  edit GUI