arcadia 0.13.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/{README → README.md} +60 -53
  3. data/conf/LC/en-UK.LANG +10 -4
  4. data/conf/arcadia.conf +221 -83
  5. data/conf/arcadia.res.rb +165 -175
  6. data/conf/theme-dark.conf +1 -1
  7. data/conf/theme-dark.res.rb +0 -123
  8. data/ext/ae-breakpoints/ae-breakpoints.rb +4 -3
  9. data/ext/ae-dir-projects/ae-dir-projects.conf +27 -1
  10. data/ext/ae-dir-projects/ae-dir-projects.rb +120 -70
  11. data/ext/ae-editor/ae-editor.conf +2 -2
  12. data/ext/ae-editor/ae-editor.rb +610 -303
  13. data/ext/ae-file-history/ae-file-history.rb +60 -39
  14. data/ext/ae-output/ae-output.rb +52 -27
  15. data/ext/ae-ruby-debug/ae-ruby-debug.conf +3 -1
  16. data/ext/ae-ruby-debug/ae-ruby-debug.rb +18 -11
  17. data/ext/ae-search-in-files/ae-search-in-files.conf +2 -2
  18. data/ext/ae-search-in-files/ae-search-in-files.rb +124 -77
  19. data/ext/ae-shell/ae-shell.conf +1 -1
  20. data/ext/ae-shell/ae-shell.rb +18 -81
  21. data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +78 -81
  22. data/ext/ae-term/ae-term.rb +9 -7
  23. data/lib/a-commons.rb +125 -17
  24. data/lib/a-contracts.rb +6 -2
  25. data/lib/a-core.rb +441 -405
  26. data/lib/a-tkcommons.rb +1237 -45
  27. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ArrowButton.html +0 -0
  28. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/BWidget.html +0 -0
  29. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Button.html +0 -0
  30. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ButtonBox.html +0 -0
  31. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ComboBox.html +0 -0
  32. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Dialog.html +0 -0
  33. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/DragSite.html +0 -0
  34. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/DropSite.html +0 -0
  35. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/DynamicHelp.html +0 -0
  36. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Entry.html +0 -0
  37. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Label.html +0 -0
  38. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/LabelEntry.html +0 -0
  39. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/LabelFrame.html +0 -0
  40. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ListBox.html +0 -0
  41. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/MainFrame.html +0 -0
  42. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/MessageDlg.html +0 -0
  43. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/NoteBook.html +0 -0
  44. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/PagesManager.html +0 -0
  45. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/PanedWindow.html +0 -0
  46. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/PanelFrame.html +0 -0
  47. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/PasswdDlg.html +0 -0
  48. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ProgressBar.html +0 -0
  49. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ProgressDlg.html +0 -0
  50. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ScrollView.html +0 -0
  51. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ScrollableFrame.html +0 -0
  52. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ScrolledWindow.html +0 -0
  53. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/SelectColor.html +0 -0
  54. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/SelectFont.html +0 -0
  55. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Separator.html +0 -0
  56. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/SpinBox.html +0 -0
  57. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/StatusBar.html +0 -0
  58. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/TitleFrame.html +0 -0
  59. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Tree.html +0 -0
  60. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Widget.html +0 -0
  61. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/contents.html +0 -0
  62. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/index.html +0 -0
  63. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/navtree.html +0 -0
  64. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/options.htm +0 -0
  65. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/CHANGES.txt +0 -0
  66. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/ChangeLog +65 -0
  67. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/LICENSE.txt +0 -0
  68. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/README.txt +0 -0
  69. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/arrow.tcl +0 -0
  70. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/bitmap.tcl +0 -0
  71. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/button.tcl +0 -2
  72. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/buttonbox.tcl +0 -0
  73. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/color.tcl +0 -0
  74. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/combobox.tcl +40 -16
  75. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/basic.tcl +0 -0
  76. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/bwidget.xbm +0 -0
  77. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/demo.tcl +0 -0
  78. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/dnd.tcl +0 -0
  79. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/manager.tcl +0 -0
  80. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/select.tcl +0 -0
  81. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/tmpldlg.tcl +0 -0
  82. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/tree.tcl +0 -0
  83. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/x1.xbm +0 -0
  84. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/dialog.tcl +0 -0
  85. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/dragsite.tcl +0 -0
  86. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/dropsite.tcl +0 -0
  87. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/dynhelp.tcl +3 -0
  88. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/entry.tcl +0 -0
  89. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/font.tcl +0 -0
  90. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/bold.gif +0 -0
  91. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/copy.gif +0 -0
  92. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/cut.gif +0 -0
  93. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/dragfile.gif +0 -0
  94. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/dragicon.gif +0 -0
  95. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/error.gif +0 -0
  96. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/file.gif +0 -0
  97. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/folder.gif +0 -0
  98. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/hourglass.gif +0 -0
  99. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/info.gif +0 -0
  100. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/italic.gif +0 -0
  101. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/minus.xbm +0 -0
  102. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/new.gif +0 -0
  103. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/opcopy.xbm +0 -0
  104. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/open.gif +0 -0
  105. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/openfold.gif +0 -0
  106. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/oplink.xbm +0 -0
  107. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/opmove.xbm +0 -0
  108. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/overstrike.gif +0 -0
  109. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/palette.gif +0 -0
  110. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/passwd.gif +0 -0
  111. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/paste.gif +0 -0
  112. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/plus.xbm +0 -0
  113. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/print.gif +0 -0
  114. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/question.gif +0 -0
  115. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/redo.gif +0 -0
  116. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/save.gif +0 -0
  117. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/target.xbm +0 -0
  118. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/underline.gif +0 -0
  119. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/undo.gif +0 -0
  120. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/warning.gif +0 -0
  121. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/init.tcl +0 -0
  122. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/label.tcl +0 -2
  123. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/labelentry.tcl +0 -3
  124. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/labelframe.tcl +0 -2
  125. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/da.rc +1 -0
  126. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/de.rc +1 -0
  127. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/en.rc +1 -0
  128. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/es.rc +1 -0
  129. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/fr.rc +1 -0
  130. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/hu.rc +1 -0
  131. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/nl.rc +1 -0
  132. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/no.rc +59 -58
  133. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/pl.rc +0 -0
  134. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/listbox.tcl +17 -4
  135. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/mainframe.tcl +0 -0
  136. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/messagedlg.tcl +0 -0
  137. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/notebook.tcl +0 -0
  138. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/pagesmgr.tcl +0 -0
  139. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/panedw.tcl +0 -0
  140. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/panelframe.tcl +0 -0
  141. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/passwddlg.tcl +0 -0
  142. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/pkgIndex.tcl +2 -2
  143. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/progressbar.tcl +0 -0
  144. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/progressdlg.tcl +0 -0
  145. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/scrollframe.tcl +6 -6
  146. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/scrollview.tcl +0 -0
  147. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/scrollw.tcl +1 -0
  148. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/separator.tcl +0 -0
  149. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/spinbox.tcl +0 -0
  150. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/statusbar.tcl +0 -0
  151. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/tests/entry.test +2 -2
  152. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/titleframe.tcl +0 -0
  153. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/tree.tcl +0 -0
  154. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/utils.tcl +0 -0
  155. data/tcl/bwidget-1.9.8/widget-old.tcl +1651 -0
  156. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/widget.tcl +64 -36
  157. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/wizard.tcl +0 -0
  158. data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/xpm2image.tcl +0 -0
  159. metadata +196 -195
