… | |
… | |
269 | my ($widget) = @_; |
269 | my ($widget) = @_; |
270 | |
270 | |
271 | $recording = $::CONN && !$recording; |
271 | $recording = $::CONN && !$recording; |
272 | if ($recording) { |
272 | if ($recording) { |
273 | $widget->set_text ("Stop Recording"); |
273 | $widget->set_text ("Stop Recording"); |
274 | my $action = $macro->{action} ||= []; |
|
|
275 | $::CONN->record (sub { |
274 | $::CONN->record (sub { |
276 | push @$action, $_[0]; |
275 | push @{ $macro->{action} }, $_[0]; |
277 | $textedit->set_text (macro_to_text $macro); |
276 | $textedit->set_text (macro_to_text $macro); |
278 | }) if $::CONN; |
277 | }) if $::CONN; |
279 | } else { |
278 | } else { |
280 | $widget->set_text ("Start Recording"); |
279 | $widget->set_text ("Start Recording"); |
281 | $::CONN->record if $::CONN; |
280 | $::CONN->record if $::CONN; |