Ticket #87: padre.patch

File padre.patch, 2.3 KB (added by hjansen, 6 years ago)

Patch file

  • lib/Padre/Wx/MainWindow.pm

    diff -ru Padre-0.15-8UVvmY/lib/Padre/Wx/MainWindow.pm myPadre/lib/Padre/Wx/MainWindow.pm
    old new  
    118118       ); 
    119119 
    120120       # Create the main notebook for the documents 
    121        $self->{notebook} = Wx::Notebook->new( 
     121       $self->{notebook} = Wx::AuiNotebook->new( 
    122122               $self->{upper_panel}, 
    123123               -1, 
    124124               Wx::wxDefaultPosition, 
    125125               Wx::wxDefaultSize, 
    126                Wx::wxNO_FULL_REPAINT_ON_RESIZE | Wx::wxCLIP_CHILDREN, 
     126               Wx::wxNO_FULL_REPAINT_ON_RESIZE | Wx::wxCLIP_CHILDREN | Wx::wxAUI_NB_DEFAULT_STYLE, 
    127127       ); 
    128128       Wx::Event::EVT_NOTEBOOK_PAGE_CHANGED( 
    129129               $self, 
     
    825825sub create_tab { 
    826826       my ($self, $editor, $file, $title) = @_; 
    827827 
    828        $self->{notebook}->AddPage($editor, $title, 1); # TODO add closing x 
     828       $self->{notebook}->AddPage($editor, $title, 1); 
    829829       $editor->SetFocus; 
    830830 
    831831       my $id  = $self->{notebook}->GetSelection; 
  • lib/Padre/Wx/ToolBar.pm

    diff -ru Padre-0.15-8UVvmY/lib/Padre/Wx/ToolBar.pm myPadre/lib/Padre/Wx/ToolBar.pm
    old new  
    3232       #$self->AddTool( 1000, '', Padre::Wx::tango(catfile('actions', 'bookmark-new.png')), 'Bookmark' ); 
    3333       #Wx::Event::EVT_TOOL($parent, 1000, sub { Padre::Wx::Dialog::Bookmarks->set_bookmark($_[0]) } ); 
    3434 
     35       Wx::Event::EVT_TOOL( $parent, Wx::wxID_NEW, sub { $_[0]->setup_editor; return; } ); 
     36 
    3537       return $self; 
    3638} 
    3739 
     
    3941       my $self    = shift; 
    4042       my $doc     = shift; 
    4143 
     44       $self->EnableTool( Wx::wxID_NEW, 1 ); 
     45 
    4246       my $enabled = !! ( $doc and $doc->is_modified ); 
    4347       $self->EnableTool( Wx::wxID_SAVE, $enabled ); 
    4448 
  • lib/Padre/Wx.pm

    diff -ru Padre-0.15-8UVvmY/lib/Padre/Wx.pm myPadre/lib/Padre/Wx.pm
    old new  
    1414# use them without braces. 
    1515use Wx        ':everything'; 
    1616use Wx::Event ':everything'; 
     17use Wx::AUI; 
    1718 
    1819our $VERSION = '0.15';