@@ -13,7 +13,7 @@ class SearchInFiles < ArcadiaExt
13
13
  def on_before_search_in_files(_event)
14
14
  if _event.what.nil?
15
15
  if _event.dir
16
- @find.e_dir.text(_event.dir)
16
+ @find.e_dir.value=_event.dir
17
17
  end
18
18
  @find.show
19
19
  end
@@ -44,42 +44,56 @@ class SearchInFiles < ArcadiaExt
44
44
  end
45
45
  }
46
46
 
47
- for method in [:e_what_entry, :e_filter_entry, :e_dir_entry] do
47
+ #for method in [:e_what_entry, :e_filter_entry, :e_dir_entry] do
48
+ for method in [:e_what, :e_filter, :e_dir] do
48
49
  @find.send(method).bind_append('KeyPress') { |*args| enter_proc.call *args } # ltodo why can't we pass it in like &enter_proc?
49
50
  end
50
51
  @find.title(title)
51
52
  end
52
53
  private :create_find
53
54
 
54
- def update_what_combo(_txt)
55
- values = @find.e_what.cget('values')
56
- if (values != nil && !values.include?(_txt))
57
- @find.e_what.insert('end', _txt)
55
+ def update_combo(_combobox=nil)
56
+ return if _combobox.nil?
57
+ values = _combobox.cget('values')
58
+ if (values != nil && !values.include?(_combobox.value))
59
+ values << _combobox.value
60
+ _combobox.values=values
58
61
  end
