rwdfoldeditor 0.03 → 0.05

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/Readme.txt +20 -7
  2. data/code/01rwdcore/01rwdcore.rb +2 -2
  3. data/code/superant.com.foldeditor/0uninstallapplet.rb +1 -1
  4. data/code/superant.com.foldeditor/launchfoldeditorurl.rb +9 -2
  5. data/code/superant.com.foldeditor/loadconfigurationrecord.rb +1 -1
  6. data/code/superant.com.foldeditor/loadconfigurationvariables.rb +1 -1
  7. data/code/superant.com.foldeditor/loadfolddocument.rb +2 -5
  8. data/code/superant.com.foldeditor/loadnextnote.rb +32 -0
  9. data/code/superant.com.foldeditor/loadprevnote.rb +32 -0
  10. data/code/superant.com.foldeditor/rwddisplayfoldlinks.rb +11 -3
  11. data/code/superant.com.foldeditor/saveconfigurationrecord.rb +1 -1
  12. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +35 -34
  13. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +9 -7
  14. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +8 -2
  15. data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +6 -6
  16. data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +13 -0
  17. data/configuration/rwdtinker.dist +4 -8
  18. data/configuration/rwdwfoldeditor.dist +14 -0
  19. data/configuration/tinkerwin2variables.dist +17 -7
  20. data/gui/00coreguibegin/applicationguitop.rwd +1 -1
  21. data/gui/tinkerbackwindows/superant.com.foldeditor/10aviewnote.rwd +2 -1
  22. data/gui/tinkerbackwindows/superant.com.foldeditor/15htmlview.rwd +5 -8
  23. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
  24. data/init.rb +5 -0
  25. data/installed/{rwdwfoldeditor-0.03.inf → rwdwfoldeditor.inf} +2 -1
  26. data/lang/en/rwdcore/languagefile.rb +1 -0
  27. data/lang/es/rwdcore/languagefile-es.rb +1 -0
  28. data/lang/fr/rwdcore/languagefile.rb +1 -0
  29. data/lang/jp/rwdcore/languagefile.rb +1 -0
  30. data/lang/nl/rwdcore/languagefile.rb +1 -0
  31. data/lib/rconftool.rb +13 -6
  32. data/lib/rwd/net.rb +15 -4
  33. data/lib/rwd/ruby.rb +1 -1
  34. data/lib/rwd/rwd.rb +103 -620
  35. data/lib/rwdthemes/default.rwd +317 -0
  36. data/lib/rwdthemes/pda.rwd +72 -0
  37. data/lib/rwdthemes/windowslike.rwd +171 -0
  38. data/lib/rwdtinker/rwdtinkertools.rb +24 -0
  39. data/rwd_files/HowTo_FoldEditor.txt +9 -0
  40. data/rwd_files/HowTo_Tinker.txt +17 -1
  41. data/rwd_files/log/rwdtinker.log +2 -0
  42. data/rwdconfig.dist +14 -13
  43. data/tests/makedist-rwdwfoldeditor.rb +8 -4
  44. data/tests/makedist.rb +2 -2
  45. data/zips/rwdwcalc-0.63.zip +0 -0
  46. data/zips/rwdwfoldeditor-0.05.zip +0 -0
  47. data/zips/{rwdwgutenberg-0.09.zip → rwdwgutenberg-0.11.zip} +0 -0
  48. data/zips/rwdwhypernote-0.15.zip +0 -0
  49. data/zips/rwdwruby-1.08.zip +0 -0
  50. data/zips/wrubyslippers-1.07.zip +0 -0
  51. metadata +19 -13
  52. data/configuration/language.dist +0 -8
  53. data/configuration/rwdapplicationidentity.dist +0 -3
  54. data/configuration/rwdwfoldeditor-0.03.dist +0 -14
  55. data/zips/rwdwaddresses-1.05.zip +0 -0
  56. data/zips/rwdwcalc-0.61.zip +0 -0
  57. data/zips/rwdwfoldeditor-0.03.zip +0 -0
  58. data/zips/rwdwruby-1.05.zip +0 -0
  59. data/zips/temp.rb +0 -1
  60. data/zips/wrubyslippers-1.06.zip +0 -0
data/Readme.txt CHANGED
@@ -19,13 +19,6 @@ ruby init.rb
19
19
  Then point your web browser to:
