rwdruby 1.07 → 1.08

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 (56) 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.rwdshell/0uninstallapplet.rb +1 -1
  5. data/code/superant.com.rwdshell/loadconfigurationrecord.rb +1 -1
  6. data/code/superant.com.rwdshell/loadconfigurationvariables.rb +1 -1
  7. data/code/superant.com.rwdshell/saveconfigurationrecord.rb +1 -1
  8. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +62 -132
  9. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +9 -7
  10. data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +6 -6
  11. data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +13 -0
  12. data/configuration/rwdtinker.dist +3 -3
  13. data/configuration/{rwdwruby-1.07.dist → rwdwruby.dist} +2 -2
  14. data/configuration/tinkerwin2variables.dist +7 -2
  15. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
  16. data/init.rb +59 -163
  17. data/installed/{rwdwruby-1.07.inf → rwdwruby.inf} +3 -3
  18. data/lang/en/rwdcore/en.po +166 -0
  19. data/lang/es/rwdcore/es.po +172 -0
  20. data/lang/fr/rwdcore/fr.po +166 -0
  21. data/lang/hi/rwdcore/hi.po +170 -0
  22. data/lang/ja/rwdcore/ja.po +168 -0
  23. data/lang/nl/rwdcore/nl.po +166 -0
  24. data/lib/rwd/net.rb +8 -7
  25. data/lib/rwd/rwd.rb +34 -31
  26. data/lib/rwdthemes/default.rwd +1 -1
  27. data/lib/rwdtinker/rwdcodedir.rb +56 -0
  28. data/lib/rwdtinker/rwdguidir.rb +57 -0
  29. data/lib/rwdtinker/rwdlangdir.rb +60 -0
  30. data/lib/rwdtinker/rwdtinkertools.rb +25 -0
  31. data/rwd_files/HowTo_Tinker.txt +26 -7
  32. data/rwd_files/Tinkerhelptexthash.txt +81 -0
  33. data/rwd_files/log/rwdtinker.log +1841 -0
  34. data/tests/makedist-rwdwruby.rb +2 -2
  35. data/tests/makedist-tinkerbellw.rb +58 -0
  36. data/tests/makedist.rb +2 -2
  37. data/zips/{rwdwcalc-0.62.zip → rwdwcalc-0.63.zip} +0 -0
  38. data/zips/{rwdwfoldeditor-0.04.zip → rwdwfoldeditor-0.05.zip} +0 -0
  39. data/zips/rwdwhypernote-0.15.zip +0 -0
  40. data/zips/rwdwmovies-0.98.zip +0 -0
  41. data/zips/{rwdwruby-1.07.zip → rwdwruby-1.08.zip} +0 -0
  42. data/zips/tinkerbellw-0.03.zip +0 -0
  43. data/zips/wrubyslippers-1.08.zip +0 -0
  44. metadata +26 -19
  45. data/code/01rwdcore/04helptextend.rb +0 -6
  46. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -61
  47. data/configuration/language.dist +0 -8
  48. data/configuration/rwdapplicationidentity.dist +0 -3
  49. data/lang/en/rwdcore/languagefile.rb +0 -58
  50. data/lang/es/rwdcore/languagefile-es.rb +0 -62
  51. data/lang/fr/rwdcore/languagefile.rb +0 -64
  52. data/lang/jp/rwdcore/languagefile.rb +0 -72
  53. data/lang/nl/rwdcore/languagefile.rb +0 -75
  54. data/zips/rwdwaddresses-1.06.zip +0 -0
  55. data/zips/rwdwgutenberg-0.09.zip +0 -0
  56. data/zips/wrubyslippers-1.06.zip +0 -0
@@ -1,4 +1,4 @@
1
- ##VERSION: (1.79)
1
+ ##VERSION: (1.82)
2
2
  TinkerWin2ConfigurationFileName = "tinkerwin2variables.cnf" # this file name - do not change
3
3
  ##NAME: ($zipslocation):(1.78)
4
4
  $zipslocation = "zips" # location of applets to add
@@ -14,5 +14,10 @@ $zipslocation = "zips" # location of applets to add
14
14
  # $geminstalled_directory = "/ruby/lib/ruby/gems/1.8/gems" # XP machine
15
15
  $geminstalled_directory = "/var/lib/gems/1.8/gems" # Debian Linux
16
16
 
17
- RwdTinkerWin2Version = "1.79"
17
+ $rwdapplicationidentity = "rwdtinker main application"
18
18
 
