Changeset 5877


Ignore:
Timestamp:
07/06/09 04:54:07 (3 years ago)
Author:
waxhead
Message:

Added toolbar icons for 'Save All', 'Find' and 'Find and Replace' and 'Document Stats'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Wx/ToolBar.pm

    r5774 r5877  
    6565     
    6666    $self->add_tool( 
     67        id  => 1000,            # I don't like these hard set ID's for Wx. 
     68        icon    => 'actions/stock_data-save', 
     69        short   => Wx::gettext('Save All'), 
     70        event => sub { 
     71            Padre::Wx::Main::on_save_all(@_); 
     72        }, 
     73    ); 
     74     
     75    $self->add_tool( 
    6776        id    => Wx::wxID_CLOSE, 
    6877        icon  => 'actions/x-document-close', 
     
    128137    ); 
    129138 
     139    # find and replace 
     140    $self->AddSeparator; 
     141     
     142    $self->add_tool( 
     143        id  => Wx::wxID_FIND, 
     144        icon    => 'actions/edit-find', 
     145        short   => Wx::gettext('Find'), 
     146    ); 
     147     
     148    $self->add_tool( 
     149        id  => Wx::wxID_REPLACE, 
     150        icon    => 'actions/edit-find-replace', 
     151        short   => Wx::gettext('Find and Replace'), 
     152    ); 
     153     
    130154    # Document Transforms 
    131155    $self->AddSeparator; 
     
    137161        event => sub { 
    138162            Padre::Wx::Main::on_comment_toggle_block(@_); 
     163        }, 
     164    ); 
     165     
     166    $self->AddSeparator; 
     167     
     168    $self->add_tool( 
     169        id  => 1001, 
     170        icon    => 'actions/document-properties', 
     171        short   => Wx::gettext('Document Stats'), 
     172        event   => sub { 
     173            Padre::Wx::Main::on_doc_stats(@_); 
    139174        }, 
    140175    ); 
     
    152187 
    153188    $self->EnableTool( Wx::wxID_SAVE, ( $document and $document->is_modified ? 1 : 0 ) ); 
    154     # got here...  
    155189    $self->EnableTool( Wx::wxID_SAVEAS,( $document)); 
     190     
     191    # trying out the Comment Code method here 
     192    $self->EnableTool( 1000, ( $document ) ); # Save All 
    156193     
    157194    $self->EnableTool( Wx::wxID_CLOSE, ( $editor ? 1 : 0 ) ); 
Note: See TracChangeset for help on using the changeset viewer.