Commits

Herbert Breunung committed 1e3d023

minor cleanup

Comments (0)

Files changed (2)

lib/Kephra/App/Editor.pm

 		elsif ($key ==  &Wx::WXK_F2)           {Kephra::App::Panel::FileBrowser::focus() } 
 		elsif ($key ==  &Wx::WXK_F11)          {Kephra::API::widget('win')->toggle_fullscreen() } 
 		elsif ($key ==  &Wx::WXK_ESCAPE)       { } 
-		elsif ($key ==  &Wx::WXK_TAB     +2000){Kephra::App::Panel::IOUnit::focus() } # shift lock
+		elsif ($key ==  &Wx::WXK_TAB     +2000){Kephra::App::Panel::IOUnit::focus() }
 		elsif ($key ==  ord('Q') + 2000)       {Kephra::File::close_active() }
 		elsif ($key ==  ord('Q') + 4000)       {Kephra::API::app()->close_save }
 		else {$event->Skip}

lib/Kephra/App/Panel/IOUnit.pm

 		$self->{'active_slot_name'} = $nb->GetPageText( $event->GetSelection );
 	});
 	Wx::Event::EVT_TEXT_ENTER($input, -1, sub {
-		my ($txt, $event ) = @_;
-		my $cmd = $txt->GetValue;
+		my ($input, $event ) = @_;
+		my $cmd = $input->GetValue;
 		$input->Clear;
-		return unless $self->{'active_slot_name'} eq 'drum'
-				   or $self->{'active_slot_name'} eq 'perl'
-				   or $self->{'active_slot_name'} eq 'shell';
-		output_line('log',"$active_slot command $cmd");
-		my $outxt = $self->{'output_slots'}{$active_slot};
-		if    ($active_slot eq 'drum')  { 
+		my $active_name = $self->{'active_slot_name'};
+		return unless $active_name eq 'drum'
+				   or $active_name eq 'perl'
+				   or $active_name eq 'shell'
+				   or $active_name eq 'output';
+		output_line('log',"$active_name command $cmd");
+		my $outxt = $self->{'output_slots'}{ $active_name };
+		if    ($active_name eq 'drum')  { 
 		}
-		elsif ($active_slot eq 'perl')  { output_line ('perl',  "\"$cmd\" => \"".eval($cmd) . '"' ) }
-		elsif ($active_slot eq 'shell') { 
+		elsif ($active_name eq 'perl')  { output_line ('perl',  "\"$cmd\" => \"".eval($cmd) . '"' ) }
+		elsif ($active_name eq 'shell') { 
 			$self->{'process'} = Wx::Perl::ProcessStream->OpenProcess
-				(qq~bash "$cmd"~ , __PACKAGE__, $self->{'output_slots'}{'output'});
+				(qq~bash "$cmd"~ , __PACKAGE__, $self->{'output_slots'}{'shell'});
 		}
 	});
 	Wx::Perl::ProcessStream::EVT_WXP_PROCESS_STREAM_STDOUT(
-		$self->{'output_slots'}{'output'}, sub {
+		$self->{'output_slots'}{'shell'}, sub {
 			my ($txt, $event) = @_;
 			$event->Skip(1);
 			output_line('shell', $event->GetLine );
 	return unless defined $self->{'output_slots'}{ $slot_name };
 	my $slot = $self->{'output_slots'}{ $slot_name };
 	my ($x, $y) = $slot->GetLastPosition;
-	$slot->AppendText("\n") , print "$slot\n"
+	$slot->AppendText("\n")
 		if ($slot_name ne 'log' and $slot_name ne $self->{'master_slot_name'})
 		and $slot->GetValue     and $x > 0;
 	output(@_);