19
+ RwdTinkerWin2Version = "1.81"
20
+ Browser_Exe = 'mozilla '
21
+ #language selection file
22
+ ##NAME: ($langarray):(1.82)
23
+ $langarray = [ "en","ja", "nl","es", "fr","hi"]
@@ -0,0 +1,20 @@
1
+ $rwdguivar=
2
+ "
3
+ <tab name=\"rwdlogfiletab\" caption=\"RWD Log Files\">
4
+ <table>
5
+ <horizontal>
6
+
7
+
8
+ <p align=\"left\">Number of lines to display</p> <text size=11 name=\"a_rwdtinkerlognumber\"/>
9
+
10
+ <button caption=#{Message[:viewlogger_information]} action=\"rwdtinkerrunviewlog\"/>
11
+ </horizontal>
12
+
13
+ </table>
14
+
15
+ <p>%returnlogdisplay%</p>
16
+
17
+ </tab>"
18
+
19
+
20
+
data/init.rb CHANGED
@@ -21,44 +21,18 @@
21
21
  #* at "smalllinux@gmail.com".
22
22
  #***********************************************************************/
23
23
 
24
+ require 'logger'
25
+
26
+ $rwdtinkerlog = Logger.new( 'rwd_files/log/rwdtinker.log', 'weekly' )
27
+ $rwdtinkerlog.level = Logger::INFO
28
+
24
29
  require "lib/rwd/rwd"
25
30
  require 'fileutils'
26
31
  require 'lib/rconftool'
27
32
 
28
33
  $progdir = File::expand_path( File.dirname(__FILE__))
29
34
 
30
- $tempdoc = " "
31
-
32
- def findfiles(d)
33
- a = Array.new(Dir[d].entries.sort)
34
- #loop through and get the files names
35
- a.each do |x|
36
- #adjust the filters to the files you want to see...
37
- if(!test(?d,x))
38
- # only rwd files
39
- if x =~ /rb|rwd|txt/
40
- fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
41
- $tempdoc+=fileA.read #reads the file into the doc string
42
- fileA.close
43
- end
44
- end
45
- end
46
- end
47
- def loadguifile(d)
48
- a = Array.new(Dir[d].entries.sort)
49
- #loop through and get the files names
50
- a.each do |x|
51
- #adjust the filters to the files you want to see...
52
- if(!test(?d,x))
53
- # only rwd files
54
- if x =~ /rb|rwd|txt/
55
-
56
- load x #opens the file thats in fileName and reads it
57
- $tempdoc += $rwdguivar # adds the file into the doc string
58
- end
59
- end
60
- end
61
- end
35
+ tempdoc = " "
62
36
 
63
37
  # integrate the new configuration files
64
38
  MAINconfignew = "rwdconfig.cnf"
@@ -94,148 +68,70 @@ Rconftool::install(configdist,confignew) #integrates new file with old
94
68
 
95
69
  Dir.chdir($progdir) # change back to top program directory
96
70
 
71
+
97
72
  # build the English Language hash file from the parts
98
- languagehashvariable = 'Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
99
- langmessage = {' + "\n"
100
- startlangdir = File.join(LangDir,"en")
101
- #get a list of the files and subdirectories on the starting directory only
102
- alanghash = Array.new(Dir[startlangdir].entries.sort)
103
- #loop through the list, ignore the files and add all new directories found
104
- alanghash.each do |x|
105
- #if a directory...
106
- if(test(?d,x))
107
- # add to the original list of directories
108
- @@tmproot = x + "/**"
109
- #adds the new ones to the array
110
- blanghash = Dir[@@tmproot].entries.sort
111
- blanghash.each do |x|
112
- if(test(?d,x))
113
- alanghash.push(x) #appends to the end of the array...
114
- end
115
- end
116
- end
117
- end
118
- alanghash.each do |x|
119
- #if it is a file...
120
- if(!test(?d,x))
121
- alanghash.delete(x)
122
- else #it is a directory...
123
- findfiles(x + "/**")
124
- end
73
+ Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
74
+ langmessage = { :clear => "Clear", :rwdtinker => "Rwdtinker" } ; langmessage.each { |kk, vv| Message[kk] = vv }
75
+
76
+ def msgid(programkey)
77
+ $programkey = programkey
125
78
  end
126
-
79
+
80
+ def msgstr(programmsg)
81
+ if programmsg == ""
82
+ $rwdtinkerlog.info "msgstr: no translation for #{$programkey}"
83
+ else
84
+ Message.update( $programkey.to_sym => programmsg )
85
+ end
86
+ end
87
+
88
+ require 'lib/rwdtinker/rwdlangdir'
89
+
90
+ tempdoc = " "
91
+ #go get all the po language file files in english
92
+ tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,"en")
127
93
 