59
62
  end
60
63
 
61
- def update_filter_combo(_txt)
62
- values = @find.e_filter.cget('values')
63
- if (values != nil && !values.include?(_txt))
64
- @find.e_filter.insert('end', _txt)
65
- end
66
- end
64
+ # def update_what_combo(_txt)
65
+ # values = @find.e_what.cget('values')
66
+ # if (values != nil && !values.include?(_txt))
67
+ # values << @find.e_what.value
68
+ # @find.e_what.values=values
69
+ # #@find.e_what.insert('end', _txt)
70
+ # end
71
+ # end
67
72
 
68
- def update_dir_combo(_txt)
69
- values = @find.e_dir.cget('values')
70
- if (values != nil && !values.include?(_txt))
71
- @find.e_dir.insert('end', _txt)
72
- end
73
- end
73
+ # def update_filter_combo(_txt)
74
+ # values = @find.e_filter.cget('values')
75
+ # if (values != nil && !values.include?(_txt))
76
+ # values << @find.e_filter.value
77
+ # @find.e_filter.insert('end', _txt)
78
+ # #@find.e_filter.insert('end', _txt)
79
+ # end
80
+ # end
81
+ #
82
+ # def update_dir_combo(_txt)
83
+ # values = @find.e_dir.cget('values')
84
+ # if (values != nil && !values.include?(_txt))
85
+ # @find.e_dir.insert('end', _txt)
86
+ # end
87
+ # end
74
88
 
75
89
  def update_all_combo
76
- update_what_combo(@find.e_what.text)
77
- update_filter_combo(@find.e_filter.text)
78
- update_dir_combo(@find.e_dir.text)
90
+ update_combo(@find.e_what)
91
+ update_combo(@find.e_filter)
92
+ update_combo(@find.e_dir)
79
93
  end
80
94
 
81
95
  def do_find
82
- return if @find.e_what.text.strip.length == 0 || @find.e_filter.text.strip.length == 0 || @find.e_dir.text.strip.length == 0
96
+ return if @find.e_what.value.strip.length == 0 || @find.e_filter.value.strip.length == 0 || @find.e_dir.value.strip.length == 0
83
97
  @find.hide
84
98
  if !defined?(@search_output)
85
99
  @search_output = SearchOutput.new(self)
@@ -87,17 +101,15 @@ class SearchInFiles < ArcadiaExt
87
101
  self.frame.show_anyway
88
102
  Thread.new do
89
103
  begin
90
- MonitorLastUsedDir.set_last @find.e_dir.text # save it away TODO make it into a message
91
- _search_title = Arcadia.text('ext.search_in_files.search_result_title', [@find.e_what.text, @find.e_dir.text, @find.e_filter.text])
92
- _filter = @find.e_dir.text+'/**/'+@find.e_filter.text
104
+ MonitorLastUsedDir.set_last @find.e_dir.value # save it away TODO make it into a message
105
+ _search_title = Arcadia.text('ext.search_in_files.search_result_title', [@find.e_what.value, @find.e_dir.value, @find.e_filter.value])
106
+ _filter = @find.e_dir.value+'/**/'+@find.e_filter.value
93
107
  _files = Dir[_filter]
