Changeset 11099


Ignore:
Timestamp:
03/13/10 06:30:37 (2 years ago)
Author:
adamk
Message:

When showing a toolbar panel for the first time when it wasn't needed at startup time, make sure to set the interface lock state on or off properly to match the main_lockinterface configuration state.

Location:
trunk/Padre/lib/Padre
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Action/View.pm

    r10997 r11099  
    2121    my $class  = shift; 
    2222    my $main   = shift; 
    23     my $config = Padre->ide->config; 
    24  
    25     # Create the empty menu as normal 
    26     my $self = bless {}, $class; 
    27  
    28     # Add additional properties 
    29     $self->{main} = $main; 
     23    my $self   = bless { main => $main }, $class; 
     24    my $config = $main->config; 
    3025 
    3126    # Can the user move stuff around 
  • trunk/Padre/lib/Padre/Wx/AuiManager.pm

    r10997 r11099  
    6565# Set the lock status of the panels 
    6666sub lock_panels { 
    67     my $self = shift; 
     67    my $self   = shift; 
    6868    my $unlock = $_[0] ? 0 : 1; 
    6969 
  • trunk/Padre/lib/Padre/Wx/Bottom.pm

    r10997 r11099  
    1717 
    1818sub new { 
    19     my $class = shift; 
    20     my $main  = shift; 
     19    my $class  = shift; 
     20    my $main   = shift; 
     21    my $aui    = $main->aui; 
     22    my $unlock = $main->config->main_lockinterface ? 0 : 1; 
    2123 
    2224    # Create the basic object 
     
    3032 
    3133    # Add ourself to the window manager 
    32     my $aui = $main->aui; 
    3334    $aui->AddPane( 
    3435        $self, 
     
    3738            Resizable      => 1, 
    3839            PaneBorder     => 0, 
    39             Movable        => 1, 
    40             CaptionVisible => 1, 
    4140            CloseButton    => 0, 
    4241            DestroyOnClose => 0, 
    4342            MaximizeButton => 1, 
    44             Floatable      => 1, 
    45             Dockable       => 1, 
    4643            Position       => 2, 
    4744            Layer          => 4, 
     45            CaptionVisible => $unlock, 
     46            Floatable      => $unlock, 
     47            Dockable       => $unlock, 
     48            Movable        => $unlock, 
    4849            )->Bottom->Hide, 
    4950    ); 
    50     $aui->caption( 'bottom' => Wx::gettext('Output View') ); 
     51    $aui->caption( 
     52        bottom => Wx::gettext('Output View'), 
     53    ); 
    5154 
    5255    return $self; 
  • trunk/Padre/lib/Padre/Wx/Left.pm

    r10997 r11099  
    1616 
    1717sub new { 
    18     my $class = shift; 
    19     my $main  = shift; 
    20     my $aui   = $main->aui; 
     18    my $class  = shift; 
     19    my $main   = shift; 
     20    my $aui    = $main->aui; 
     21    my $unlock = $main->config->main_lockinterface ? 0 : 1; 
    2122 
    2223    # Create the basic object 
     
    3435        Padre::Wx->aui_pane_info( 
    3536            Name           => 'left', 
     37            CaptionVisible => $unlock, 
     38            Floatable      => $unlock, 
     39            Dockable       => $unlock, 
     40            Movable        => $unlock, 
    3641            Resizable      => 1, 
    3742            PaneBorder     => 0, 
    38             Movable        => 1, 
    39             CaptionVisible => 1, 
    4043            CloseButton    => 0, 
    4144            DestroyOnClose => 0, 
    4245            MaximizeButton => 0, 
    43             Floatable      => 1, 
    44             Dockable       => 1, 
    4546            Position       => 4, 
    4647            Layer          => 2, 
    4748            )->Left->Hide, 
    4849    ); 
    49     $aui->caption( 'left' => Wx::gettext('Project Tools') ); 
     50    $aui->caption( 
     51        left => Wx::gettext('Project Tools'), 
     52    ); 
    5053 
    5154    return $self; 
  • trunk/Padre/lib/Padre/Wx/Right.pm

    r10997 r11099  
    1919    my $main  = shift; 
    2020    my $aui   = $main->aui; 
     21    my $unlock = $main->config->main_lockinterface ? 0 : 1; 
    2122 
    2223    # Create the basic object 
     
    2526        -1, 
    2627        Wx::wxDefaultPosition, 
    27         Wx::Size->new( 180, 500 ), # Used when floating 
     28        Wx::Size->new( 160, 500 ), # Used when floating 
    2829        Wx::wxAUI_NB_SCROLL_BUTTONS | Wx::wxAUI_NB_TOP | Wx::wxBORDER_NONE 
    2930    ); 
     
    3435        Padre::Wx->aui_pane_info( 
    3536            Name           => 'right', 
     37            CaptionVisible => $unlock, 
     38            Floatable      => $unlock, 
     39            Dockable       => $unlock, 
     40            Movable        => $unlock, 
    3641            Resizable      => 1, 
    3742            PaneBorder     => 0, 
    38             Movable        => 1, 
    39             CaptionVisible => 1, 
    4043            CloseButton    => 0, 
    4144            DestroyOnClose => 0, 
    4245            MaximizeButton => 0, 
    43             Floatable      => 1, 
    44             Dockable       => 1, 
    4546            Position       => 3, 
    4647            Layer          => 3, 
    4748            )->Right->Hide, 
    4849    ); 
    49     $aui->caption( 'right' => Wx::gettext('Document Tools') ); 
     50    $aui->caption( 
     51        right => Wx::gettext('Document Tools'), 
     52    ); 
    5053 
    5154    return $self; 
Note: See TracChangeset for help on using the changeset viewer.