Changeset 469


Ignore:
Timestamp:
10/26/08 01:46:35 (3 years ago)
Author:
szabgab
Message:

allow the opening of the output window on startup
make sure the empty sqare artifact does not show
up even if the output window is closed on startup

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Padre/Config.pm

    r441 r469  
    109109    # Look and feel preferences 
    110110    $self->{main_statusbar}           ||= 1; 
     111    $self->{main_output}              ||= 0; 
    111112    $self->{editor_tabwidth}          ||= 4; 
    112113    $self->{editor_linenumbers}       ||= 0; 
  • trunk/lib/Padre/Wx/MainWindow.pm

    r468 r469  
    210210        $self, 
    211211        -1, 
    212         sub { $_[0]->on_toggle_status_bar; $_[0]->refresh_all; }, 
     212        sub {  
     213            $_[0]->on_toggle_status_bar;  
     214            $_[0]->refresh_all; 
     215 
     216            my $output = $_[0]->{menu}->{view_output}->IsChecked; 
     217            # Firs we show the output window and then hide it if necessary 
     218            # in order to avoide some weird visual artifacts (empty square at 
     219            # top left part of the whole application) 
     220            # TODO maybe some users want to make sure the output window is always 
     221            # off at startup. 
     222            $_[0]->show_output(1); 
     223            $_[0]->show_output($output) if not $output; 
     224            }, 
    213225    ); 
    214226    $timer->Start( 500, 1 ); 
     
    11131125sub show_output { 
    11141126    my $self = shift; 
    1115     my $on   = @_ ? $_[0] ? 1 : 0 : 1; 
     1127    my $on   = @_ ? $_[0] ? 1 : 0 : $self->{menu}->{view_output}->IsChecked; 
     1128    my $config = Padre->ide->config; 
     1129    $config->{main_output} = $on; 
    11161130    unless ( $on == $self->{menu}->{view_output}->IsChecked ) { 
    11171131        $self->{menu}->{view_output}->Check($on); 
  • trunk/lib/Padre/Wx/Menu.pm

    r468 r469  
    481481        $menu->{view_statusbar}->Check( $config->{main_statusbar} ? 1 : 0 ); 
    482482    } 
     483    $menu->{view_output}->Check( $config->{main_output} ? 1 : 0 ); 
     484 
    483485    $menu->{view_indentation_guide}->Check( $config->{editor_indentationguides} ? 1 : 0 ); 
    484486    $menu->{view_show_calltips}->Check( $config->{editor_calltips} ? 1 : 0 ); 
  • trunk/lib/Padre/Wx/Output.pm

    r468 r469  
    2525    ); 
    2626 
    27     # By definition the output window is not shown by default. 
    28     # Therefore, we should Freeze the widget to stop it attempt to render anything, 
    29     # which has been a cause of weird visual artifacts in the past. 
    30     $self->Freeze; 
    31  
    3227    # Do custom startup stuff here 
    3328 
  • trunk/t/02-new.t

    r429 r469  
    4444        main_startup       => 'new', 
    4545        main_statusbar     => 1, 
     46        main_output        => 0, 
    4647        projects           => {}, 
    4748        run_save           => 'same', 
Note: See TracChangeset for help on using the changeset viewer.