20
20
  http://localhost:7705/
21
21
 
22
- Change language at:
23
-
24
- configuration/language.dist
25
-
26
- Change to Windows XP directory structure at:
27
- configuration/tinkerwin2variables.dist
28
-
29
22
  == Viewing installed Applets:
30
23
 
31
24
  Go to "List Scripts" tab
@@ -234,6 +227,26 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
234
227
  Thanks, Steven Gibson
235
228
 
236
229
  == Changelog
230
+ Version 1.77
231
+ Fixed zips location to be relative or absolute
232
+ Made themes loadable
233
+
234
+ Version 1.76
235
+ Move rwd code files into lib directory - bug - 21886
236
+ change tab name list applets - bug - 21864
237
+ change extra folder to be lib folder - bug 21887
238
+ remove duplicate intall applet code - bug 21885
239
+ On Menu tab/Selection Tab - add help button - bug 21884
240
+ clean up directory structure in gui directory - bug 21882
241
+
242
+ Version 1.75
243
+ change rwd.rb to use UTF-8 for web pages
244
+ add language load for applets
245
+
246
+ Version 1.74
247
+ remove remote control from help
248
+ more dependable gui loading for applets
249
+
237
250
  Version 1.73
238
251
  more debug info in initiateapplet
239
252
  remove gutenberg lang translations
@@ -4,8 +4,8 @@
4
4
  # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
5
  # This class is the top class for the RwdTinker application
6
6
 
7
- $DEBUG=true
8
- $VERBOSE=true
7
+ $DEBUG=false
8
+ $VERBOSE=false
9
9
 
10
10
  class RwdTinker < RWDialog
11
11
 
@@ -1,5 +1,5 @@
1
1
 
2
- def rwdwfoldeditor_0_03()
2
+ def rwdwfoldeditor()
3
3
  $tinkerdocumentsarray.delete_if {|x| x == "HowTo_FoldEditor.txt"}
4
4
  $tinkerhelpaboutarray.delete_if {|x| x == "RwdFoldEditor"}
5
5
  Helptext.delete_if {|key, value| key == :rwdfoldeditor_generalhelp}
@@ -1,10 +1,17 @@
1
1
  # launch the browser with a url
2
2
  def foldeditorlaunchurl
3
3
 
4
-
5
-
6
4
  url = "file://" + @a_viewfoldlink.to_s.strip
7
5
 
8
6
  `#{$foldeditorbrowser} "#{url}"`
9
7
 
8
+ end
9
+
10
+ def foldeditorlaunchhttp
11
+
12
+ url = @a_viewfoldlink.to_s.strip
13
+
14
+ $stderr.puts url
15
+ `#{$foldeditorbrowser} "#{url}"`
16
+
10
17
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'fileutils'
5
5
 
6
- @a_foldeditconfigurationfilename = "rwdwfoldeditor-" + RwdFoldEditorVersion + ".cnf"
6
+ @a_foldeditconfigurationfilename = "rwdwfoldeditor.cnf"
7
7
 
8
8
 
9
9
  begin # exception trapped block
@@ -1,7 +1,7 @@
1
1
  # this method loads the on screen variables into the running class
2
2
  def loadrwdfoldeditorconfigurationvariables
3
3
 
4
- tmpfilename = "rwdwfoldeditor-" + RwdFoldEditorVersion + ".cnf"
4
+ tmpfilename = "rwdwfoldeditor.cnf"
5
5
  configfiletoload = File.join(ConfigurationDir, tmpfilename )
6
6
  begin
7
7
  load configfiletoload
@@ -1,18 +1,15 @@
1
- # this method views an existing address record
1
+ # this method views an existing record
2
2
  def loadfolddocument
3
3
 
4
4
  require 'fileutils'
5
5
 
6
-
7
6
  begin # exception trapped block
8
7
 
9
-
10
8
  fileName = @a_viewfoldlink
11
9
 
12
10
  fd = File.open(fileName,"r")
13
11
  @folddocumentresult = fd.read
14
-
15
-
12
+
16
13
  fd.close
17
14
  rescue SystemCallError, StandardError
18
15
  $stderr.print "system call error: " + $!
