Commits

Herbert Breunung committed f5409c1

title bar alway recent, sane refactored

Comments (0)

Files changed (3)

lib/Kephra/App/Bar/Document.pm

 		: Kephra::App::Editor->new($self);
 
 	$self->InsertPage( $pages, $ed, $label, $set_active );
-	$ed->set_focus() if $set_active;
+	$ed->focus() if $set_active;
 
 	return $ed;
 }

lib/Kephra/App/Editor.pm

 		} elsif ($event->GetKeyCode ==  &Wx::WXK_DOWN and $event->ControlDown){
 			if ($event->ShiftDown) {$self->CmdKeyExecute(&Wx::wxSTC_CMD_PARADOWNEXTEND)} 
 			else                   {$self->CmdKeyExecute(&Wx::wxSTC_CMD_PARADOWN)}
+		} elsif ($event->GetKeyCode ==  &Wx::WXK_F12) {
+			Wx::Window::SetFocus(  );
 		} else {$event->Skip}
 
 		#print " $key- \n";

lib/Kephra/App/Panel/FileBrowser.pm

 
 sub new {
     my( $class, $parent) = @_;
-    my $self = $class->SUPER::new(
+    my $self = $panel = $class->SUPER::new(
         $parent, -1, [-1,-1], [-1,-1], 
         &Wx::wxTR_SINGLE | &Wx::wxTR_HIDE_ROOT,
     );
     return $self;
 }
 
+sub focus{ Wx::Window::SetFocus( $panel ) }
+
 sub get_modules_and_paths {
     my $dir = shift;
     return 0 unless -d $dir;