Changeset 876


Ignore:
Timestamp:
11/10/08 20:48:40 (3 years ago)
Author:
adamk
Message:

Adding a stub menu entry for "Show/Hide? Functions".

Splitting the GUI Show/Hide? from Editor Show/Hide?

File:
1 edited

Legend:

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

    r867 r876  
    293293 
    294294    # Create the View menu 
    295     $menu->{view}       = Wx::Menu->new; 
    296     $menu->{view_lines} = $menu->{view}->AppendCheckItem( -1, gettext("Show Line numbers") ); 
    297     Wx::Event::EVT_MENU( $win, 
    298         $menu->{view_lines}, 
    299         \&Padre::Wx::MainWindow::on_toggle_line_numbers, 
    300     ); 
    301     $menu->{view_folding} = $menu->{view}->AppendCheckItem( -1, gettext("Show code folding") ); 
    302     Wx::Event::EVT_MENU( $win, 
    303         $menu->{view_folding}, 
    304         \&Padre::Wx::MainWindow::on_toggle_code_folding, 
    305     ); 
    306     $menu->{view_eol} = $menu->{view}->AppendCheckItem( -1, gettext("Show Newlines") ); 
    307     Wx::Event::EVT_MENU( $win, 
    308         $menu->{view_eol}, 
    309         \&Padre::Wx::MainWindow::on_toggle_eol, 
    310     ); 
     295    $menu->{view} = Wx::Menu->new; 
     296 
     297    # GUI Elements 
    311298    $menu->{view_output} = $menu->{view}->AppendCheckItem( -1, gettext("Show Output") ); 
    312299    Wx::Event::EVT_MENU( $win, 
     
    318305        }, 
    319306    ); 
     307    if ( $experimental ) { 
     308        # Not implemented yet in MainWindow 
     309        $menu->{view_functions} = $menu->{view}->AppendCheckItem( -1, gettext("Show Functions") ); 
     310        Wx::Event::EVT_MENU( $win, 
     311            $menu->{view_functions}, 
     312            sub { 
     313                $_[0]->show_functions( 
     314                    $_[0]->{menu}->{view_functions}->IsChecked 
     315                ), 
     316            }, 
     317        ); 
     318    } 
    320319    unless ( Padre::Util::WIN32 ) { 
    321320        # On Windows disabling the status bar is broken, so don't allow it 
     
    326325        ); 
    327326    } 
     327    $menu->{view}->AppendSeparator; 
     328 
     329    # Editor look and feel 
     330    $menu->{view_lines} = $menu->{view}->AppendCheckItem( -1, gettext("Show Line numbers") ); 
     331    Wx::Event::EVT_MENU( $win, 
     332        $menu->{view_lines}, 
     333        \&Padre::Wx::MainWindow::on_toggle_line_numbers, 
     334    ); 
     335    $menu->{view_folding} = $menu->{view}->AppendCheckItem( -1, gettext("Show Code Folding") ); 
     336    Wx::Event::EVT_MENU( $win, 
     337        $menu->{view_folding}, 
     338        \&Padre::Wx::MainWindow::on_toggle_code_folding, 
     339    ); 
     340    $menu->{view_eol} = $menu->{view}->AppendCheckItem( -1, gettext("Show Newlines") ); 
     341    Wx::Event::EVT_MENU( $win, 
     342        $menu->{view_eol}, 
     343        \&Padre::Wx::MainWindow::on_toggle_eol, 
     344    ); 
    328345    $menu->{view_indentation_guide} = $menu->{view}->AppendCheckItem( -1, gettext("Show Indentation Guide") ); 
    329346    Wx::Event::EVT_MENU( $win, 
Note: See TracChangeset for help on using the changeset viewer.