@@ -0,0 +1,32 @@
1
+ # this method views next record
2
+
3
+ def loadnextfoldnote
4
+ if @a_viewfoldlink > ""
5
+ if @a_viewfoldlinkfile
6
+ if !@a_viewfoldlinkfile.empty? # a fold link file has been selected
7
+
8
+ fileName = File.join($rwdfoldeditor_directory, @a_viewfoldlinkfile.to_s.strip)
9
+ tmpfilearray = []
10
+ begin
11
+ File.open(fileName).each { |line|
12
+ if ! line.strip.empty?
13
+ tmpfilearray << line.strip
14
+ end
15
+ }
16
+ rescue
17
+ if $DEBUG
18
+ $stderr.puts "file error in dispfoldlinks"
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ tmpindex = tmpfilearray.index(@a_viewfoldlink.to_s.strip)
25
+ $stderr.puts tmpindex.to_s
26
+ if tmpfilearray.length > tmpindex + 1
27
+ @a_viewfoldlink = tmpfilearray[tmpindex+1].to_s.strip
28
+
29
+ loadfolddocument # load the file
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # this method views next record
2
+
3
+ def loadprevfoldnote
4
+ if @a_viewfoldlink > ""
5
+ if @a_viewfoldlinkfile
6
+ if !@a_viewfoldlinkfile.empty? # a fold link file has been selected
7
+
8
+ fileName = File.join($rwdfoldeditor_directory, @a_viewfoldlinkfile.to_s.strip)
9
+ tmpfilearray = []
10
+ begin
11
+ File.open(fileName).each { |line|
12
+ if ! line.strip.empty?
13
+ tmpfilearray << line.strip
14
+ end
15
+ }
16
+ rescue
17
+ if $DEBUG
18
+ $stderr.puts "file error in dispfoldlinks"
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ tmpindex = tmpfilearray.index(@a_viewfoldlink.to_s.strip)
25
+ $stderr.puts tmpindex.to_s
26
+ if tmpindex - 1 > -1
27
+ @a_viewfoldlink = tmpfilearray[tmpindex - 1].to_s.strip
28
+
29
+ loadfolddocument # load the file
30
+ end
31
+ end
32
+ end
@@ -19,10 +19,18 @@ def rwddisplayfoldlinks
19
19
  else
20
20
  fileName = File.join($rwdfoldeditor_directory,"default.fld")
21
21
  end
22
- tmpfilearray = []
22
+ tmpfilearray = []
23
+ begin
23
24
  File.open(fileName).each { |line|
24
- tmpfilearray << line.strip
25
- }
25
+ if ! line.strip.empty?
26
+ tmpfilearray << line.strip
27
+ end
28
+ }
29
+ rescue
30
+ if $DEBUG
31
+ $stderr.puts "file error in dispfoldlinks"
32
+ end
33
+ end
26
34
 
27
35
  @a_displayfoldlinks01 = tmpfilearray.entries.rwd_method("fillziptoinstallnamex")
28
36
  @displayfoldlinkoptions = tmpfilearray.rwd_options
@@ -3,7 +3,7 @@
3
3
  require 'fileutils'
4
4
 
5
5
 
6
- newname = "rwdwfoldeditor-" + RwdFoldEditorVersion + ".cnf" # grab the filename to create
6
+ newname = "rwdwfoldeditor.cnf" # grab the filename to create
7
7
  newdata = @a_foldeditconfigurationfile
8
8
 
9
9
 
@@ -28,9 +28,8 @@ def initiateapplet(nametextlocal)
28
28
 
29
29
  debuginitiate = 0
30
30
 
31
- if $DEBUG
32
- $stderr.puts "starting config load with: #{nametextlocal}"
33
- end
31
+ $rwdtinkerlog.info "initiateapplet: starting config load with: #{nametextlocal}"
32
+
34
33
 
35
34
 
36
35
  Dir.chdir($progdir ) #changes the current working directory
@@ -48,10 +47,10 @@ begin
48
47
 
49
48
 
50
49
  rescue
51
-
52
- if $DEBUG
53
- $stderr.puts "error in initiateapplets - config load"
54
- end
50
+
51
+ $rwdtinkerlog.error "initiateapplet: error in initiateapplets - config load"
52
+
53
+
55
54
  debuginitiate += 1
56
55
  end
57
56
  $tempdoc = " "