128
94
  #writes the contents of doc into the languagehashvariable
129
- languagehashvariable = languagehashvariable + $tempdoc + "} ; langmessage.each { |kk, vv| Message[kk] = vv }"
95
+ languagehashvariable = tempdoc
130
96
 
131
97
  # END of en Lang building
132
- $tempdoc = " "
98
+ tempdoc = " "
133
99
  Dir.chdir($progdir) # change back to top program directory
134
100
 
135
101
  # build the local Language hash file from the parts
136
- startlangdir = File.join(LangDir,$lang)
137
- #get a list of the files and subdirectories on the starting directory only
138
- alanghash = Array.new(Dir[startlangdir].entries.sort)
139
- #loop through the list, ignore the files and add all new directories found
140
- alanghash.each do |x|
141
- #if a directory...
142
- if(test(?d,x))
143
- # add to the original list of directories
144
- @@tmproot = x + "/**"
145
- #adds the new ones to the array
146
- blanghash = Dir[@@tmproot].entries.sort
147
- blanghash.each do |x|
148
- if(test(?d,x))
149
- alanghash.push(x) #appends to the end of the array...
150
- end
151
- end
152
- end
153
- end
154
- alanghash.each do |x|
155
- #if it is a file...
156
- if(!test(?d,x))
157
- alanghash.delete(x)
158
- else #it is a directory...
159
- findfiles(x + "/**")
160
- end
161
- end
162
-
163
-
164
- #writes the contents of doc into the variable
165
- languagehashvariable = languagehashvariable + " ; Message.update(" + $tempdoc + ' :rwdtinker => "Rwdtinker" ) '
166
-
167
-
168
- $tempdoc = " "
169
-
170
- Dir.chdir($progdir) # change back to top program directory
102
+
103
+ $lang = $langarray[0] # pick the language of choice
104
+
105
+ # Go get all the po files for the language of choice
106
+ tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,$lang)
107
+ # the contents of doc into the variable
108
+ languagehashvariable = languagehashvariable + tempdoc
171
109
 
172
- temp = eval( languagehashvariable )
110
+ Dir.chdir($progdir) # change back to top program directory
111
+
112
+ # lets read those po files, first english then the chosen language
113
+ temp = eval( languagehashvariable )
173
114
 
174
- $tempdoc = " "
115
+
175
116
 
176
117
  # build the actual program from the code parts
177
- #get a list of the files and subdirectories on the starting directory only
178
- a = Array.new(Dir[CodeDir].entries.sort)
179
- #loop through the list, ignore the files and add all new directories found
180
- a.each do |x|
181
- #if a directory...
182
- if(test(?d,x))
183
- # add to the original list of directories
184
- @@root = x + "/**"
185
- #adds the new ones to the array
186
- b = Dir[@@root].entries.sort
187
- b.each do |x|
188
- if(test(?d,x))
189
- a.push(x) #appends to the end of the array...
190
- end
191
- end
192
- end
193
- end
194
- a.each do |x|
195
- #if it is a file...
196
- if(!test(?d,x))
197
- a.delete(x)
198
- else #it is a directory...
199
- findfiles(x + "/**")
200
- end
201
- end
202
-
118
+ require 'lib/rwdtinker/rwdcodedir'
119
+
120
+ tempdoc = RwdtinkerTools.findprogramfiles(CodeDir)
203
121
 
204
122
  # load the program file
205
- tempcoderesult = eval( $tempdoc )
123
+
124
+ tempcoderesult = eval( tempdoc )
206
125
 
207
126
  # build the actual GUI from the gui parts
