Commits

Herbert Breunung  committed 524faf8

titlebar reacts now even on first openend file

  • Participants
  • Parent commits 2282784

Comments (0)

Files changed (5)

File lib/Kephra/API/Doc.pm

-use v5.10;
+use v5.10; #
 use strict;
 use warnings;
 use Wx;

File lib/Kephra/App/Bar/Document.pm

 	$self->InsertPage( $position, $new_page, $title, $set_active);
 	#$self->set_page_title( $title, $new_page );
 	Kephra::API::focus($new_page) if $set_active;
-	Kephra::API::main_window()->refresh_title() if $set_active;
 
 	# inserting new index to position translators
 	for   (@{$self->{'visual_page_order'}}){ $_++ if $_ >= $position }

File lib/Kephra/App/Part/FileBrowser.pm

 
 	Wx::Event::EVT_TREE_ITEM_ACTIVATED( $self, -1, sub {
 		my ($fb, $event) = @_;
-		say $fb->GetItemData( $event->GetItem )->GetData;
 		Kephra::File::open( $fb->GetItemData( $event->GetItem )->GetData );
 		Wx::Window::SetFocus( $fb );
 	} );

File lib/Kephra/Document.pm

 		$self->_set_old_file_path( $self->file_path );
 		#$_->set_page_title( $self->title, $self->panel->{$_} )
 			#for Kephra::API::all_docbars();
-		# panel is no hash
-		say $self->panel for Kephra::API::all_docbars();
 	});
 has file_dir     => ( is => 'rwp', );
 has file_name    => ( is => 'rwp', );

File lib/Kephra/File.pm

 	my $doc = Kephra::Document->new();
 	$_->add_page( $doc->panel->{$_}, 'rightmost', $doc->title, 0 ) for Kephra::API::all_docbars();;
 	Kephra::API::focus( $doc->editor->{$docbar} );
+	Kephra::API::main_window()->refresh_title();
 }
 
 sub open {
 		$ed = Kephra::API::editor();
 		$ed->EmptyUndoBuffer;
 		#$ed->mount_events();
+		Kephra::API::main_window()->refresh_title();
 	}
 }