@@ -178,52 +177,54 @@ $rwd_gui_tinker = $tempdoc
178
177
 
179
178
  rescue
180
179
  $rwd_gui_tinker = tempguistorage # restore old gui
181
- if $DEBUG
182
- $stderr.puts "error in initiateapplets - gui building"
183
- end
180
+
181
+ $rwdtinkerlog.error "error in initiateapplets - gui building"
182
+
184
183
 
185
184
  debuginitiate += 1
186
185
  end
187
186
 
188
187
  begin # error trap
189
- # now load in the code files
188
+ # now load in the code files
190
189
 
191
- $tempdoc = ""
192
- tempcodeinstallline = ""
190
+ $tempdoc = ""
191
+ tempcodeinstallline = ""
193
192
 
194
- @fileName = "installed/" + nametextlocal + ".inf"
193
+ @fileName = "installed/" + nametextlocal + ".inf"
194
+
195
+ $rwdtinkerlog.debug "initateapplets: loading file: #{@fileName}"
195
196
 
196
- tmpfilearray = File.readlines(@fileName)
197
+ tmpfilearray = File.readlines(@fileName)
197
198
 
198
- tmpfilearray.each do |line|
199
+ tmpfilearray.each do |line|
199
200
 
200
- tempcodeinstallline = line.chomp
201
- if tempcodeinstallline.include?('code/')
202
- findfiles(tempcodeinstallline + "/**")
203
- tempcoderesult = eval( $tempdoc ) # read the program code and evaluate
204
- end
205
- end
201
+ tempcodeinstallline = line.chomp
202
+ if tempcodeinstallline.include?('code/')
203
+ findfiles(tempcodeinstallline + "/**")
204
+ tempcoderesult = eval( $tempdoc ) # read the program code and evaluate
205
+ end
206
+ end
206
207
 
207
208
 
208
209
  rescue
209
- if $DEBUG
210
- $stderr.puts "error in initiateapplets - code building"
211
- end
210
+
211
+ $rwdtinkerlog.error "error in initiateapplets - code building"
212
+
212
213
  debuginitiate += 1
213
214
 
214
215
 
215
216
  end
216
217
 
217
- setuphelpaboutoptions # update the help about list
218
- setuptinkerdocuments # update the document pull down list
219
- runhelpwindow # update the help menu
220
- showjumplinkoptions # update the application link menu
221
- runrwdtinkerbackwindow # back to applet window
222
-
223
- # resultend = tempcodeinstallline .index("\n",resultstart)
224
- tempresult = @fileName
218
+ setuphelpaboutoptions # update the help about list
219
+ setuptinkerdocuments # update the document pull down list
220
+ runhelpwindow # update the help menu
221
+ showjumplinkoptions # update the application link menu
222
+ runrwdtinkerbackwindow # back to applet window
223
+
224
+ # resultend = tempcodeinstallline .index("\n",resultstart)
225
+ tempresult = @fileName
225
226
 
226
- return " applet loading successful " + tempresult
227
+ return " applet loading successful " + tempresult
227
228
 
228
229
 
229
230
 
@@ -13,16 +13,18 @@ def installgemapplet
13
13
  zf.extract(entry.to_s, entry.to_s)
14
14
  }
15
15
 
16
- rescue
16
+ rescue
17
17
 
18
- if $DEBUG
19
- $stderr.puts "unzip error - applet may not be installed correctly"
20
- end
21
- @installapplettext = " .. "
18
+ $rwdtinkerlog.error "installgemapplet: unzip error - applet may not be installed correctly"
22
19
 
23
- end # exception rescue
20
+ @installapplettext = " .. "
24
21
 
25
- @nametextbase = File.basename(nametext)
22
+ end # exception rescue
23
+
24
+ @rwd_ignore_vars << @nametextbase << @returninitiateresults << @installapplettext
25
+ tmpnametext = File.basename(nametext)
26
+ tmpnametext.chop!; tmpnametext.chop!; tmpnametext.chop!; tmpnametext.chop!
27
+ @nametextbase = tmpnametext.chop!
26
28
  @returninitateresults = initiateapplet(@nametextbase)
27
29
  @installapplettext = Message[:applet_installed] + " " + @returninitateresults
28
30
 