208
- $tempdoc = " "
209
- #get a list of the files and subdirectories on the starting directory only
210
- a = Array.new(Dir[GuiDir].entries.sort)
211
- #loop through the list, ignore the files and add all new directories found
212
- a.each do |x|
213
- #if a directory...
214
- if(test(?d,x))
215
- #use this new dir find to add to the original list of directories
216
- @@root = x + "/**"
217
- #adds the new ones to the array
218
- b = Dir[@@root].entries.sort
219
- b.each do |x|
220
- if(test(?d,x))
221
- a.push(x) #appends to the end of the array...
222
- end
223
- end
224
- end
225
- end
226
- a.each do |x|
227
- #if it is a file...
228
- if(!test(?d,x))
229
- a.delete(x)
230
-
231
- else #it is a directory...
232
- loadguifile(x + "/**")
233
- end
234
- end
127
+ require 'lib/rwdtinker/rwdguidir'
128
+
129
+ tempdoc = RwdtinkerTools.findguifiles(GuiDir)
130
+
235
131
 
236
132
  # gui variable is done
237
133
  guiRWD = ""
238
- $rwd_gui_tinker = $tempdoc
134
+ $rwd_gui_tinker = tempdoc
239
135
  require 'socket' # Network stuff
240
136
  host = "127.0.0.1"
241
137
  port = $port
@@ -250,27 +146,27 @@ Rconftool::install(configdist,confignew) #integrates new file with old
250
146
  $port = port
251
147
  # Rescue the "Address in use" error
252
148
  rescue Errno::EADDRINUSE
253
- puts "RWD Startup: Port #{port} on host #{host} is already in use."
149
+ $rwdtinkerlog.warn "RWD Startup: Port #{port} on host #{host} is already in use."
254
150
  port=port +1
255
- puts "trying port: #{port}"
151
+ $rwdtinkerlog.warn "trying port: #{port}"
256
152
  # Rescue the "Address not available' error
257
153
  rescue Errno::EADDRNOTAVAIL
258
- puts "RWD Startup: Address #{host} is not available to bind."
154
+ $rwdtinkerlog.warn "RWD Startup: Address #{host} is not available to bind."
259
155
  port =port + 1
260
- puts "trying port: #{port}"
156
+ $rwdtinkerlog.warn "trying port: #{port}"
261
157
  # Rescue "permission denied errors
262
158
  rescue Errno::EACCES
263
- puts "RWD Startup: Access denied when binding interface addresses. ?"
159
+ $rwdtinkerlog.warn "RWD Startup: Access denied when binding interface addresses. ?"
264
160
  port =port + 1
265
- puts "trying port: #{port}"
161
+ $rwdtinkerlog.warn "trying port: #{port}"
266
162
  # Rescue all other errors
267
163
  rescue
268
- puts "RWD Startup: An error occured."
164
+ $rwdtinkerlog.warn "RWD Startup: An error occured."
269
165
  port =port + 1
270
- puts "trying port: #{port}"
166
+ $rwdtinkerlog.warn "trying port: #{port}"
271
167
  # Rescue all other errors
272
168
  end
273
-
169
+ $port = port
274
170
  end
275
171
 
276
172
 
@@ -3,10 +3,10 @@ gui/tinkerbackwindows/superant.com.refreshwindow
3
3
  gui/tinkerbackwindows/superant.com.ashellscripts
4
4
  gui/tinkerbackwindows/superant.com.rwdshellbackwindow
5
5
  gui/tinkerbackwindows/superant.com.refreshacpi
6
- code/superant.com.rwdshell
6
+ code/superant.com.rwdshell/
7
7
  tests/gemspec-rwdwruby
8
8
  tests/makedist-rwdwruby.rb
9
9
  rwd_files/HowTo_Ruby.txt
10
- configuration/rwdwruby-1.07.dist
11
- configuration/rwdwruby-1.07.cnf
10
+ configuration/rwdwruby.dist
11
+ configuration/rwdwruby.cnf
12
12
 
