Commits

Herbert Breunung  committed cccf3fd

can assign no file name if doc empty

  • Participants
  • Parent commits fedce7f

Comments (0)

Files changed (2)

File lib/Kephra/App/Window.pm

 package Kephra::App::Window;
 our @ISA = 'Wx::Frame';
 our $_ref;
+my $title_end = "$Kephra::NAME $Kephra::VERSION";
 
 sub new {
     my( $class, $title ) = @_;
 	my $title = (ref $doc and $doc->file_name)
 		? $doc->file_name.' ('.$doc->file_path.')'
 		: Kephra::App::Panel::Editor::active_title();
-	$title .= " - $Kephra::NAME $Kephra::VERSION";
-	$self->set_title($title);
+	$self->set_title( $title . " - $title_end" );
 }
 
 sub toggle_fullscreen {

File lib/Kephra/Document.pm

  
 sub assign_file {
 	my ($self, $file_path) = @_;
-	return unless $file_path;
+	return unless defined $file_path;
 	$file_path = Kephra::File::normalize_name($file_path);
 	$self->file_path($file_path);
 	my @path_parts = File::Spec->splitpath( $_[0]->file_path );