@@ -5,8 +5,14 @@ def fillziptoinstallname(inffile)
5
5
 
6
6
  end
7
7
 
8
- def listzipfilestoinstall
9
- startlangdir = File.join($progdir, $zipslocation )
8
+ def listzipfilestoinstall
9
+
10
+ if $zipslocation.slice(0,1) == "/" || $zipslocation.include?(":")
11
+ startlangdir = $zipslocation
12
+ else
13
+ startlangdir = File.join($progdir, $zipslocation )
14
+ end
15
+
10
16
  #get a list of the files and subdirectories on the starting directory only
11
17
 
12
18
 
@@ -24,14 +24,14 @@
24
24
  def removeappletvariables(tempremovename)
25
25
 
26
26
  begin # exception trapped block
27
- if $DEBUG
28
- $stderr.puts "in removeappletvariables"
29
- end
27
+
28
+ $rwdtinkerlog.info "in removeappletvariables"
29
+
30
30
  # removefileinf = File.open(tempremove){|f| f.read}
31
31
 
32
- temp = tempremovename.gsub("-","_")
33
- removemethod = temp.gsub(".","_")
34
-
32
+
33
+ removemethod = tempremovename
34
+
35
35
 
36
36
  send "#{removemethod}"
37
37
 
@@ -0,0 +1,13 @@
1
+ def rwdtinkerrunviewlog
2
+ require 'lib/rwdtinker/rwdtinkertools'
3
+
4
+ if @a_rwdtinkerlognumber == nil
5
+ @a_rwdtinkerlognumber = 11
6
+ @returnlogdisplay = RwdtinkerTools.tail("rwd_files/log/rwdtinker.log",@a_rwdtinkerlognumber.to_i)
7
+
8
+ else
9
+ @returnlogdisplay = RwdtinkerTools.tail("rwd_files/log/rwdtinker.log",@a_rwdtinkerlognumber.to_i)
10
+
11
+ end
12
+ end
13
+
@@ -1,4 +1,4 @@
1
- ##VERSION:1.76
1
+ ##VERSION: (1.80)
2
2
  ConfigurationDir = "configuration" # for use in program - init.rb has this value without using this constant
3
3
  CodeName = "rwdtinker"
4
4
  CodeNameFile = CodeName + ".rb"
@@ -7,12 +7,8 @@ LangDir = "lang"
7
7
  CodeDir = "code"
8
8
  GuiDir = "gui"
9
9
  $help_topic = "general_help"
10
- $helptopicsarray = [ "general_help","network_help"]
11
- $prevouswindow ="main"
12
- $rwdcontrolports =["13713","13714","13715","13716","13717","13718"] # remote control code not actived 2007
10
+ $prevouswindow ="main"
11
+ $rwdcontrolports =["13713","13714","13715","13716"] # remote control code not actived 2007
13
12
  $port = 7705
14
- $rwdjumplink = ["helpscreen","tinkerbackwindow","returntomain","opendocuments","editconfiguration"]
15
- Browser_Exe = 'mozilla '
16
- $tinkerdocumentsarray +=["HowTo_Tinker.txt","rwdapplications.html","RubyWebDialogs.html"]
17
- RwdTinkerVersion = "1.76"
13
+ RwdTinkerVersion = "1.80"
18
14
 
@@ -0,0 +1,14 @@
1
+ ##VERSION: (0.05)
2
+ ##NAME: ($rwdfoldeditor_directory):(0.04)
3
+ $rwdfoldeditor_directory = "rwd_files"
4
+ ##NAME: ($foldeditorbrowser):(0.04)
5
+ $foldeditorbrowser = "firefox"
6
+ $testharnessarray << "rwdfoldeditor_all_tests"
7
+ $tinkerhelpaboutarray << "RwdFoldEditor"
8
+ $tinkerdocumentsarray << "HowTo_FoldEditor.txt"
9
+ ##NAME: (JumpLink.update):(0.04)
10
+ JumpLink.update(:RwdFoldEditor=>"runrwdfoldeditorwindow", :FoldBackWindow=> "rwdfoldbackwindow")
11
+ $rwdjumplink << "RwdFoldEditor" << "FoldBackWindow"
12
+ ##NAME: (RwdFoldEditorVersion):(0.05)
13
+ RwdFoldEditorVersion = "0.05"
14
+