Changeset 8572
- Timestamp:
- 10/03/09 06:31:44 (2 years ago)
- Location:
- trunk/Padre/lib/Padre
- Files:
-
- 4 edited
-
Config.pm (modified) (1 diff)
-
Current.pm (modified) (2 diffs)
-
Wx/Dialog/Preferences.pm (modified) (1 diff)
-
Wx/Main.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Config.pm
r8566 r8572 185 185 # Window 186 186 setting( 187 name => 'window_title',188 type => Padre::Constant::ASCII,189 store => Padre::Constant::HUMAN,190 default => 'Padre [%p]',187 name => 'window_title', 188 type => Padre::Constant::ASCII, 189 store => Padre::Constant::HUMAN, 190 default => 'Padre [%p]', 191 191 ); 192 192 -
trunk/Padre/lib/Padre/Current.pm
r8568 r8572 126 126 unless ( exists $self->{editor} ) { 127 127 my $notebook = $self->notebook; 128 if ( defined($notebook)){128 if ( defined($notebook) ) { 129 129 my $selected = $notebook->GetSelection; 130 130 if ( $selected == -1 ) { … … 137 137 Carp::croak("Failed to find page"); 138 138 } 139 }} 139 } 140 } 140 141 } 141 142 return $self->{editor}; -
trunk/Padre/lib/Padre/Wx/Dialog/Preferences.pm
r8571 r8572 307 307 308 308 my %window_title_vars = ( 309 '%p' => 'Project name', 310 '%v' => 'Padre version', 311 '%f' => 'Current filename', 312 '%d' => 'Current files dirname', 313 '%b' => 'Current files basename', 314 '%F' => 'Current filename relative to project', 315 ); 316 my @window_title_keys = sort 317 { lc($a) cmp lc($b); } 318 (keys(%window_title_vars)); 309 '%p' => 'Project name', 310 '%v' => 'Padre version', 311 '%f' => 'Current filename', 312 '%d' => 'Current files dirname', 313 '%b' => 'Current files basename', 314 '%F' => 'Current filename relative to project', 315 ); 316 my @window_title_keys = sort { lc($a) cmp lc($b); } ( keys(%window_title_vars) ); 319 317 my $window_title_left; 320 318 my $window_title_right; 321 while ($#window_title_keys > -1) { 319 320 while ( $#window_title_keys > -1 ) { 322 321 323 322 my $key = shift @window_title_keys; 324 $window_title_left .= 325 $key . 326 ' => '. 327 Wx::gettext($window_title_vars{$key})."\n"; 323 $window_title_left .= $key . ' => ' . Wx::gettext( $window_title_vars{$key} ) . "\n"; 328 324 329 325 last if $#window_title_keys < 0; 330 326 331 327 $key = shift @window_title_keys; 332 $window_title_right .= 333 $key . 334 ' => '. 335 Wx::gettext($window_title_vars{$key})."\n"; 328 $window_title_right .= $key . ' => ' . Wx::gettext( $window_title_vars{$key} ) . "\n"; 336 329 337 330 } 338 $window_title_left =~ s/\n$//;331 $window_title_left =~ s/\n$//; 339 332 $window_title_right =~ s/\n$//; 340 333 341 334 my $table = [ 342 [ [ 'Wx::StaticText', 'undef',Wx::gettext('Window title:') ],343 [ 'Wx::TextCtrl', 'window_title', $config->window_title ],344 ], 345 [ [ 'Wx::StaticText', 'undef',Wx::gettext($window_title_left) ],346 [ 'Wx::StaticText', 'undef',Wx::gettext($window_title_right) ],335 [ [ 'Wx::StaticText', 'undef', Wx::gettext('Window title:') ], 336 [ 'Wx::TextCtrl', 'window_title', $config->window_title ], 337 ], 338 [ [ 'Wx::StaticText', 'undef', Wx::gettext($window_title_left) ], 339 [ 'Wx::StaticText', 'undef', Wx::gettext($window_title_right) ], 347 340 ], 348 341 [ [ 'Wx::CheckBox', 'main_output_ansi', ( $config->main_output_ansi ? 1 : 0 ), -
trunk/Padre/lib/Padre/Wx/Main.pm
r8571 r8572 4737 4737 # The syntax string could be set in the preferences dialog. 4738 4738 4739 my $self = shift;4739 my $self = shift; 4740 4740 my $config = $self->{config}; 4741 4741 4742 4742 my %variable_data = ( 4743 '%' => '%',4744 'v' => $Padre::VERSION,4745 'f' => '',# Initlize space for filename4746 'b' => '',# Initlize space for filename - basename4747 'd' => '',# Initlize space for filename - dirname4748 'F' => '',# Initlize space for filename relative to project dir4749 'p' => '',# Initlize space for project name4750 );4743 '%' => '%', 4744 'v' => $Padre::VERSION, 4745 'f' => '', # Initlize space for filename 4746 'b' => '', # Initlize space for filename - basename 4747 'd' => '', # Initlize space for filename - dirname 4748 'F' => '', # Initlize space for filename relative to project dir 4749 'p' => '', # Initlize space for project name 4750 ); 4751 4751 4752 4752 # We may run within window startup, there may be no "current" or "document": 4753 if ( defined($self->current) and defined($self->current->document)) {4753 if ( defined( $self->current ) and defined( $self->current->document ) ) { 4754 4754 my $document = $self->current->document; 4755 4755 $variable_data{'f'} = $document->file->{filename}; … … 4773 4773 $self->{title} = $config->window_title; 4774 4774 4775 my $Vars = join( '',keys(%variable_data));4775 my $Vars = join( '', keys(%variable_data) ); 4776 4776 4777 4777 $self->{title} =~ s/\%([$Vars])/$variable_data{$1}/g; 4778 4778 4779 $self->{title} = 'Padre ' .$Padre::VERSION4780 if ! defined($self->{title});4779 $self->{title} = 'Padre ' . $Padre::VERSION 4780 if !defined( $self->{title} ); 4781 4781 4782 4782 my $revision = Padre::Util::revision();
Note: See TracChangeset
for help on using the changeset viewer.