94
108
  _node = @search_output.new_result(_search_title, _files.length)
95
109
  progress_stop=false
96
- progress_bar = TkProgressframe.new(self.arcadia.layout.root, _files.length)
97
- progress_bar.title(Arcadia.text('ext.search_in_files.progress.title'))
98
- progress_bar.on_cancel=proc{progress_stop=true}
99
- #@progress_bar.on_cancel=proc{cancel}
100
- pattern = Regexp.new(@find.e_what.text)
110
+ hint = "#{Arcadia.text('ext.search_in_files.progress.title')} '#{@find.e_what.value}' into '#{@find.e_dir.value}'"
111
+ progress_bar = self.frame.root.add_progress(self.frame.name, _files.length, proc{progress_stop=true}, hint)
112
+ pattern = Regexp.new(@find.e_what.value)
101
113
  _files.each do |_filename|
102
114
  next if File.ftype(_filename) != 'file'
103
115
  begin
@@ -120,41 +132,46 @@ class SearchInFiles < ArcadiaExt
120
132
  Arcadia.console(self, 'msg'=>e.message, 'level'=>'error')
121
133
  #Arcadia.new_error_msg(self, e.message)
122
134
  ensure
123
- progress_bar.destroy if progress_bar
135
+ self.frame.root.destroy_progress(self.frame.name, progress_bar) if progress_bar
136
+ #progress_bar.destroy if progress_bar
124
137
  self.frame.show_anyway
125
138
  end
126
139
  end
127
140
  end
128
-
129
-
141
+
130
142
  end
131
143
 
132
144
  class SearchOutput
133
145
  def initialize(_ext)
134
146
  @sequence = 0
135
147
  @ext = _ext
136
- left_frame = TkFrame.new(@ext.frame.hinner_frame, Arcadia.style('panel')).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
137
- #right_frame = TkFrame.new(@ext.frame.hinner_frame, Arcadia.style('panel')).place('x' => '25','y' => '0','relwidth' => '1', 'relheight' => '1', 'width' => '-25')
148
+ # left_frame = TkFrame.new(@ext.frame.hinner_frame, Arcadia.style('panel')).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
138
149
  @results = {}
139
150
  _open_file = proc do |tree, sel|
140
151
  n_parent, n = sel.split('@@@')
141
152
  Arcadia.process_event(OpenBufferTransientEvent.new(self,'file'=>@results[n_parent][n][0], 'row'=>@results[n_parent][n][1])) if n && @results[n_parent][n]
142
153
  end
143
154
  @tree = BWidgetTreePatched.new(@ext.frame.hinner_frame, Arcadia.style('treepanel')){
155
+ #@tree = BWidgetTreePatched.new(@ext.hinner_dialog, Arcadia.style('treepanel')){
156
+ #@tree = BWidgetTreePatched.new(@ext.hinner_splitted_dialog, Arcadia.style('treepanel')){
144
157
  selectcommand(_open_file)
145
158
  deltay 15
146
159
  }
147
- @tree.extend(TkScrollableWidget).show(25,0)
160
+ # @tree.extend(TkScrollableWidget).show(25,0)
161
+ @tree.extend(TkScrollableWidget).show(0,0)
148
162
 
149
- _proc_clear = proc{clear_tree}
163
+ # _proc_clear = proc{clear_tree}
164
+
165
+ _ext.frame.root.add_button(_ext.name, Arcadia.text('ext.search_in_files.button.clear.hint'), proc{clear_tree}, CLEAR_GIF) if _ext
166
+
150
167
 
151
- @button_u = Tk::BWidget::Button.new(left_frame, Arcadia.style('toolbarbutton')){
152
- image Arcadia.image_res(CLEAR_GIF)
153
- helptext 'ext.search_in_files.button.clear.hint'
154
- command _proc_clear
155
- relief 'groove'
156
- pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
157
- }
168
+ # @button_u = Tk::BWidget::Button.new(left_frame, Arcadia.style('toolbarbutton')){
169
+ # image Arcadia.image_res(CLEAR_GIF)
170
+ # helptext 'ext.search_in_files.button.clear.hint'
171
+ # command _proc_clear
172
+ # relief 'groove'
173
+ # pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
174
+ # }
158
175
 
