Changeset 11996


Ignore:
Timestamp:
07/25/10 05:29:39 (19 months ago)
Author:
adamk
Message:

Added Padre::Wx::Nth to group first/nth-time startup magic

Location:
trunk/Padre
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/Changes

    r11992 r11996  
    6868      (AZAWAWI) 
    6969    - Padre has wxWidgets method documentation in F2 help search (AZAWAWI) 
     70    - Added Padre::Wx::Nth to group first/nth-time startup magic (ADAMK) 
    7071 
    71720.66 2010.07.01 
  • trunk/Padre/lib/Padre/Wx.pm

    r11742 r11996  
    4949 
    5050 
     51 
     52 
    5153##################################################################### 
    5254# Defines for object IDs 
     
    5961    ID_TIMER_ACTIONQUEUE => 30005, 
    6062    ID_TIMER_LASTRESORT  => 30006, 
     63    ID_TIMER_NTH         => 30007, 
    6164}; 
     65 
     66 
    6267 
    6368 
  • trunk/Padre/lib/Padre/Wx/Main.pm

    r11995 r11996  
    278278    # TO DO: there might be better ways to fix that issue... 
    279279    #$statusbar->Show; 
    280     my $timer = Wx::Timer->new( $self, Padre::Wx::ID_TIMER_POSTINIT, ); 
     280    my $timer = Wx::Timer->new( $self, Padre::Wx::ID_TIMER_POSTINIT ); 
    281281    Wx::Event::EVT_TIMER( 
    282282        $self, 
     
    337337                refresh_recent 
    338338                refresh_windowlist 
    339                 } 
     339            } 
    340340        ); 
    341341 
     
    368368 
    369369    # Start the change detection timer 
    370     my $timer = Wx::Timer->new( $self, Padre::Wx::ID_TIMER_FILECHECK ); 
     370    my $timer1 = Wx::Timer->new( $self, Padre::Wx::ID_TIMER_FILECHECK ); 
    371371    Wx::Event::EVT_TIMER( 
    372372        $self, 
     
    376376        }, 
    377377    ); 
    378     $timer->Start( $config->update_file_from_disk_interval * SECONDS, 0 ); 
     378    $timer1->Start( $config->update_file_from_disk_interval * SECONDS, 0 ); 
    379379 
    380380    # Start the second-generation task manager 
    381381    $self->ide->task_manager->start; 
    382382 
    383     return; 
     383    # Give a chance for post-start code to run, then do the nth-start logic 
     384    my $timer2 = Wx::Timer->new( $self, Padre::Wx::ID_TIMER_NTH ); 
     385    Wx::Event::EVT_TIMER( 
     386        $self, 
     387        Padre::Wx::ID_TIMER_NTH, 
     388        sub { 
     389            $_[0]->timer_nth; 
     390        }, 
     391    ); 
     392    $timer2->Start( 1, 1 ); 
     393 
     394    return; 
     395} 
     396 
     397sub timer_nth { 
     398    my $self = shift; 
     399 
     400    # Hand off to the nth start system 
     401    require Padre::Wx::Nth; 
     402    Padre::Wx::Nth->nth( $self, $self->config->startup_count ); 
     403 
     404    return 1; 
    384405} 
    385406 
     
    57735794    require Template::Tiny; 
    57745795    my $output = ''; 
    5775     Template::Tiny->new->process( 
    5776         $template, 
    5777         $data, 
    5778         \$output, 
    5779     ); 
     5796    Template::Tiny->new->process( $template, $data, \$output ); 
    57805797 
    57815798    # Create the file from the content 
  • trunk/Padre/lib/Padre/Wx/Role/Dialog.pm

    r11994 r11996  
    147147    ); 
    148148    $dialog->CenterOnParent; 
    149     my $result = ($dialog->ShowModal == Wx::wxYES) ? 1 : 0; 
     149    my $result = ($dialog->ShowModal == Wx::wxID_YES) ? 1 : 0; 
    150150    $dialog->Destroy; 
    151151    return $result; 
Note: See TracChangeset for help on using the changeset viewer.