@@ -0,0 +1,166 @@
1
+ # English Language files for RwdTinker core
2
+
3
+ msgid "applet_installed"
4
+ msgstr '"applet installed!"'
5
+
6
+ msgid "application_version"
7
+ msgstr "Application Version"
8
+
9
+ msgid "cancel"
10
+ msgstr "Cancel"
11
+
12
+ msgid "clickfor_version"
13
+ msgstr "Click for Version"
14
+
15
+ msgid "clickbelowtoviewlistof_zip"
16
+ msgstr "click below to view lists of zips"
17
+
18
+ msgid "documents"
19
+ msgstr "Documents"
20
+
21
+ msgid "edit"
22
+ msgstr "edit"
23
+
24
+ msgid "file_name"
25
+ msgstr "File Name:"
26
+
27
+ msgid "fill_record"
28
+ msgstr "Fill Record"
29
+
30
+ msgid "help"
31
+ msgstr "Help"
32
+
33
+ msgid "help_about"
34
+ msgstr '"Help About"'
35
+
36
+ msgid "install_applet"
37
+ msgstr '"install (rwdtinker) applet"'
38
+
39
+ msgid "jumptoapplication_location"
40
+ msgstr '"Jump to Application Location"'
41
+
42
+ msgid "list_applets"
43
+ msgstr '"Remove Applets"'
44
+
45
+ msgid "listappletsinthegem_directory"
46
+ msgstr '"List applets in the Gem Directory"'
47
+
48
+ msgid "listappletsavailablefor_installation"
49
+ msgstr '"List applets available for installation"'
50
+
51
+ msgid "list_files"
52
+ msgstr '"List Files"'
53
+
54
+ msgid "list_installed_gems "
55
+ msgstr '"List installed Gems"'
56
+
57
+ msgid "list_photos"
58
+ msgstr '"List Photos"'
59
+
60
+ msgid "list_zips"
61
+ msgstr '"List Zips"'
62
+
63
+ msgid "listzipdirappletsavailable"
64
+ msgstr '"List (zip directory) applets available for installation"'
65
+
66
+ msgid "menu_panel"
67
+ msgstr '"Menu Panel"'
68
+
69
+ msgid "module_unknown"
70
+ msgstr '"Unknown Module"'
71
+
72
+ msgid "next"
73
+ msgstr "Next"
74
+
75
+ msgid "open"
76
+ msgstr "Open"
77
+
78
+ msgid "open_document"
79
+ msgstr '"Open Document"'
80
+
81
+ msgid "openselectedhelp_about"
82
+ msgstr '"Open selected help about"'
83
+
84
+ msgid "reload_variables"
85
+ msgstr '"Reload Variables"'
86
+
87
+ msgid "remove_applet"
88
+ msgstr '"remove applet"'
89
+
90
+ msgid "return"
91
+ msgstr "Return"
92
+
93
+ msgid "rwdtinker_window_2"
94
+ msgstr '"RwdTinker Window 2"'
95
+
96
+ msgid "rwdtinker"
97
+ msgstr "RwdTinker"
98
+
99
+ msgid "rwdtinker_back_window"
100
+ msgstr '"RwdTinker Back Window"'
101
+
102
+ msgid "rwdtinker_help"
103
+ msgstr '"RwdTinker Help"'
104
+
105
+ msgid "rwdtinker_help_window"
106
+ msgstr '"RwdTinker Help Window"'
107
+
108
+ msgid "showjump_links"
109
+ msgstr '"Show Jump Links"'
110
+
111
+ msgid "showdocument_list"
112
+ msgstr '"Show Document List"'
113
+
114
+ msgid "showhelpabout_links"
115
+ msgstr '"Show Help About Links"'
116
+
117
+ msgid "save"
118
+ msgstr "Save"
119
+
120
+ msgid "save_changes"
121
+ msgstr '"Save Changes"'
122
+
123
+ msgid "selection_panel"
124
+ msgstr '"Menu Panel"'
125
+
126
+ msgid "selection_tab"
127
+ msgstr '"Menu Tab"'
128
+
129
+ msgid "tinker_logo"
130
+ msgstr '"Tinker Logo"'
131
+
132
+ msgid "tinkerback_window"
133
+ msgstr '"Tinker Back Window"'
134
+
135
+ msgid "viewapplet_contents"
136
+ msgstr '"View Applet Contents"'
137
+
138
+ msgid "viewalreadyinstalled_applications"
139
+ msgstr '"View already installed GEM applications"'
140
+
141
+ msgid "viewinstalled_text"
142
+ msgstr '"View Install Text"'
143
+
144
+ msgid "view_platform"
145
+ msgstr '"view platform"'
146
+
147
+ msgid "viewplatform_information"
148
+ msgstr '"View Platform Information"'
149
+
150
+ msgid "viewlogger_information"
151
+ msgstr '"View Logger Information"'
152
+
153
+ msgid "view_event"
154
+ msgstr '"View event"'
155
+
156
+ msgid "viewinstall_text"
157
+ msgstr '"View Install Text"'
158
+
159
+ msgid "viewlistinstall_files"
160
+ msgstr '"View List of Installed Files"'
161
+
162
+ msgid "view_photo"
163
+ msgstr '"View Photo"'
164
+
165
+ msgid "window"
166
+ msgstr "Window"