159
176
  @found_color=Arcadia.conf('activeforeground')
160
177
  @not_found_color= Arcadia.conf('hightlight.comment.foreground')
@@ -225,7 +242,7 @@ end
225
242
 
226
243
  class FindFrame < TkFloatTitledFrame
227
244
  attr_reader :e_what, :e_filter, :e_dir
228
- attr_reader :e_what_entry, :e_filter_entry, :e_dir_entry
245
+ # attr_reader :e_what_entry, :e_filter_entry, :e_dir_entry
229
246
  attr_reader :b_go
230
247
  def initialize(_parent)
231
248
  super(_parent)
@@ -236,18 +253,24 @@ class FindFrame < TkFloatTitledFrame
236
253
  place('x' => 8,'y' => y0,'height' => 19)
237
254
  }
238
255
  y0 = y0 + d
239
- @e_what = Tk::BWidget::ComboBox.new(self.frame, Arcadia.style('combobox')){
240
- editable true
256
+ #@e_what = Tk::BWidget::ComboBox.new(self.frame, Arcadia.style('combobox')){
257
+ @e_what = Arcadia.wf.combobox(self.frame){
258
+ #editable true
241
259
  justify 'left'
242
- autocomplete 'true'
243
- expand 'tab'
260
+ #autocomplete 'true'
261
+ #expand 'tab'
262
+ exportselection true
263
+ width 100
244
264
  takefocus 'true'
245
265
  place('relwidth' => 1, 'width'=>-16,'x' => 8,'y' => y0,'height' => 19)
246
266
  }
247
- @e_what_entry = TkWinfo.children(@e_what)[0]
248
- # this means "after each key press
249
- #@e_what_entry.bind_append("1",proc{Arcadia.process_event(InputEnterEvent.new(self,'receiver'=>@e_what_entry))})
250
- @e_what_entry.extend(TkInputThrow)
267
+
268
+ @e_what.extend(TkInputThrow)
269
+
270
+
271
+ # @e_what_entry = TkWinfo.children(@e_what)[0]
272
+ # # this means "after each key press
273
+ # @e_what_entry.extend(TkInputThrow)
251
274
 
252
275
  y0 = y0 + d
253
276
  TkLabel.new(self.frame, Arcadia.style('label')){
@@ -256,21 +279,28 @@ class FindFrame < TkFloatTitledFrame
256
279
  }
257
280
  y0 = y0 + d
258
281
 
259
- @e_filter = Tk::BWidget::ComboBox.new(self.frame, Arcadia.style('combobox')){
260
- editable true
282
+ #@e_filter = Tk::BWidget::ComboBox.new(self.frame, Arcadia.style('combobox')){
283
+ @e_filter = Arcadia.wf.combobox(self.frame){
284
+ #editable true
261
285
  justify 'left'
262
- autocomplete 'true'
263
- expand 'tab'
286
+ #autocomplete 'true'
287
+ #expand 'tab'
288
+ exportselection true
289
+ width 100
264
290
  takefocus 'true'
265
291
  place('relwidth' => 1, 'width'=>-16,'x' => 8,'y' => y0,'height' => 19)
266
292
  }
267
- @e_filter_entry = TkWinfo.children(@e_filter)[0]
268
- #@e_filter_entry.bind_append("1",proc{Arcadia.process_event(InputEnterEvent.new(self,'receiver'=>@e_filter_entry))})
269
- @e_filter_entry.extend(TkInputThrow)
293
+ @e_filter.extend(TkInputThrow)
294
+
295
+ # @e_filter_entry = TkWinfo.children(@e_filter)[0]
296
+ # @e_filter_entry.extend(TkInputThrow)
297
+
298
+ @e_filter.values = ['*.rb', '*.*']
299
+ @e_filter.value = @e_filter.values[0]
300
+ # @e_filter.insert('end', '*.*')
301
+ # @e_filter.insert('end', '*.rb')
302
+ # @e_filter.text('*.rb')
270
303
 
271
- @e_filter.insert('end', '*.*')
272
- @e_filter.insert('end', '*.rb')
273
- @e_filter.text('*.rb')
274
304
  y0 = y0 + d
275
305
 
276
306
  TkLabel.new(self.frame, Arcadia.style('label')){
@@ -280,24 +310,32 @@ class FindFrame < TkFloatTitledFrame
280
310
  y0 = y0 + d
281
311
 
282
312
  _h_frame = TkFrame.new(self.frame, Arcadia.style('panel')).place('relwidth' => 1, 'width'=>-16,'x' => 8,'y' => y0,'height' => 19)
283
- @e_dir = Tk::BWidget::ComboBox.new(_h_frame, Arcadia.style('combobox')){
284
- editable true
313
+
314
+ #@e_dir = Tk::BWidget::ComboBox.new(_h_frame, Arcadia.style('combobox')){
315
+ @e_dir = Arcadia.wf.combobox(_h_frame){
316
+ #editable true
285
317
  justify 'left'
286
- autocomplete 'true'
287
- expand 'tab'
318
+ #autocomplete 'true'
319
+ #expand 'tab'
320
+ exportselection true
321
+ width 100
288
322
  takefocus 'true'
289
323
  pack('fill'=>'x')
290
324
  #pack('fill'=>'x')
291
325
  #place('relwidth' => 1, 'width'=>-16,'x' => 8,'y' => y0,'height' => 19)
292
326
  }
293
- @e_dir.text(MonitorLastUsedDir.get_last_dir)
294
- @e_dir_entry = TkWinfo.children(@e_dir)[0]
327
+ @e_dir.value = MonitorLastUsedDir.get_last_dir
328
+
329
+ # @e_dir.text(MonitorLastUsedDir.get_last_dir)
330
+ # @e_dir_entry = TkWinfo.children(@e_dir)[0]
295
331
 
296
- @b_dir = TkButton.new(@e_dir, Arcadia.style('button') ){
332
+ #@b_dir = TkButton.new(@e_dir, Arcadia.style('button') ){
333
+ @b_dir = Arcadia.wf.button(@e_dir){
297
334
  compound 'none'
298
335
  default 'disabled'
299
336
  text '...'
300
- pack('side'=>'right')
337
+ width 3
338
+ pack('side'=>'right', 'padx'=>18)
301
339
  #pack('side'=>'right','ipadx'=>5, 'padx'=>5)
302
340
  }.bind('1', proc{
303
341
  change_dir
@@ -308,7 +346,8 @@ class FindFrame < TkFloatTitledFrame
308
346
  y0 = y0 + d
309
347
  @buttons_frame = TkFrame.new(self.frame, Arcadia.style('panel')).pack('fill'=>'x', 'side'=>'bottom')
310
348
 
311
- @b_go = TkButton.new(@buttons_frame, Arcadia.style('button')){|_b_go|
349
+ #@b_go = TkButton.new(@buttons_frame, Arcadia.style('button')){|_b_go|
350
+ @b_go = Arcadia.wf.button(@buttons_frame){|_b_go|
312
351
  compound 'none'
313
352
  default 'disabled'
314
353
  text Arcadia.text('ext.search_in_files.search.button.find')
@@ -316,13 +355,19 @@ class FindFrame < TkFloatTitledFrame
316
355
  #justify 'center'
317
356
  pack('side'=>'right','ipadx'=>5, 'padx'=>5)
318
357
  }
319
- place('x'=>100,'y'=>100,'height'=> 220,'width'=> 300)
358
+ place('x'=>100,'y'=>100,'height'=> 220,'width'=> 350)
320
359
  end
321
360
 
322
361
  def change_dir
323
- _d = Tk.chooseDirectory('initialdir'=>@e_dir.text,'mustexist'=>true)
362
+ #_d = Tk.chooseDirectory('initialdir'=>@e_dir.text,'mustexist'=>true)
363
+ _d = Arcadia.select_dir_dialog(@e_dir.value, true)
324
364
  if _d && _d.strip.length > 0
325
- @e_dir.text(_d)
365
+ @e_dir.value = _d
366
+ values = @e_dir.values
367
+ if (values != nil && !values.include?(_d))
368
+ values << _d
369
+ @e_dir.values=values
370
+ end
326
371
  end
327
372
  end
328
373
 
@@ -330,7 +375,9 @@ class FindFrame < TkFloatTitledFrame
330
375
  super
331
376
  self.focus
332
377
  @e_what.focus
333
- @e_what_entry.select_throw
334
- @e_what_entry.selection_range(0,'end')
378
+ @e_what.select_throw
379
+ @e_what.selection_range(0,'end')
380
+ # @e_what_entry.select_throw
381
+ # @e_what_entry.selection_range(0,'end')
335
382
  end
336
383
  end
@@ -4,7 +4,7 @@ require=ext/ae-shell/ae-shell
4
4
  class=Shell
5
5
  stdout_blocking=no
6
6
  stderr_blocking=yes
7
- win|mingw::1.8:@:gems=win32-process,ruby-wmi
7
+ WINDOWS::1.8:@:gems=win32-process,ruby-wmi
8
8
 
9
9
  #:::::::::::::::: output ::::::::::::::::::::::<begin>
10
10
  #ruby=ruby
@@ -136,7 +136,7 @@ class Shell < ArcadiaExt
136
136
  if _event.cmd
137
137
  #p "_event.cmd = #{_event.cmd}"
138
138
  begin
139
- output_mark = Arcadia.console(self,'msg'=>"Running #{_event.title} as #{_event.lang}...", 'level'=>'debug') # info?
139
+ output_mark = Arcadia.console(self,'msg'=>"Running #{_event.title} as #{_event.lang}...", 'level'=>'info') # info?
140
140
  start_time = Time.now
141
141
  @arcadia['pers']['run.file.last']=_event.file if _event.persistent
142
142
  @arcadia['pers']['run.cmd.last']=_event.cmd if _event.persistent
@@ -183,57 +183,17 @@ class Shell < ArcadiaExt
183
183
  Thread.new {
184
184
  Thread.current.abort_on_exception = true
185
185
  begin
186
- # th = Thread.current
187
186
  fi = nil
188
187
  fi_pid = nil
189
- # abort_action = proc{
190
- # ArcadiaUtils.unix_child_pids(fi_pid).each {|pid|
191
- # Process.kill(9,pid.to_i)
192
- # }
193
- # Process.kill(9,fi_pid.to_i)
194
- # }
195
-
196
- # alive_check = proc{
197
- # num = `ps -p #{fi_pid}|wc -l` if fi_pid
198
- # num.to_i > 1 && fi_pid
199
- # }
200
-
201
-
202
- #Arcadia.console(self,'msg'=>"#{th}", 'level'=>'debug', 'abort_action'=>abort_action)
203
188
 
204
189
  Open3.popen3(_cmd_){|stdin, stdout, stderr, th|
205
190
  fi_pid = th.pid if th
206
- output_mark = Arcadia.console(self,'msg'=>" [pid #{fi_pid}]", 'level'=>'debug', 'mark'=>output_mark, 'append'=>true)
191
+ output_mark = Arcadia.console(self,'msg'=>" [pid #{fi_pid}]", 'level'=>'info', 'mark'=>output_mark, 'append'=>true)
207
192
  alive_check = proc{th.status != false}
208
193
  abort_action = proc{Process.kill(9,fi_pid.to_i)}
209
194
 
210
195
  Arcadia.process_event(SubProcessEvent.new(self, 'pid'=>fi_pid, 'name'=>_event.file,'abort_action'=>abort_action, 'alive_check'=>alive_check))
211
196
 
212
- # if stdout
213
- # if @stdout_blocking
214
- # output_dump = stdout.read
215
- # if output_dump && output_dump.length > 0
216
- # output_mark = Arcadia.console(self,'msg'=>output_dump, 'level'=>'error', 'mark'=>output_mark)
217
- # _event.add_result(self, 'output'=>output_dump)
218
- # end
219
- # else
220
- # stdout.each do |output_dump|
221
- # p "th.status = #{th.status}"
222
- # output_mark = Arcadia.console(self,'msg'=>output_dump, 'level'=>'debug', 'mark'=>output_mark)
223
- # _event.add_result(self, 'output'=>output_dump)
224
- # if stdin && !stdin.closed? && th.status != false
225
- # begin
226
- # stdin.puts(Arcadia.console_input(self))
227
- # rescue Exception => e
228
- # output_mark = Arcadia.console(self,'msg'=>e.to_s, 'level'=>'debug', 'mark'=>output_mark)
229
- # end
230
- # end
231
- # end
232
- # end
233
- # end
234
-
235
-
236
-
237
197
  to = Thread.new(stdout) do |tout|
238
198
  begin
239
199
  while (line = tout.gets)
@@ -251,7 +211,7 @@ class Shell < ArcadiaExt
251
211
  while (tin && !tin.closed? && !input_break)
252
212
  if th.status != false && to.status == 'sleep'
253
213
  begin
254
- input = Arcadia.console_input(self)
214
+ input = Arcadia.console_input(self, fi_pid)
255
215
  tin.puts(input) if input != nil
256
216
  sleep(0.1)
257
217
  rescue Exception => e
@@ -264,9 +224,9 @@ class Shell < ArcadiaExt
264
224
  rescue Exception => e
265
225
  output_mark = Arcadia.console(self,'msg'=>e.to_s, 'level'=>'debug', 'mark'=>output_mark)
266
226
  end
267
- end
227
+ end
268
228
 
269
- te = Thread.new(stderr) do |terr|
229
+ te = Thread.new(stderr) do |terr|
270
230
  begin
271
231
  while (line = terr.gets)
272
232
  output_mark = Arcadia.console(self,'msg'=>line, 'level'=>'error', 'mark'=>output_mark)
@@ -278,43 +238,20 @@ class Shell < ArcadiaExt
278
238
  rescue Exception => e
279
239
  output_mark = Arcadia.console(self,'msg'=>e.to_s, 'level'=>'debug', 'mark'=>output_mark)
280
240
  end
281
- end
282
-
283
- to.join
284
- te.join
285
- input_event = Arcadia.console_input_event
286
- if input_event != nil
287
- input_event.break
288
- input_break = true
289
- ti.join
290
- else
291
- ti.exit
292
- end
293
- te.exit
294
-
295
- # if stderr
296
- # if @stderr_blocking
297
- # current_buffer = '<<current buffer>>'
298
- # output_dump = stderr.read
299
- # if output_dump && output_dump.length > 0
300
- # if !_event.persistent
301
- # output_dump.gsub!(_event.file, current_buffer)
302
- # end
303
- # output_mark = Arcadia.console(self,'msg'=>output_dump, 'level'=>'error', 'mark'=>output_mark)
304
- # _event.add_result(self, 'output'=>output_dump)
305
- # end
306
- # else
307
- # stderr.each do |output_dump|
308
- # if !_event.persistent
309
- # output_dump.gsub!(_event.file, current_buffer)
310
- # end
311
- # output_mark = Arcadia.console(self,'msg'=>output_dump, 'level'=>'error', 'mark'=>output_mark)
312
- # _event.add_result(self, 'output'=>output_dump)
313
- # end
314
- # end
315
- # end
241
+ end
242
+ to.join
243
+ te.join
244
+ input_event = Arcadia.console_input_event
245
+ if input_event != nil
246
+ input_event.break
247
+ input_break = true
248
+ ti.join
249
+ else
250
+ ti.exit
251
+ end
252
+ te.exit
316
253
  }
317
- output_mark = Arcadia.console(self,'msg'=>"\n"+Arcadia.text('ext.shell.done.1', [_event.title]), 'level'=>'debug', 'mark'=>output_mark)
254
+ output_mark = Arcadia.console(self,'msg'=>"\n"+Arcadia.text('ext.shell.done.1', [_event.title]), 'level'=>'info', 'mark'=>output_mark)
318
255
 
319
256
 
320
257
  # open(_cmd_, "r"){|f|