arcadia 0.12.1 → 0.12.2
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.
- data/README +9 -3
- data/bin/arcadia +1 -0
- data/conf/LC/en-UK.LANG +2 -2
- data/conf/arcadia.conf +1 -1
- data/ext/ae-editor/ae-editor.rb +4 -4
- data/ext/ae-file-history/ae-file-history.rb +3 -3
- data/ext/ae-ruby-debug/ae-ruby-debug.conf +2 -1
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +35 -114
- data/ext/ae-shell/ae-shell.rb +3 -0
- data/lib/a-commons.rb +4 -0
- data/lib/a-contracts.rb +1 -1
- data/lib/a-core.rb +57 -32
- metadata +10 -5
data/README
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
= Arcadia Ide
|
2
|
-
version 0.12.
|
2
|
+
version 0.12.2
|
3
3
|
|
4
4
|
by Antonio Galeone
|
5
|
-
on
|
5
|
+
on Apr 28, 2013
|
6
6
|
|
7
7
|
|
8
8
|
== About
|
@@ -16,7 +16,12 @@ Some of Arcadia ide project features include:
|
|
16
16
|
* Debugging support
|
17
17
|
* Highly extensibility architecture.
|
18
18
|
|
19
|
+
|
19
20
|
== News
|
21
|
+
|
22
|
+
[0.12.2]
|
23
|
+
- this release adds support to debugger gem and fixes minor bugs
|
24
|
+
|
20
25
|
[0.12.1]
|
21
26
|
- fixed bug in file-history
|
22
27
|
|
@@ -34,6 +39,7 @@ Some of Arcadia ide project features include:
|
|
34
39
|
- bugs fixed and optimizations
|
35
40
|
|
36
41
|
== Dependencies
|
42
|
+
|
37
43
|
- rubygems
|
38
44
|
- ruby-tk
|
39
45
|
- tcl/tk
|
@@ -43,7 +49,7 @@ Some of Arcadia ide project features include:
|
|
43
49
|
- xdotool (linux, optional)
|
44
50
|
- ack (optional)
|
45
51
|
- gem coderay (> 1.0)
|
46
|
-
- gem ruby-debug (
|
52
|
+
- gem ruby-debug (debugger on ruby 1.9)
|
47
53
|
- gem win32-process (only on windows)
|
48
54
|
- gem ruby-wmi (only on windows)
|
49
55
|
|
data/bin/arcadia
CHANGED
data/conf/LC/en-UK.LANG
CHANGED
@@ -219,18 +219,18 @@ ext.ruby_debug.node.local_var.caption=Local variables
|
|
219
219
|
ext.ruby_debug.node.instance_var.caption=Instance variables
|
220
220
|
ext.ruby_debug.node.class_var.caption=Class variables
|
221
221
|
ext.ruby_debug.node.global_var.caption=Global variables
|
222
|
-
ext.ruby_debug.freeze_at=$0
|
222
|
+
ext.ruby_debug.freeze_at=$0 freezed at $1
|
223
223
|
ext.ruby_debug.node.eval_selected=Eval selected
|
224
224
|
ext.ruby_debug.server.e.on_start=Error on start server : $0:$1
|
225
225
|
ext.ruby_debug.server.e.on_kill=Error on kill : $0:$1
|
226
226
|
ext.ruby_debug.client.e.on_command=on command $0:$1
|
227
|
+
ext.ruby_debug.client.e.on_command2=Error on command $0: $1:$2
|
227
228
|
ext.ruby_debug.client.e.socket_session.1=Erron on socket session : $0
|
228
229
|
ext.ruby_debug.client.e.socket_session.2=Error on socket session : $0:$1
|
229
230
|
ext.ruby_debug.client.e.close_session=Error on close session : $0:$1
|
230
231
|
ext.ruby_debug.client.e.start_session=Error on start_session : $0:$1 $2
|
231
232
|
ext.ruby_debug.client.e.stop_session=Error on stop_session : $0:$1
|
232
233
|
ext.ruby_debug.client.e.abort_session=Debugger has finished executing: $0:$1
|
233
|
-
ext.ruby_debug.client.e.on_command=Error on command $0: $1:$2
|
234
234
|
ext.ruby_debug.client.e.raise.on_read.1=Debugged has finished executing
|
235
235
|
ext.ruby_debug.client.e.raise.on_read.2=Error: on command '$0' => $1 : $2
|
236
236
|
ext.ruby_debug.e.rdebug=Warning: Extension ae-ruby-debug depend upon rdebug command (install it or update system path!)
|
data/conf/arcadia.conf
CHANGED
@@ -252,7 +252,7 @@ hightlight.6.foreground=#007F7F
|
|
252
252
|
#class_name
|
253
253
|
hightlight.7.foreground=#0000FF
|
254
254
|
#module_name
|
255
|
-
hightlight.8.foreground=#
|
255
|
+
hightlight.8.foreground=#009999
|
256
256
|
#instance_variable
|
257
257
|
hightlight.9.foreground=#7F7F7F
|
258
258
|
#global_variable
|
data/ext/ae-editor/ae-editor.rb
CHANGED
@@ -1391,8 +1391,6 @@ class AgEditor
|
|
1391
1391
|
}
|
1392
1392
|
_width = _length*8
|
1393
1393
|
@raised_listbox.select(1)
|
1394
|
-
# p "_update_list end-->#{Time.new}"
|
1395
|
-
|
1396
1394
|
Tk.event_generate(@raised_listbox, "1") if TkWinfo.mapped?(@raised_listbox)
|
1397
1395
|
}
|
1398
1396
|
|
@@ -4596,6 +4594,8 @@ class AgMultiEditor < ArcadiaExtPlus
|
|
4596
4594
|
if _event.file
|
4597
4595
|
if _event.row
|
4598
4596
|
_index = _event.row.to_s+'.0'
|
4597
|
+
elsif !editor_exist?(_event.file) && _event.last_row
|
4598
|
+
_index = _event.last_row.to_s+'.0'
|
4599
4599
|
end
|
4600
4600
|
if _event.kind_of?(OpenBufferTransientEvent) && conf('close-last-if-not-modified')=="yes"
|
4601
4601
|
if defined?(@last_transient_file) && !@last_transient_file.nil? && @last_transient_file != _event.file
|
@@ -4610,7 +4610,7 @@ class AgMultiEditor < ArcadiaExtPlus
|
|
4610
4610
|
@last_transient_file = nil
|
4611
4611
|
end
|
4612
4612
|
end
|
4613
|
-
if _event.select_index.nil?
|
4613
|
+
if _event.select_index.nil?
|
4614
4614
|
select_index = true
|
4615
4615
|
else
|
4616
4616
|
select_index = _event.select_index
|
@@ -5256,7 +5256,7 @@ class AgMultiEditor < ArcadiaExtPlus
|
|
5256
5256
|
_exist_buffer = @tabs_file[_tab_name] != nil
|
5257
5257
|
if _exist_buffer
|
5258
5258
|
open_buffer(_tab_name)
|
5259
|
-
_text_index = nil
|
5259
|
+
# ??? _text_index = nil
|
5260
5260
|
else
|
5261
5261
|
# @tabs_file[_tab_name]= _filename
|
5262
5262
|
open_buffer(_tab_name, _basefilename, _filename)
|
@@ -240,11 +240,11 @@ class FilesHistrory < ArcadiaExt
|
|
240
240
|
end
|
241
241
|
|
242
242
|
def on_before_open_buffer(_event)
|
243
|
-
if _event.file && _event.row.nil? &&File.exist?(_event.file)
|
243
|
+
if _event.file && _event.row.nil? && File.exist?(_event.file)
|
244
244
|
if @h_stack[_event.file]
|
245
245
|
r,c = @h_stack[_event.file].split('.')
|
246
|
-
_event.
|
247
|
-
_event.
|
246
|
+
_event.last_row=r.to_i
|
247
|
+
_event.last_col=c.to_i
|
248
248
|
if _event.select_index.nil?
|
249
249
|
_event.select_index=false
|
250
250
|
end
|
@@ -10,7 +10,8 @@ class=RubyDebug
|
|
10
10
|
#gems=ruby-debug,whichr
|
11
11
|
#1.9:@:gems=ruby-debug19,whichr
|
12
12
|
gems=ruby-debug
|
13
|
-
1.9:@:gems=
|
13
|
+
1.9:@:gems=debugger
|
14
|
+
2:@:gems=debugger
|
14
15
|
#========================================
|
15
16
|
#========================================
|
16
17
|
server.host=localhost
|
@@ -180,7 +180,7 @@ class RubyDebugView
|
|
180
180
|
|
181
181
|
def build_var_panel(_frame)
|
182
182
|
_open_proc = proc do |_arg|
|
183
|
-
|
183
|
+
inspect_node(_arg) if @c_on && @nodes_to_open && @nodes_to_open.include?(_arg)
|
184
184
|
end
|
185
185
|
|
186
186
|
@tree_var = BWidgetTreePatched.new(_frame, Arcadia.style('treepanel')){
|
@@ -473,7 +473,7 @@ class RubyDebugView
|
|
473
473
|
tree_process_free
|
474
474
|
#break_list_free
|
475
475
|
end
|
476
|
-
|
476
|
+
|
477
477
|
|
478
478
|
def rdebug_client_update(_command, _result)
|
479
479
|
#Arcadia.console(self,'msg'=>"on command #{_command} => #{_result}", 'level'=>'debug')
|
@@ -824,25 +824,13 @@ class RubyDebugServer
|
|
824
824
|
end
|
825
825
|
else
|
826
826
|
@pid = Process.fork do
|
827
|
-
# pid = Process.pid
|
828
|
-
# abort_action = proc{
|
829
|
-
# ArcadiaUtils.unix_child_pids(pid).each {|pid|
|
830
|
-
# Process.kill(9,pid.to_i)
|
831
|
-
# }
|
832
|
-
# Process.kill(9,pid.to_i)
|
833
|
-
# }
|
834
|
-
#
|
835
|
-
# alive_check = proc{
|
836
|
-
# num = `ps -p #{pid}|wc -l`
|
837
|
-
# num.to_i > 1
|
838
|
-
# }
|
839
|
-
# Arcadia.process_event(SubProcessEvent.new(self,'pid'=>pid, 'name'=>"debugging :#{_filename}",'abort_action'=>abort_action, 'alive_check'=>alive_check))
|
840
827
|
if File.basename(Arcadia.ruby) != 'ruby'
|
841
828
|
commandLine="export PATH=#{Arcadia.instance.local_dir}/bin:$PATH && #{commandLine}"
|
842
829
|
end
|
830
|
+
#s_event = Arcadia.process_event(RunCmdEvent.new(self, {'cmd'=>commandLine}))
|
831
|
+
#if s_event.flag != Event::FLAG_ERROR
|
843
832
|
if Kernel.system(commandLine)
|
844
833
|
set_alive(false)
|
845
|
-
#p "alive=#{is_alive?}"
|
846
834
|
notify(RDS_QUIET)
|
847
835
|
Kernel.system('y')
|
848
836
|
|
@@ -854,12 +842,7 @@ class RubyDebugServer
|
|
854
842
|
else
|
855
843
|
Kernel.exit!
|
856
844
|
Arcadia.console(self, 'msg'=>"#{$?.inspect}", 'level'=>'debug')
|
857
|
-
#Arcadia.new_debug_msg(self,"#{$?.inspect}")
|
858
845
|
end
|
859
|
-
|
860
|
-
#p "@alive=#{@alive}"
|
861
|
-
#notify(RDS_QUIET)
|
862
|
-
#Process.wait
|
863
846
|
end
|
864
847
|
end
|
865
848
|
rescue Exception => e
|
@@ -972,6 +955,16 @@ class RubyDebugClient
|
|
972
955
|
:value_class
|
973
956
|
)
|
974
957
|
|
958
|
+
if RUBY_VERSION >= '2'
|
959
|
+
#require "psych"
|
960
|
+
DOMAIN_TYPE_CONSTANT = nil
|
961
|
+
elsif RUBY_VERSION > '1.9.1' && RUBY_VERSION < '2'
|
962
|
+
require "syck"
|
963
|
+
DOMAIN_TYPE_CONSTANT = Object::Syck::DomainType
|
964
|
+
else
|
965
|
+
DOMAIN_TYPE_CONSTANT = YAML::DomainType
|
966
|
+
end
|
967
|
+
|
975
968
|
def initialize(_controller, _server='localhost', _port=8989, _timeout=0)
|
976
969
|
@controller = _controller
|
977
970
|
@session = nil
|
@@ -1100,7 +1093,7 @@ class RubyDebugClient
|
|
1100
1093
|
false
|
1101
1094
|
#raise RubyDebugException.new("Debugged has finished executing")
|
1102
1095
|
rescue Exception => e
|
1103
|
-
Arcadia.console(self, 'msg'=>Arcadia.text('ext.ruby_debug.client.e.
|
1096
|
+
Arcadia.console(self, 'msg'=>Arcadia.text('ext.ruby_debug.client.e.on_command2', [_command, e.class, e.inspect]), 'level'=>'debug')
|
1104
1097
|
false
|
1105
1098
|
end
|
1106
1099
|
end
|
@@ -1121,7 +1114,6 @@ class RubyDebugClient
|
|
1121
1114
|
end
|
1122
1115
|
@busy = false
|
1123
1116
|
result
|
1124
|
-
|
1125
1117
|
rescue Errno::ECONNABORTED, Errno::ECONNRESET
|
1126
1118
|
raise RubyDebugException.new(Arcadia.text("ext.ruby_debug.client.e.raise.on_read.1"))
|
1127
1119
|
rescue Exception => e
|
@@ -1173,8 +1165,12 @@ class RubyDebugClient
|
|
1173
1165
|
|
1174
1166
|
def yaml_pseudo_load(_obj)
|
1175
1167
|
just_present = @valuobjs.include?(_obj)
|
1176
|
-
@valuobjs << _obj
|
1177
|
-
|
1168
|
+
@valuobjs << _obj
|
1169
|
+
p _obj.class
|
1170
|
+
if _obj.class == DOMAIN_TYPE_CONSTANT
|
1171
|
+
|
1172
|
+
p _obj
|
1173
|
+
|
1178
1174
|
return _obj.type_id if just_present
|
1179
1175
|
ret = Hash.new
|
1180
1176
|
ret['__CLASS__']=_obj.type_id
|
@@ -1236,7 +1232,8 @@ class RubyDebugClient
|
|
1236
1232
|
|
1237
1233
|
|
1238
1234
|
def debug_dump(_exp)
|
1239
|
-
|
1235
|
+
return '' if _exp.nil? || _exp.strip.length == 0 || _exp.strip.length == 'nil'
|
1236
|
+
var = nil
|
1240
1237
|
if @valuobjs.nil?
|
1241
1238
|
@valuobjs = Array.new
|
1242
1239
|
else
|
@@ -1244,66 +1241,29 @@ class RubyDebugClient
|
|
1244
1241
|
end
|
1245
1242
|
begin
|
1246
1243
|
_to_eval = read("eval YAML::dump(#{_exp})")
|
1247
|
-
if _to_eval.include?('Exception:')
|
1244
|
+
if _to_eval.include?('Exception:') || _to_eval.include?('SyntaxError:')
|
1248
1245
|
_to_eval = read("eval require 'pp';eval #{_exp}.pretty_inspect")
|
1249
1246
|
var = eval(_to_eval)
|
1250
1247
|
#var = "?"
|
1251
1248
|
else
|
1252
|
-
_str = eval(_to_eval)
|
1249
|
+
_str = "#{eval(_to_eval)}"
|
1253
1250
|
_str.gsub!('!ruby/object:', '!')
|
1254
|
-
|
1251
|
+
begin
|
1252
|
+
_obj = YAML::load(_str)
|
1253
|
+
rescue Exception => e
|
1254
|
+
Arcadia.console(self, 'msg'=>"exception on eval in YAML::load #{_str} :#{e.inspect}")
|
1255
|
+
end
|
1255
1256
|
var = yaml_pseudo_load(_obj)
|
1256
1257
|
end
|
1257
1258
|
rescue Exception => e
|
1258
1259
|
Arcadia.console(self, 'msg'=>"exception on eval #{_exp} :#{e.inspect}")
|
1260
|
+
Arcadia.console(self, 'msg'=>"exception on eval #{_exp} : #{_to_eval}")
|
1259
1261
|
#Arcadia.new_msg(self,"exception on eval #{_exp} :#{e.inspect}")
|
1260
1262
|
var = nil
|
1261
1263
|
end
|
1262
1264
|
return var
|
1263
1265
|
end
|
1264
1266
|
|
1265
|
-
|
1266
|
-
# returns the instance variables and there values
|
1267
|
-
def instance_variables_new(_this='self')
|
1268
|
-
command("eval #{_this}.instance_variables")
|
1269
|
-
variables = []
|
1270
|
-
begin
|
1271
|
-
variables = eval(read)
|
1272
|
-
rescue Exception
|
1273
|
-
variables = []
|
1274
|
-
end
|
1275
|
-
@consider = Array.new
|
1276
|
-
variable_values = Hash.new
|
1277
|
-
variables.each do |var|
|
1278
|
-
#next if var != '@objs'
|
1279
|
-
# command("eval require 'pp'; #{var}.pretty_inspect() + '|||' + #{var}.class.to_s")
|
1280
|
-
command("eval YAML::dump(#{var})")
|
1281
|
-
_str = eval read
|
1282
|
-
#Arcadia.new_msg(self,"value passato 1 ="+_str)
|
1283
|
-
|
1284
|
-
_str.gsub!('!ruby/object:', '!')
|
1285
|
-
|
1286
|
-
#Arcadia.new_msg(self,"value passato 2 ="+_str)
|
1287
|
-
|
1288
|
-
_obj = YAML::load(_str)
|
1289
|
-
|
1290
|
-
_xvalue = yaml_pseudo_load(_obj)
|
1291
|
-
if _xvalue.class == Hash
|
1292
|
-
_xclass = _xvalue['__CLASS__']
|
1293
|
-
else
|
1294
|
-
_xclass = _xvalue.class.to_s
|
1295
|
-
end
|
1296
|
-
#_vvv = eval(_value)
|
1297
|
-
|
1298
|
-
#Arcadia.new_msg(self,"vvv class="+_vvv.class.to_s)
|
1299
|
-
|
1300
|
-
#Arcadia.new_msg(self,"value="+_xvalue.inspect)
|
1301
|
-
#Arcadia.new_msg(self,"class="+_xclass)
|
1302
|
-
variable_values[var] = Var.new(_xvalue, _xclass)
|
1303
|
-
end
|
1304
|
-
return variable_values
|
1305
|
-
end
|
1306
|
-
|
1307
1267
|
# returns the local variables and there values
|
1308
1268
|
def variables(_type)
|
1309
1269
|
begin
|
@@ -1311,6 +1271,9 @@ class RubyDebugClient
|
|
1311
1271
|
to_eval = read("eval #{_type}")
|
1312
1272
|
#Arcadia.console(self,'msg'=>"to_eval=#{to_eval.to_s}")
|
1313
1273
|
variables = eval(to_eval)
|
1274
|
+
if variables.class != Array
|
1275
|
+
variables = []
|
1276
|
+
end
|
1314
1277
|
#Arcadia.console(self,'msg'=>"variables=#{variables.to_s}")
|
1315
1278
|
rescue Exception => e
|
1316
1279
|
variables = []
|
@@ -1321,10 +1284,6 @@ class RubyDebugClient
|
|
1321
1284
|
variable_values = Hash.new
|
1322
1285
|
variables.each do |var|
|
1323
1286
|
next if var.to_s=='$;'
|
1324
|
-
# command("eval #{var}.to_s + '|||' + #{var}.class.to_s")
|
1325
|
-
# _str = eval(read)
|
1326
|
-
# _value, _class = _str.split('|||')
|
1327
|
-
# variable_values[var] = Var.new(_value, _class)
|
1328
1287
|
variable_values[var.to_s] = debug_eval(var.to_s)
|
1329
1288
|
end
|
1330
1289
|
return variable_values
|
@@ -1333,7 +1292,7 @@ class RubyDebugClient
|
|
1333
1292
|
def debug_eval(_exp)
|
1334
1293
|
if command("eval #{res=_exp}.to_s + '|||' + #{res}.class.to_s")
|
1335
1294
|
begin
|
1336
|
-
_str = eval(read)
|
1295
|
+
_str = eval(read).to_s
|
1337
1296
|
_value, _class = _str.split('|||')
|
1338
1297
|
rescue Exception => e
|
1339
1298
|
_value = "?"
|
@@ -1344,44 +1303,6 @@ class RubyDebugClient
|
|
1344
1303
|
return Var.new("?", "?")
|
1345
1304
|
end
|
1346
1305
|
end
|
1347
|
-
|
1348
|
-
# returns the local variables and there values
|
1349
|
-
def local_variables
|
1350
|
-
command("eval local_variables")
|
1351
|
-
variables = []
|
1352
|
-
begin
|
1353
|
-
variables = eval(read)
|
1354
|
-
rescue Exception
|
1355
|
-
variables = []
|
1356
|
-
end
|
1357
|
-
variable_values = Hash.new
|
1358
|
-
variables.each do |var|
|
1359
|
-
command("eval #{var}.to_s + '|||' + #{var}.class.to_s")
|
1360
|
-
_str = eval(read)
|
1361
|
-
_value, _class = _str.split('|||')
|
1362
|
-
variable_values[var] = Var.new(_value, eval(_class))
|
1363
|
-
end
|
1364
|
-
return variable_values
|
1365
|
-
end
|
1366
|
-
|
1367
|
-
|
1368
|
-
# returns the global variables and there values
|
1369
|
-
def global_variables
|
1370
|
-
command("eval global_variables")
|
1371
|
-
variables = []
|
1372
|
-
begin
|
1373
|
-
variables = eval(read)
|
1374
|
-
rescue Exception
|
1375
|
-
variables = []
|
1376
|
-
end
|
1377
|
-
variable_values = Hash.new
|
1378
|
-
variables.each do |var|
|
1379
|
-
command("eval #{var}.to_s")
|
1380
|
-
variable_values[var] = read
|
1381
|
-
end
|
1382
|
-
return variable_values
|
1383
|
-
end
|
1384
|
-
|
1385
1306
|
|
1386
1307
|
def set_breakpoint(_file, _line)
|
1387
1308
|
#_line = _line + 1
|
data/ext/ae-shell/ae-shell.rb
CHANGED
@@ -271,6 +271,9 @@ class Shell < ArcadiaExt
|
|
271
271
|
while (line = terr.gets)
|
272
272
|
output_mark = Arcadia.console(self,'msg'=>line, 'level'=>'error', 'mark'=>output_mark)
|
273
273
|
_event.add_result(self, 'output'=>line)
|
274
|
+
if line && line.length > 0
|
275
|
+
_event.flag = Event::FLAG_ERROR
|
276
|
+
end
|
274
277
|
end
|
275
278
|
rescue Exception => e
|
276
279
|
output_mark = Arcadia.console(self,'msg'=>e.to_s, 'level'=>'debug', 'mark'=>output_mark)
|
data/lib/a-commons.rb
CHANGED
@@ -598,11 +598,15 @@ class Event
|
|
598
598
|
attr_accessor :parent
|
599
599
|
attr_reader :channel
|
600
600
|
attr_reader :time
|
601
|
+
attr_accessor :flag #is used to give a state to event
|
601
602
|
attr_reader :results
|
603
|
+
FLAG_ERROR = 'E'
|
604
|
+
FLAG_DEFAULT = '0'
|
602
605
|
def initialize(_sender, _args=nil)
|
603
606
|
@breaked = false
|
604
607
|
@sender = _sender
|
605
608
|
@channel = '0'
|
609
|
+
@flag= FLAG_DEFAULT
|
606
610
|
if _args
|
607
611
|
_args.each do |key, value|
|
608
612
|
#self.send(key, value)
|
data/lib/a-contracts.rb
CHANGED
@@ -103,7 +103,7 @@ end
|
|
103
103
|
# +---------------------------------------------+
|
104
104
|
|
105
105
|
class BufferEvent < ArcadiaEvent # Abstract
|
106
|
-
attr_accessor :file, :title, :text, :row, :col, :lang
|
106
|
+
attr_accessor :file, :title, :text, :row, :col, :lang, :last_row, :last_col
|
107
107
|
# if file==nil && title==nil buffer=current buffer
|
108
108
|
end
|
109
109
|
|
data/lib/a-core.rb
CHANGED
@@ -24,7 +24,7 @@ class Arcadia < TkApplication
|
|
24
24
|
super(
|
25
25
|
ApplicationParams.new(
|
26
26
|
'arcadia',
|
27
|
-
'0.12.
|
27
|
+
'0.12.2',
|
28
28
|
'conf/arcadia.conf',
|
29
29
|
'conf/arcadia.pers'
|
30
30
|
)
|
@@ -57,7 +57,6 @@ class Arcadia < TkApplication
|
|
57
57
|
withdraw
|
58
58
|
protocol( "WM_DELETE_WINDOW", proc{Arcadia.process_event(QuitEvent.new(self))})
|
59
59
|
iconphoto(Arcadia.image_res(ARCADIA_RING_GIF)) if Arcadia.instance.tcltk_info.level >= '8.4.9'
|
60
|
-
|
61
60
|
}
|
62
61
|
@on_event = Hash.new
|
63
62
|
|
@@ -1809,7 +1808,7 @@ class ArcadiaAboutSplash < TkToplevel
|
|
1809
1808
|
place('x' => 100,'y' => 65,'height' => 19)
|
1810
1809
|
}
|
1811
1810
|
@tkLabel21 = TkLabel.new(self){
|
1812
|
-
text Arcadia.text("main.about.by", ['Antonio Galeone - 2004/
|
1811
|
+
text Arcadia.text("main.about.by", ['Antonio Galeone - 2004/2013'])
|
1813
1812
|
background _bgcolor
|
1814
1813
|
foreground '#ffffff'
|
1815
1814
|
font Arcadia.instance['conf']['splash.credits.font']
|
@@ -3254,6 +3253,25 @@ class ArcadiaLayout
|
|
3254
3253
|
end
|
3255
3254
|
index
|
3256
3255
|
end
|
3256
|
+
|
3257
|
+
def menu_item_exist?(_menu, _name)
|
3258
|
+
exist = false
|
3259
|
+
i_end = _menu.index('end')
|
3260
|
+
if i_end
|
3261
|
+
0.upto(i_end){|j|
|
3262
|
+
type = _menu.menutype(j)
|
3263
|
+
if type != 'separator'
|
3264
|
+
value = _menu.entrycget(j,'label').to_s
|
3265
|
+
if value == _name
|
3266
|
+
exist = true
|
3267
|
+
break
|
3268
|
+
end
|
3269
|
+
end
|
3270
|
+
}
|
3271
|
+
end
|
3272
|
+
exist
|
3273
|
+
end
|
3274
|
+
|
3257
3275
|
|
3258
3276
|
def process_frame(_ffw)
|
3259
3277
|
#p "processo frame #{_ffw.title}"
|
@@ -3262,14 +3280,16 @@ class ArcadiaLayout
|
|
3262
3280
|
titledFrame = @panels[dom]['root']
|
3263
3281
|
if titledFrame.instance_of?(TkTitledFrameAdapter)
|
3264
3282
|
menu = @panels[dom]['root'].menu_button('ext').cget('menu')
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
|
3270
|
-
|
3271
|
-
|
3272
|
-
|
3283
|
+
if !menu_item_exist?(menu, _ffw.title)
|
3284
|
+
ind = sorted_menu_index(menu, _ffw.title)
|
3285
|
+
menu.insert(ind,:command,
|
3286
|
+
:label=>_ffw.title,
|
3287
|
+
:image=>Arcadia.image_res(ARROW_LEFT_GIF),
|
3288
|
+
:compound=>'left',
|
3289
|
+
:command=>proc{change_domain(dom, _ffw.name)},
|
3290
|
+
:hidemargin => true
|
3291
|
+
)
|
3292
|
+
end
|
3273
3293
|
end
|
3274
3294
|
end
|
3275
3295
|
}
|
@@ -3286,35 +3306,40 @@ class ArcadiaLayout
|
|
3286
3306
|
if i >= 0
|
3287
3307
|
index = i.to_s
|
3288
3308
|
end
|
3309
|
+
clabel = "close \"#{_ffw.title}\""
|
3289
3310
|
if @tabbed
|
3290
|
-
mymenu
|
3291
|
-
:label=>"close \"#{_ffw.title}\"",
|
3292
|
-
:image=>Arcadia.image_res(CLOSE_FRAME_GIF),
|
3293
|
-
:compound=>'left',
|
3294
|
-
:command=>proc{unregister_panel(_ffw, false, true)},
|
3295
|
-
:hidemargin => true
|
3296
|
-
)
|
3297
|
-
else
|
3298
|
-
# if @panels[_ffw.domain][:raised_name] == _ffw.name
|
3299
|
-
if raised_name(_ffw.domain) == _ffw.name
|
3311
|
+
if !menu_item_exist?(mymenu, clabel)
|
3300
3312
|
mymenu.insert(index,:command,
|
3301
|
-
:label=>
|
3313
|
+
:label=> clabel,
|
3302
3314
|
:image=>Arcadia.image_res(CLOSE_FRAME_GIF),
|
3303
3315
|
:compound=>'left',
|
3304
3316
|
:command=>proc{unregister_panel(_ffw, false, true)},
|
3305
|
-
#:command=>proc{raise_panel(_ffw.domain, _ffw.name)},
|
3306
|
-
:hidemargin => true
|
3307
|
-
)
|
3308
|
-
else
|
3309
|
-
ind = sorted_menu_index(mymenu, _ffw.title)
|
3310
|
-
mymenu.insert(ind,:command,
|
3311
|
-
:label=>_ffw.title,
|
3312
|
-
:image=>Arcadia.image_res(ARROW_LEFT_GIF),
|
3313
|
-
:compound=>'left',
|
3314
|
-
:command=>proc{change_domain(_ffw.domain, _ffw.name)},
|
3315
3317
|
:hidemargin => true
|
3316
3318
|
)
|
3317
3319
|
end
|
3320
|
+
else
|
3321
|
+
# if raised_name(_ffw.domain) == _ffw.name
|
3322
|
+
if !menu_item_exist?(mymenu, clabel)
|
3323
|
+
mymenu.insert(index,:command,
|
3324
|
+
:label=> clabel,
|
3325
|
+
:image=>Arcadia.image_res(CLOSE_FRAME_GIF),
|
3326
|
+
:compound=>'left',
|
3327
|
+
:command=>proc{unregister_panel(_ffw, false, true)},
|
3328
|
+
:hidemargin => true
|
3329
|
+
)
|
3330
|
+
end
|
3331
|
+
# else
|
3332
|
+
if !menu_item_exist?(mymenu, _ffw.title)
|
3333
|
+
ind = sorted_menu_index(mymenu, _ffw.title)
|
3334
|
+
mymenu.insert(ind,:command,
|
3335
|
+
:label=>_ffw.title,
|
3336
|
+
:image=>Arcadia.image_res(ARROW_LEFT_GIF),
|
3337
|
+
:compound=>'left',
|
3338
|
+
:command=>proc{change_domain(_ffw.domain, _ffw.name)},
|
3339
|
+
:hidemargin => true
|
3340
|
+
)
|
3341
|
+
end
|
3342
|
+
# end
|
3318
3343
|
end
|
3319
3344
|
end
|
3320
3345
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arcadia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: coderay
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: 1.0.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.0.3
|
25
30
|
description: Arcadia Ide
|
26
31
|
email: antonio-galeone@rubyforge.org
|
27
32
|
executables:
|
@@ -263,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
268
|
version: '0'
|
264
269
|
requirements: []
|
265
270
|
rubyforge_project: arcadia
|
266
|
-
rubygems_version: 1.8.
|
271
|
+
rubygems_version: 1.8.25
|
267
272
|
signing_key:
|
268
273
|
specification_version: 3
|
269
274
|
summary: Light Editor Ide written in Ruby using the classic tcl/tk GUI toolkit.
|